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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A355975 a(1) = 1. For n >= 2, add to a(n-1) its prime or nonprime index to obtain a(n). 0
 1, 2, 3, 5, 8, 12, 19, 27, 45, 76, 131, 163, 201, 356, 641, 757, 891, 1628, 2998, 5567, 10400, 19526, 36838, 69770, 132623, 145002, 276582, 528994, 1014241, 1948927, 2094369, 4033308, 7781263, 15036531, 29100147, 56394812, 109429140, 212585890, 413435408, 804856919, 846240101 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Two separate indices determine the progress of this sequence, like two parallel scales. What regularities or irregularities in the distribution of primes and nonprimes among the terms may emerge as the sequence grows? LINKS Table of n, a(n) for n=1..41. EXAMPLE Start with 1. As a nonprime, its index is 1. Add up the term and its index to get the next term, 2. This is a prime whose appropriate index is 1. The third term therefore is 2 + 1 = 3. And so on. a(n) Prime index Nonprime index 1 - 1 2 1 - 3 2 - 5 3 - 8 - 4 12 - 7 19 8 - ............................. PROG (PARI) first(n) = { n = max(n, 1); print1(1", "); res = vector(n); res[1] = 1; for(i = 2, n, if(!isprime(res[i-1]), res[i] = 2*res[i-1] - primepi(res[i-1]) , res[i] = res[i-1] + primepi(res[i-1]) ); print1(res[i]", "); ); res } \\ David A. Corneth, Jul 26 2022 CROSSREFS Cf. A000040, A018252. Sequence in context: A055804 A267372 A369696 * A327421 A124062 A274199 Adjacent sequences: A355972 A355973 A355974 * A355976 A355977 A355978 KEYWORD nonn AUTHOR Tamas Sandor Nagy, Jul 26 2022 EXTENSIONS a(14)-a(30) from Thomas Scheuerle, Jul 26 2022 More terms from David A. Corneth, Jul 26 2022 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.

Last modified March 2 08:00 EST 2024. Contains 370461 sequences. (Running on oeis4.)