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 A103825 #8 Nov 26 2020 19:23:36 %S A103825 1,4,3,9,5,15,2,8,7,25,11,49,13,21,17,33,19,27,23,39,29,119,31,77,37, %T A103825 35,41,51,43,45,47,55,53,57,59,91,61,65,67,87,71,69,73,93,79,85,83,95, %U A103825 89,63,97,81,101,99,103,75,107,105,109,141,113,115,127,125,131,111,137 %N A103825 Choose a(n) to be the smallest number not yet used such that: a(1) = 1, a(2n) = composite, a(2n+1) = prime and partial sums are alternately prime or composite. %H A103825 Robert Israel, <a href="/A103825/b103825.txt">Table of n, a(n) for n = 1..10000</a> %p A103825 N:= 1000: # for terms before the first term > N %p A103825 Avail:= [$2..N]: %p A103825 A[1]:= 1: T:= 1: %p A103825 for n from 2 while assigned(A[n-1]) do %p A103825 for j from 1 to N+1-n do %p A103825 x:= Avail[j]; %p A103825 if (n::even and isprime(x+T) and not isprime(x)) or %p A103825 (n::odd and isprime(x) and not isprime(x+T)) then %p A103825 A[n]:= x; T:= T+x; %p A103825 Avail:= subsop(j=NULL, Avail); %p A103825 break %p A103825 fi %p A103825 od %p A103825 od: %p A103825 seq(A[i],i=1..n-2); # _Robert Israel_, Nov 26 2020 %Y A103825 Cf. A075593, A075594, A103824. %K A103825 nonn %O A103825 1,2 %A A103825 _Ray Chandler_ Feb 16 2005 %E A103825 Definition corrected by _Zak Seidov_, Feb 20 2005