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!)
A280030 a(1)=5; thereafter, if n odd, a(n) = a(n-1)-st prime, and if n even, a(n) = a(n-1)-st nonprime. 3
5, 9, 23, 34, 139, 180, 1069, 1274, 10399, 11815, 125933, 138847, 1854341, 2003514, 32513171, 34639222, 667169599, 703599332, 15783876803, 16518738034, 425079924023, 442239042120, 12891534052099, 13348915604303, 436194466471661 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is the sequence S_3 mentioned in A141436. The primes and nonprimes alternate.
LINKS
MAPLE
# See A280028 for Maple program
MATHEMATICA
nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; a[n_] := If[OddQ@ n, Prime@ a[n -1], nonPrime[ a[n -1]]]; a[1] = 5; Array[a, 24] (* Robert G. Wilson v, Dec 28 2016 *)
CROSSREFS
Sequence in context: A343803 A194802 A229925 * A074340 A079993 A163607
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 25 2016
EXTENSIONS
a(12)-a(23) from Chai Wah Wu, Dec 25 2016
a(24) from Hans Havermann, Dec 25 2016
a(25) from Chai Wah Wu, Dec 26 2016
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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)