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!)
A114652 a(1)=1. For n>1, a(n) = a(n-1) + (number of terms among {a(1),a(2),...,a(n-1)} which are coprime to n). 1
1, 2, 4, 5, 8, 10, 16, 18, 25, 26, 36, 39, 49, 53, 61, 68, 83, 90, 108, 114, 127, 136, 158, 166, 186, 194, 213, 222, 250, 256, 285, 296, 318, 329, 355, 365, 399, 412, 437, 448, 488, 498, 540, 556, 580, 595, 640, 653, 696, 708, 739, 757, 807, 823, 865, 884, 922 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
Among the first 5 terms of the sequence (1,2,4,5,8) there are 2 terms (1, 5) which are coprime to 6. So a(6) = a(5) + 2 = 10.
MATHEMATICA
f[l_] := Append[l, Last[l] + Length[Select[l, GCD[ #, Length[l] + 1] == 1 &]]]; Nest[f, {1}, 56] (* Ray Chandler, Dec 23 2005 *)
a[1] = 1; a[n_] := a[n] = a[n - 1] + Count[GCD[Array[a, n - 1], n], 1]; Array[a, 57] (* Robert G. Wilson v *)
CROSSREFS
Cf. A114653.
Sequence in context: A180252 A191203 A216686 * A191288 A181666 A067943
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 21 2005
EXTENSIONS
Extended by Ray Chandler and Robert G. Wilson v, Dec 23 2005
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 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)