Diagramas de factorización
Author: Manuel S.

-

r_1

r_2

r_3

r_4

rojo

verde

azul

r_5

n

-

+

Activa la animación

Velocidad de animación

Indica el número

Descomposición de un número

+

-

C54 = 54
C3 = 3
C2 = 2
C4: (2 * C3) - C2
C5: (2 * C4) - C3
C6: (2 * C5) - C4
C7: (2 * C6) - C5
C8: (2 * C7) - C6
C9: (2 * C8) - C7
C10: (2 * C9) - C8
C11: (2 * C10) - C9
C12: (2 * C11) - C10
C13: (2 * C12) - C11
C14: (2 * C13) - C12
C15: (2 * C14) - C13
C16: (2 * C15) - C14
C17: (2 * C16) - C15
C18: (2 * C17) - C16
C19: (2 * C18) - C17
C20: (2 * C19) - C18
C21: (2 * C20) - C19
C22: (2 * C21) - C20
C23: (2 * C22) - C21
C24: (2 * C23) - C22
C25: (2 * C24) - C23
C26: (2 * C25) - C24
C27: (2 * C26) - C25
C28: (2 * C27) - C26
C29: (2 * C28) - C27
C30: (2 * C29) - C28
C31: (2 * C30) - C29
C32: (2 * C31) - C30
C33: (2 * C32) - C31
C34: (2 * C33) - C32
C35: (2 * C34) - C33
C36: (2 * C35) - C34
C37: (2 * C36) - C35
C38: (2 * C37) - C36
C39: (2 * C38) - C37
C40: (2 * C39) - C38
C41: (2 * C40) - C39
C42: (2 * C41) - C40
C43: (2 * C42) - C41
C44: (2 * C43) - C42
C45: (2 * C44) - C43
C46: (2 * C45) - C44
C47: (2 * C46) - C45
C48: (2 * C47) - C46
C49: (2 * C48) - C47
C50: (2 * C49) - C48
C51: (2 * C50) - C49
C52: (2 * C51) - C50
C53: (2 * C52) - C51
C55: (2 * C54) - C53
C56: (2 * C55) - C54
C57: (2 * C56) - C55
C58: (2 * C57) - C56
C59: (2 * C58) - C57
C60: (2 * C59) - C58
C61: (2 * C60) - C59
C62: (2 * C61) - C60
C63: (2 * C62) - C61
C64: (2 * C63) - C62
C65: (2 * C64) - C63
C66: (2 * C65) - C64
C67: (2 * C66) - C65
C68: (2 * C67) - C66
C69: (2 * C68) - C67
C70: (2 * C69) - C68
C71: (2 * C70) - C69
C72: (2 * C71) - C70
C73: (2 * C72) - C71
C74: (2 * C73) - C72
C75: (2 * C74) - C73
C76: (2 * C75) - C74
C77: (2 * C76) - C75
C78: (2 * C77) - C76
C79: (2 * C78) - C77
C80: (2 * C79) - C78
C81: (2 * C80) - C79
C82: (2 * C81) - C80
C83: (2 * C82) - C81
C84: (2 * C83) - C82
C85: (2 * C84) - C83
C86: (2 * C85) - C84
C87: (2 * C86) - C85
C88: (2 * C87) - C86
C89: (2 * C88) - C87
C90: (2 * C89) - C88
C91: (2 * C90) - C89
C92: (2 * C91) - C90
C93: (2 * C92) - C91
C94: (2 * C93) - C92
C95: (2 * C94) - C93
C96: (2 * C95) - C94
C97: (2 * C96) - C95
C98: (2 * C97) - C96
C99: (2 * C98) - C97
C100: (2 * C99) - C98
A = (2, 1)
n = 20 (slider from 1 to 100, step 1)
B = (2, 5)
u = Vector(A, B)
B65: 7 / C65
A2 = 0.5
A3 = 0.6
B7: 5 / C7
A59: C59 / (C59 + 4)
A6: C6 / (C6 + 4)
A10: C10 / (C10 + 4)
A11: C11 / (C11 + 4)
A13: C13 / (C13 + 4)
A17: C17 / (C17 + 4)
A19: C19 / (C19 + 4)
A23: C23 / (C23 + 4)
A29: C29 / (C29 + 4)
A31: C31 / (C31 + 4)
A37: C37 / (C37 + 4)
A41: C41 / (C41 + 4)
A43: C43 / (C43 + 4)
A53: C53 / (C53 + 4)
A4 = 0.55
A14: C14 / (C14 + 4)
A54 = 0.57
A61: C61 / (C61 + 4)
A67: C67 / (C67 + 4)
A71: C71 / (C71 + 4)
A73: C73 / (C73 + 4)
A79: C79 / (C79 + 4)
A83: C83 / (C83 + 4)
A89: C89 / (C89 + 4)
A97: C97 / (C97 + 4)
A8 = 0.6
A12 = 0.65
A18 = 0.55
A24 = 0.61
A15 = 0.6
A16 = 0.6
A20 = 0.68
A21 = 0.7
A22 = 0.7
A25 = 0.6
A27 = 0.6
A26 = 0.7
A28 = 0.7
A30 = 0.7
A33 = 0.73
A32 = 0.56
A34 = 0.73
A35 = 0.7
A36 = 0.58
A38 = 0.72
A39 = 0.8
A40 = 0.65
A42 = 0.7
A44 = 0.77
A45 = 0.68
A47: C47 / (C47 + 4)
A46 = 0.75
A48 = 0.6
A49 = 0.75
A50 = 0.6
A51 = 0.84
A5 = 0.6
A7 = 0.66
A9 = 0.66
A52 = 0.8
A55 = 0.7
A56 = 0.65
A57 = 0.75
A58 = 0.8
A60 = 0.66
A62 = 0.8
A63 = 0.7
A64 = 0.55
A65 = 0.8
A66 = 0.8
A68 = 0.8
A69 = 0.85
A70 = 0.7
A72 = 0.55
A74 = 0.85
A75 = 0.66
A76 = 0.77
A77 = 0.8
A78 = 0.8
A80 = 0.65
A81 = 0.55
A82 = 0.77
A84 = 0.75
A85 = 0.85
A86 = 0.85
A87 = 0.85
A88 = 0.67
A90 = 0.7
A91 = 0.8
A92 = 0.85
A93 = 0.85
A94 = 0.85
A95 = 0.85
A98 = 0.75
A99 = 0.75
A100 = 0.66
A96 = 0.6
listafactores = PrimeFactors(n)
matrizfactores = Factors(n)
cuatros = If(Element[matrizfactores, 1, 1] ≟ 2, floor(Element[matrizfactores, 1, 2] / 2), 0)
doses = If(Element[matrizfactores, 1, 1] ≟ 2, Mod[Element[matrizfactores, 1, 2], 2], 0)
listamodificada = Join({Sequence[4, i, 1, cuatros], Sequence[2, i, 1, doses], KeepIf[x ≠ 2, listafactores]})
LL = Length(listamodificada)
i = Element(listamodificada, 1)
j = Element(listamodificada, 2)
r_1 = Element(A2:A100, n - 1)
D2 = 0.1
D3 = 0.1
D4 = 0.1
D5 = 0.1
D6 = 0.75
D7 = 0.1
D8 = 0.6
D9 = 0.55
D10 = 0.5
D11 = 0.1
D12 = 0.45
D13 = 0.2
D14 = 0.4
D15 = 0.35
D16 = 0.4
D17 = 0.4
D18 = 0.1
D19 = 0.2
D20 = 0.3
D21 = 0.3
D22 = 0.3
D23 = 0.1
D24 = 0.14
D25 = 0.27
D26 = 0.27
D27 = 0.13
D28 = 0.26
D29 = 0.2
D30 = 0.07
D31 = 0.2
D32 = 0.13
D33 = 0.22
D34 = 0.22
D35 = 0.22
D36 = 0.11
D37 = 0.2
D38 = 0.21
D39 = 0.21
D40 = 0.1
D41 = 0.2
D42 = 0.06
D43 = 0.2
D44 = 0.19
D45 = 0.09
D46 = 0.19
D47 = 0.2
D48 = 0.1
D49 = 0.18
D50 = 0.06
D51 = 0.18
D52 = 0.18
D53 = 0.1
D54 = 0.13
D55 = 0.17
D56 = 0.1
D100 = 0.06
D57 = 0.17
D58 = 0.17
D59 = 0.1
D60 = 0.1
D61 = 0.16
D62 = 0.15
D63 = 0.065
D64 = 0.1
D65 = 0.15
D66 = 0.05
D67 = 0.16
D68 = 0.13
D69 = 0.13
D70 = 0.05
D71 = 0.16
D72 = 0.12
D73 = 0.16
D74 = 0.11
D75 = 0.06
D76 = 0.11
D77 = 0.11
D78 = 0.04
D79 = 0.16
D80 = 0.09
D81 = 0.125
D82 = 0.1
D83 = 0.16
D84 = 0.05
D85 = 0.095
D86 = 0.095
D87 = 0.095
D88 = 0.05
D89 = 0.16
D90 = 0.09
D91 = 0.09
D92 = 0.09
D93 = 0.09
D94 = 0.09
D95 = 0.09
D96 = 0.1
D97 = 0.16
D98 = 0.04
D99 = 0.04
r_3 = Element(D2:D100, n - 1)
kk = Element(listamodificada, 3)
E2: D2 / 5
E100 = 0.085
E3: D3 / 5
E4: D4 / 5
E5: D5 / 5
E6: D6 / 5
E7: D7 / 5
E8: D8 / 5
E9: D9 / 5
E10: D10 / 5
E11: D11 / 5
E12: D12 / 5
E13: D13 / 5
E14: D14 / 5
E15: D15 / 5
E16: D16 / 5
E17: D17 / 5
E19: D19 / 5
E20: D20 / 5
E21: D21 / 5
E22: D22 / 5
E23: D23 / 5
E25: D25 / 5
E29: D29 / 5
E33: D33 / 5
E34: D34 / 5
E35: D35 / 5
E37 = 0
E38 = 0.1
E39 = 0
E40 = 0.2
E41 = 0
E42 = 0.2
E43 = 0
E44 = 0.3
E45 = 0.19
E46 = 0.065
E47 = 0.065
E48 = 0.18
E49 = 0.065
E50 = 0.18
E51 = 0.065
E52 = 0.065
E53 = 0.065
E54 = 0.05
E55 = 0.15
E56 = 0.17
E57 = 0.065
E58 = 0.065
E59 = 0.065
E60 = 0.16
E61 = 0.075
E62 = 0.075
E63 = 0.15
E64 = 0.15
E65 = 0.075
E66 = 0.15
E67 = 0.075
E68 = 0.075
E69 = 0.075
E70 = 0.13
E71 = 0.075
E72 = 0.055
E73 = 0.075
E74 = 0.075
E75 = 0.11
E76 = 0.075
E77 = 0.075
E78 = 0.11
E79 = 0.075
E80 = 0.1
E81 = 0.06
E82 = 0.075
E83 = 0.075
E84 = 0.095
E85 = 0.075
E86 = 0.075
E87 = 0.075
E88 = 0.095
E89 = 0.075
E90 = 0.04
E91 = 0.075
E92 = 0.075
E93 = 0.075
E94 = 0.075
E95 = 0.075
E96 = 0.04
E97 = 0.075
E98 = 0.085
E30 = 0.24
E27 = 0.26
E24 = 0.27
E18 = 0.3
E28 = 3
E31 = 0.05
E32 = 0.22
E36 = 0.22
E26 = 0.26
E99 = 0.085
r_4 = Element(E2:E100, n - 1)
NF = Length(listafactores)
G2 = 1
H2 = 0
I2 = 0
I3 = 1
H3 = 0
G3 = 0
G4 = 0
H4 = 0.5
I4 = 0
G5 = 0.5
H5 = 0.5
I5 = 0
G6 = 0.5
H6 = 0
I6 = 0.5
texto1: "" + n + ""
texto2: "" + listafactores + ""
l = Element(listamodificada, 4)
F2: E2 / 5
F3: E3 / 5
F4: E4 / 5
F5: E5 / 5
F6: E6 / 5
F7: E7 / 5
F8: E8 / 5
F9: E9 / 5
F10: E10 / 5
F11: E11 / 5
F12: E12 / 5
F13: E13 / 5
F14: E14 / 5
F15: E15 / 5
F16: E16 / 5
F17: E17 / 5
F18: E18 / 5
F19: E19 / 5
F20: E20 / 5
F21: E21 / 5
F22: E22 / 5
F23: E23 / 5
F24: E24 / 5
F25: E25 / 5
F26: E26 / 5
F27: E27 / 5
F28: E28 / 5
F29: E29 / 5
F30: E30 / 5
F31: E31 / 5
F32: E32 / 5
F33: E33 / 5
F34: E34 / 5
F35: E35 / 5
F36: E36 / 5
F37: E37 / 5
F38: E38 / 5
F39: E39 / 5
F40: E40 / 5
F41: E41 / 5
F42: E42 / 5
F43: E43 / 5
F44: E44 / 5
F45: E45 / 5
F46: E46 / 5
F47: E47 / 5
F48: E48 / 5
F49: E49 / 5
F50: E50 / 5
F51: E51 / 5
F52: E52 / 5
F53: E53 / 5
F56: E56 / 5
F57: E57 / 5
F58: E58 / 5
F59: E59 / 5
F60: E60 / 5
F61: E61 / 5
F62: E62 / 5
F63: E63 / 5
F64: E64 / 5
F65: E65 / 5
F66: E66 / 5
F67: E67 / 5
F68: E68 / 5
F100: E100 / 5
F69: E69 / 5
F70: E70 / 5
F71: E71 / 5
F73: E73 / 5
F74: E74 / 5
F75: E75 / 5
F76: E76 / 5
F77: E77 / 5
F78: E78 / 5
F79: E79 / 5
F80: E80 / 5
F82: E82 / 5
F83: E83 / 5
F84: E84 / 5
F85: E85 / 5
F86: E86 / 5
F87: E87 / 5
F88: E88 / 5
F89: E89 / 5
F91: E91 / 5
F92: E92 / 5
F93: E93 / 5
F94: E94 / 5
F95: E95 / 5
F97: E97 / 5
F98: E98 / 5
F54 = 0.17
F55 = 0.02
F72 = 0.12
F81 = 0.1
F90 = 0.09
F96 = 0.09
F99: E99 / 5
r_5 = Element(F2:F100, n - 1)
B3 = 1.2
B2 = 1.33
B4 = 1
B6 = 0.25
B8 = 0.3
B9 = 0.28
B10 = 0.2
B11 = 0.45
B12 = 0.3
B14 = 0.15
B18 = 0.25
B13 = 0.4
B16 = 0.25
B15 = 0.18
B17 = 0.35
B19 = 0.3
B20 = 0.2
B21 = 0.15
B22 = 0.13
B23 = 0.27
B24 = 0.26
B26 = 0.12
B25 = 0.2
B27 = 0.28
B28 = 0.15
B29 = 0.25
B30 = 0.2
B31 = 0.23
B32 = 0.28
B34 = 0.1
B33 = 0.1
B35 = 0.16
B36 = 0.26
B37 = 0.21
B38 = 0.09
B39 = 0.09
B40 = 0.2
B41 = 0.2
B42 = 0.14
B43 = 0.19
B44 = 0.11
B45 = 0.2
B46 = 0.08
B47 = 0.18
B48 = 0.25
B49 = 0.16
B50 = 0.18
B5 = 0.9
B52 = 0.1
B53 = 0.17
B54 = 0.27
B55 = 0.11
B56 = 0.18
B57 = 0.065
B58 = 0.06
B59 = 0.15
B60 = 0.2
B61 = 0.15
B62 = 0.06
B63 = 0.15
B64 = 0.24
B66 = 0.11
B67 = 0.13
B68 = 0.08
B69 = 0.06
B70 = 0.15
B71 = 0.12
B72 = 0.27
B73 = 0.11
B74 = 0.05
B75 = 0.23
B78 = 0.08
B76 = 0.06
B77 = 0.1
B79 = 0.1
B80 = 0.2
B81 = 0.26
B82 = 0.04
B83 = 0.095
B84 = 0.15
B85 = 0.06
B86 = 0.05
B87 = 0.05
B89 = 0.09
B88 = 0.11
B90 = 0.2
B91 = 0.08
B92 = 0.06
B93 = 0.045
B94 = 0.045
B95 = 0.06
B96 = 0.22
B97 = 0.085
B98 = 0.15
B99 = 0.1
B100 = 0.23
B51 = 0.07
C = (0, 1)
c = Circle(A, C)
r_2 = Element(B2:B100, n - 1)
lista1 = If(LL ≟ 1, Sequence[Circle[A + (r_1 * Rotate[u, ((k * 2) * π / n)]), r_2], k, 1, n])
lista2 = If(LL ≟ 2, Sequence[Sequence[Circle[A + (r_1 * Rotate[u, ((k' * 2) * π / j)]) + (r_2 * Rotate[u, ((k' * 2) * π / j) + ((k * 2) * π / i)]), r_3], k, 1, i], k', 1, j])
lista3 = If(LL ≟ 3, Sequence[Sequence[Sequence[Circle[A + (r_1 * Rotate[u, ((k'' * 2) * π / kk)]) + (r_2 * Rotate[u, ((k'' * 2) * π / kk) + ((k' * 2) * π / j)]) + (r_3 * Rotate[u, ((k'' * 2) * π / kk) + ((k' * 2) * π / j) + ((k * 2) * π / i)]), r_4], k, 1, i], k', 1, j], k'', 1, kk])
lista4 = If(LL ≟ 4, Sequence[Sequence[Sequence[Sequence[Circle[A + (r_1 * Rotate[u, ((k''' * 2) * π / l)]) + (r_2 * Rotate[u, ((k''' * 2) * π / l) + ((k'' * 2) * π / kk)]) + (r_3 * Rotate[u, ((k''' * 2) * π / l) + ((k'' * 2) * π / kk) + ((k' * 2) * π / j)]) + (r_4 * Rotate[u, ((k''' * 2) * π / l) + ((k'' * 2) * π / kk) + ((k' * 2) * π / j) + ((k * 2) * π / i)]), r_5], k, 1, i], k', 1, j], k'', 1, kk], k''', 1, l])
G7 = 0
H7 = 0.3
I7 = 0.3
a = 1 (slider from 0 to 2, step 0.1)
nada = 4.6 (slider from -5 to 5, step 0.1)
CajaDeEntrada1 = Textfield(n)
b = 1 (slider from 0 to 1, step 1)

Tool: Grupo
Centrón, centrín, Nº círculos, razón entre radio y distancia entre centros
Input: Centron, centrin, N, razon
Output: lista1

d = Segment(Centron, centrin)
lista1 = Sequence(Circle[Rotate[centrin, ((2 * k) * 3.141592653589793 / N), Centron], (razon * d)], k, 0, N - 1)