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.
%I A280028 #31 Dec 28 2016 10:05:12 %S A280028 1,2,4,7,12,37,52,239,301,1993,2338,20753,23356,266587,291968,4134187, %T A280028 4446630,75947059,80652283,1625456353,1710094788,39954587527, %U A280028 41737658509,1114336791787,1157634258442,34900173534517,36096139358620,1216553712004063 %N A280028 a(1)=1; thereafter, if n even, a(n) = a(n-1)-st prime, and if n odd, a(n) = a(n-1)-st nonprime. %C A280028 This is the sequence S_1 mentioned in A141436. The primes and nonprimes alternate. %p A280028 P:=n->ithprime(n); %p A280028 # let b1 be a list of the nonprimes (from the b-file for A018252) %p A280028 N:=n->if n<=nops(b1) then b1[n] else 0; fi;; %p A280028 f:=proc(m) local S,n,sw,t; global P,N; %p A280028 S:=[m]; t:=m; %p A280028 if isprime(m) then sw:=1; else sw:=2; fi; %p A280028 if sw=1 then %p A280028 for n from 2 to 60 do %p A280028 if n mod 2 = 0 then t:=N(t); if t=0 then return(S); fi; else t:=P(t); fi; S:=[op(S),t]; %p A280028 od: %p A280028 else %p A280028 for n from 2 to 60 do %p A280028 if n mod 2 = 0 then t:=P(t); else t:=N(t); if t=0 then return(S); fi; fi; S:=[op(S),t]; %p A280028 od: %p A280028 fi; %p A280028 S; %p A280028 end; %p A280028 f(1); # A280028 %p A280028 f(3); # A280029 %p A280028 f(5); # A280030 %t A280028 nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@ n]; a[n_] := If[ OddQ@ n, nonPrime[ a[n -1]], Prime@a[n -1]]; a[1] = 1; Array[a, 26] (* _Robert G. Wilson v_, Dec 28 2016 *) %Y A280028 Cf. A000040, A018252, A141436, A280029, A280030. %K A280028 nonn %O A280028 1,2 %A A280028 _N. J. A. Sloane_, Dec 25 2016 %E A280028 a(13)-a(27) from _Hans Havermann_, Dec 25 2016 %E A280028 a(28) from _Chai Wah Wu_, Dec 26 2016