cp's OEIS Frontend

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.

A196778 a(n) is the number of primes in the form of 4^n+/-4^k+/-1, while 0 <= k < n.

Original entry on oeis.org

1, 3, 5, 6, 7, 7, 9, 8, 9, 12, 7, 9, 4, 4, 8, 11, 6, 11, 7, 8, 14, 7, 8, 11, 6, 10, 9, 8, 8, 11, 6, 10, 13, 7, 6, 9, 10, 8, 8, 10, 5, 10, 15, 6, 11, 9, 14, 7, 8, 16, 12, 10, 5, 10, 9, 8, 10, 8, 7, 10, 11, 13, 12, 6, 12, 9, 4, 10, 12, 13, 8, 14, 7, 2, 13, 7
Offset: 1

Views

Author

Lei Zhou, Oct 06 2011

Keywords

Comments

Conjecture: all elements of this sequence is greater than 0.
Conjecture tested hold up to n=2355. Further test is still running
The Mathematica program gives the first 100 terms.
Terms for all n are tend to be small integers.
4^n+/-4^k+/-1=2^2n+/-2^2k+/-1

Examples

			n=1, 2=4^1-4^0-4^0, 1 prime found, so a(1)=1;
n=2, 11=4^2-4^1-1; 13=4^2-4^1+1; 19=4^2+4^1-1, 3 primes found, so a(2)=3;
...
n=13, 67043329=4^13-4^8+1; 67104769=4^13-4^6+1; 67108859=4^13-4^1-1; 67108879=4^13+4^2-1, 4 primes found, so a(13)=4;
		

Crossrefs

Programs

  • Mathematica
    b = 4; Table[c1 = b^i; cs = {};
    Do[c2 = b^j; cp = c1 + c2 + 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 + c2 - 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 - c2 + 1; If[PrimeQ[cp], cs = Union[cs, {cp}]];
      cp = c1 - c2 - 1;
      If[PrimeQ[cp], cs = Union[cs, {cp}]], {j, 0, i - 1}];
    ct = Length[cs]; ct, {i, 1, 100}]