[go: up one dir, main page]

login
Search: a114718 -id:a114718
     Sort: relevance | references | number | modified | created      Format: long | short | data
Triangle where a(1,1) = 1, a(n,m) = number of terms of row (n-1) which are coprime to m.
+10
5
1, 1, 1, 2, 2, 2, 3, 0, 3, 0, 4, 2, 0, 2, 2, 5, 0, 4, 0, 4, 0, 6, 1, 3, 1, 2, 1, 3, 7, 5, 4, 5, 7, 3, 7, 5, 8, 7, 7, 7, 5, 6, 5, 7, 7, 9, 7, 8, 7, 7, 7, 4, 7, 8, 5, 10, 7, 9, 7, 9, 6, 5, 7, 9, 6, 10, 11, 7, 6, 7, 8, 4, 8, 7, 6, 6, 11, 4, 12, 5, 9, 5, 12, 5, 9, 5, 9, 5, 10, 5, 12, 13, 9, 7, 9, 6, 6, 13, 9, 7
OFFSET
1,4
COMMENTS
GCD(m,0) is considered here to be m, so 0 is coprime to no positive integer but 1.
LINKS
EXAMPLE
Row 6 of the triangle is [5,0,4,0,4,0]. Among these terms there are 6 terms coprime to 1, 1 term coprime to 2, 3 terms coprime to 3, 1 term coprime to 4, 2 terms coprime to 5, 1 term coprime to 6 and 3 terms coprime to 7. So row 7 is [6,1,3,1,2,1,3].
1
1 1
2 2 2
3 0 3 0
4 2 0 2 2
5 0 4 0 4 0
6 1 3 1 2 1 3
7 5 4 5 7 3 7 5
8 7 7 7 5 6 5 7 7
9 7 8 7 7 7 4 7 8 5
MATHEMATICA
f[l_] := Block[{p, t}, p = l[[ -1]]; k = Length[p]; t = Table[ Sum[ If[GCD[p[[j]], n] == 1, 1, 0], {j, k}], {n, k + 1}]; Return[Append[l, t]]; ]; Flatten[Nest[f, {{1}}, 13]] (* Ray Chandler, Dec 24 2005 *)
CROSSREFS
Row sums are in A114718. - Klaus Brockhaus, Jun 01 2009
KEYWORD
nonn,tabl,look
AUTHOR
Leroy Quet, Dec 21 2005
EXTENSIONS
Extended by Ray Chandler, Dec 24 2005
STATUS
approved
a(n) = sum of terms in n-th row of triangle A112592.
+10
2
0, 1, 4, 10, 14, 15, 21, 34, 40, 50, 74, 62, 78, 81, 140, 170, 153, 161, 277, 227, 313, 260, 332, 304, 406, 334, 383, 504, 614, 632, 643, 539, 775, 764, 775, 664, 1003, 974, 1095, 847, 917, 1144, 1230, 1140, 1309, 1203, 1413, 1265, 1438, 1698, 1510, 1035, 1194
OFFSET
1,3
EXAMPLE
The 7th row of triangle A112592 is [6,3,3,3,0,3,3]. So a(7) = 6+3+3+3+0+3+3 = 21.
MATHEMATICA
f[l_] := Block[{p, t}, p = l[[ -1]]; k = Length @ p; t = Table[Count[GCD[p, n], 1], {n, k + 1}]; Return @ Append[l, t]; ]; Plus @@@ Nest[f, {{0}}, 52] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 27 2005
EXTENSIONS
More terms from Robert G. Wilson v, Dec 28 2005
Typos in Mma program corrected by Giovanni Resta, Jun 12 2016
STATUS
approved

Search completed in 0.006 seconds