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 A087032 #10 Oct 09 2018 15:15:41 %S A087032 1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0, %T A087032 0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0, %U A087032 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0 %N A087032 a(n) = 1 if 2*A151800(n) - n is prime, otherwise 0, where A151800(n) is the smallest prime > n. %C A087032 There is no subsequence of two ones; number of zeros in each group is odd, see A087033. %H A087032 Antti Karttunen, <a href="/A087032/b087032.txt">Table of n, a(n) for n = 1..100000</a> %H A087032 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %F A087032 a(n) = 1 if A087030(n) is prime, 0 if it is composite. %F A087032 a(n) = A010051((2*A151800(n))-n). - _Antti Karttunen_, Oct 09 2018 %e A087032 a(1)=1 because the smallest prime > 1 is 2 and 2*2-1=3 is prime. %t A087032 bb={}; Do[bb={bb, If[PrimeQ[2(Prime[PrimePi[n]+1])-n], 1, 0]}, {n, 1000}]; Flatten[bb] %o A087032 (PARI) A087032(n) = isprime((2*nextprime(1+n))-n); \\ _Antti Karttunen_, Oct 09 2018 %Y A087032 Cf. A010051, A087030, A087033, A151800. %K A087032 easy,nonn %O A087032 1,1 %A A087032 _Zak Seidov_, Jul 31 2003 %E A087032 Definition edited by _Antti Karttunen_, Oct 09 2018