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 A101264 #47 Sep 08 2022 08:45:16 %S A101264 0,1,1,1,0,1,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,0,1,1,0,0,1, %T A101264 0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0, %U A101264 1,1,0,0,0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0 %N A101264 a(n) = 1 if 2*n + 1 is prime, otherwise a(n) = 0. %C A101264 Inverse Mobius transform of the sequence, after dropping a(0), yields A086668. - _R. J. Mathar_, Jan 25 2009 %C A101264 If we drop a(0) then we may describe the sequence as: for all numbers k(n) [k(n) = 4 ceiling(n/2) + (-1)^n] congruent to -1 or +1 (mod 4) starting with k(n) = {3,5,7,9,11,...}, a(k(n)) is 1 if k(n) is prime and 0 if k(n) is composite. - _Daniel Forgues_, Mar 01 2009 %D A101264 D. H. Lehmer, "Computer Technology Applied to the Theory of Numbers," from Studies in Number Theory, ed. William J. LeVeque. Englewood Cliffs, New Jersey: Prentice Hall (1969): 138. %H A101264 Daniel Forgues, <a href="/A101264/b101264.txt">Table of n, a(n) for n=0..49999</a> %F A101264 a(n) = A057427(A085090(n+1)). - _Reinhard Zumkeller_, Sep 14 2006 %F A101264 For n > 0, a(n) = (2n-1)! mod (2n+1). - _Thomas Ordowski_, Jul 23 2016 %F A101264 a(n) = pi(2*n+1) - pi(2*n), where pi(n) = A000720(n). - _Ridouane Oudra_, Aug 25 2019 %e A101264 a(1) = 1 because 2*1+1 = 3 is prime; %e A101264 a(2) = 1 because 2*2+1 = 5 is prime; %e A101264 a(3) = 1 because 2*3+1 = 7 is prime; %e A101264 a(4) = 0 because 2*4+1 = 9 is composite. %p A101264 with(numtheory): a:= proc(n) if isprime(2*n+1)=true then 1 else 0 fi end: %p A101264 seq(a(n), n=0..80); # _Ridouane Oudra_, Aug 25 2019 %t A101264 Table[If[PrimeQ[2n + 1], 1, 0], {n, 0, 104}] (* _Ray Chandler_, Jan 09 2005 *) %t A101264 Table[Boole[PrimeQ[n]], {n, 1, 209, 2}] (* _Alonso del Arte_, Sep 25 2012 *) %o A101264 (Magma) [IsPrime(2*n+1) select 1 else 0: n in [1..100]]; // _Marius A. Burtea_, Aug 25 2019 %o A101264 (PARI) first(n) = {my(res = vector(n)); forprime(p = 3, 2*n - 1, res[p \ 2] = 1); res} \\ _David A. Corneth_, Aug 25 2019 %Y A101264 Bisection (odd n) of A010051. %Y A101264 Cf. A065091, A063524, A000720. %Y A101264 If we drop a(0), equals absolute value of A156707. - _Daniel Forgues_, Mar 01 2009 %K A101264 easy,nonn %O A101264 0,1 %A A101264 _Giovanni Teofilatto_, Dec 18 2004 %E A101264 Corrected by _Ray Chandler_, Jan 09 2005