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 A167021 #15 Sep 08 2022 08:45:48 %S A167021 1,1,1,0,1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,0,0,1,0,1,1,0, %T A167021 1,0,1,1,0,1,0,0,0,0,1,1,1,0,0,0,1,1,0,0,1,1,0,1,0,0,1,1,1,0,0,1,0,1, %U A167021 0,1,0,1,1,0,0,1,1,0,0,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,0,1 %N A167021 a(n) = 1 iff 6n+1 is prime. %H A167021 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %e A167021 a(3) = 1 because 6*3+1 is prime; %e A167021 a(4) = 0 since 6*4+1 is composite. %t A167021 If[PrimeQ[6#+1],1,0]&/@Range[120] (* _Harvey P. Dale_, Apr 03 2012 *) %o A167021 (PARI) a(n) = isprime(6*n+1); \\ _Michel Marcus_, Jan 19 2019 %o A167021 (Magma) [IsPrime(6*n+1) select 1 else 0:n in [1..105]]; // _Marius A. Burtea_, Oct 06 2019 %Y A167021 Cf. A024899, A167020, A132350. For n < 14, a(n) = A132350(n). %K A167021 nonn %O A167021 1,1 %A A167021 _Washington Bomfim_, Oct 27 2009