cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A280030 #24 Jul 03 2017 01:54:35
%S A280030 5,9,23,34,139,180,1069,1274,10399,11815,125933,138847,1854341,
%T A280030 2003514,32513171,34639222,667169599,703599332,15783876803,
%U A280030 16518738034,425079924023,442239042120,12891534052099,13348915604303,436194466471661
%N 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.
%C A280030 This is the sequence S_3 mentioned in A141436. The primes and nonprimes alternate.
%p A280030 # See A280028 for Maple program
%t A280030 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 *)
%Y A280030 Cf. A000040, A018252, A141436, A280028, A280029.
%K A280030 nonn
%O A280030 1,1
%A A280030 _N. J. A. Sloane_, Dec 25 2016
%E A280030 a(12)-a(23) from _Chai Wah Wu_, Dec 25 2016
%E A280030 a(24) from _Hans Havermann_, Dec 25 2016
%E A280030 a(25) from _Chai Wah Wu_, Dec 26 2016