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 A292438 #35 Feb 22 2022 00:08:05 %S A292438 1,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,0,0,0,1,1, %T A292438 1,1,1,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0, %U A292438 1,1,1,0,0,0,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1 %N A292438 Characteristic function of non-isolated nonprimes. %C A292438 Non-isolated nonprimes in the sense that at least one of the two adjacent integers is also a nonprime. %H A292438 Antti Karttunen, <a href="/A292438/b292438.txt">Table of n, a(n) for n = 0..65539</a> %H A292438 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %F A292438 a(0)=1, a(1)=1, a(2)=0, a(n) = 1 - A010051(n-((n+1) mod 2)) * A010051(n+((n+1) mod 2)) for n > 2. %F A292438 a(n) = 1 - (pi(n) - pi(n-2))*(pi(n+1) - pi(n-1)), for n>3, where pi = A000720. - _Ridouane Oudra_, Jan 10 2022 %t A292438 a[0] = 1; a[1] = 1; a[2] = 0; a[n_] := 1 - (PrimePi[n - Mod[n + 1, 2]] - PrimePi[n - Mod[n + 1, 2] - 1]) (PrimePi[n + Mod[n + 1, 2]] - PrimePi[n + Mod[n + 1, 2] - 1]); Table[a[n], {n, 0, 100}] %o A292438 (PARI) A292438(n) = if(n<2,1,!isprime(n)&&((!isprime(n-1))||(!isprime(n+1)))); \\ _Antti Karttunen_, Jul 02 2018 %Y A292438 Cf. A000720, A010051, A014574, A141468, A164276. %K A292438 nonn %O A292438 0,1 %A A292438 _Wesley Ivan Hurt_, Mar 31 2018 %E A292438 More terms from _Antti Karttunen_, Jul 02 2018