login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)}). 1
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; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
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] (* Ray Chandler, Oct 26 2006 *)
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.
Sequence in context: A052436 A243790 A267296 * A197462 A264098 A223209
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 23 2006
EXTENSIONS
Extended by Ray Chandler and Zak Seidov, Oct 26 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)