|
Search: id:A122847
|
|
|
| A122847 |
|
a(0)=0. a(n) = a(n-1) + (sum of positive integers which are coprime to n, <= n, and missing from {a(0),a(1),a(2),..,a(n-1)}). |
|
+0 2
|
|
| 0, 1, 1, 3, 3, 9, 14, 31, 43, 69, 76, 118, 141, 206, 235, 280, 331, 440, 493, 637, 704, 829, 926, 1152, 1247, 1470, 1613, 1841, 1996, 2375, 2494, 2932, 3144, 3428, 3656, 4032, 4216, 4824, 5122, 5544, 5820, 6582, 6802, 7647, 8000, 8451, 8870, 9850, 10159
(list; graph; listen)
|
|
|
OFFSET
|
0,4
|
|
|
EXAMPLE
|
The positive integers which are coprime to 8 and <= 8 are 1,3,5,7. Of these, 5 and 7 are missing from the terms a(0) through a(7). So a(8) = a(7) + 5 + 7 = 43.
|
|
MATHEMATICA
|
f[l_List] := Block[{n = Length[l]}, Append[l, l[[ -1]] + Plus @@ Select[Range[n], GCD[n, # ] == 1 && FreeQ[l, # ] &]]]; Nest[f, {0}, 50] (*Chandler*)
s={0, 1}; b=1; Do[ b=b+Total[ Select[ Range[ n ], GCD[ #1, n ]==1&&FreeQ[ s, #1 ]& ] ]; AppendTo[ s, b ], {n, 2, 100} ]; s (*Seidov*)
|
|
CROSSREFS
|
Cf. A122965.
Adjacent sequences: A122844 A122845 A122846 this_sequence A122848 A122849 A122850
Sequence in context: A091328 A138383 A052436 this_sequence A105423 A062510 A000200
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), Oct 23 2006
|
|
EXTENSIONS
|
Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net) and Zak Seidov (zakseidov(AT)yahoo.com), Oct 26 2006
|
|
|
Search completed in 0.002 seconds
|