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.

Showing 1-2 of 2 results.

A130327 Least prime p such that 3*p*2^n-1 and 3*p*2^n+1 are twin primes.

Original entry on oeis.org

2, 2, 5, 3, 5, 2, 11, 3, 19, 17, 5, 113, 59, 317, 331, 307, 241, 2, 829, 23, 149, 127, 11, 3023, 1091, 787, 971, 1523, 2741, 727, 1051, 227, 211, 727, 89, 1163, 71, 367, 1031, 577, 89, 1213, 1151, 3, 1021, 283, 2699, 4933, 59, 647, 709
Offset: 0

Views

Author

Pierre CAMI, May 24 2007

Keywords

Examples

			3*2*2^0-1=5, 3*2*2^0+1=7: 5 and 7 are twin primes so for n=0 p=2.
3*2*2^1-1=11, 3*2*2^1+1=13: 11 and 13 are twin primes so for n=1 p=2.
		

Crossrefs

Programs

  • Mathematica
    lpp[n_]:=Module[{p=2},While[!AllTrue[3p 2^n+{1,-1},PrimeQ],p=NextPrime[p]];p]; Array[lpp,60,0] (* Harvey P. Dale, May 13 2022 *)
  • PARI
    a(n) = my(p=2); while (!(isprime(q=3*p*2^n-1) && isprime(q+2)), p=nextprime(p+1)); p; \\ Michel Marcus, Sep 23 2019

A130326 Least prime p such that 3*p*2^n+1 is prime.

Original entry on oeis.org

2, 2, 3, 3, 2, 2, 3, 2, 19, 5, 5, 2, 5, 11, 3, 47, 7, 2, 11, 19, 47, 11, 11, 59, 97, 11, 23, 5, 11, 2, 31, 13, 37, 3, 53, 2, 71, 5, 5, 97, 2, 7, 3, 3, 5, 167, 41, 37, 5, 163, 23, 73, 31, 17, 59, 19, 29, 41, 73, 43, 59, 47, 71, 3, 109, 2, 11, 3, 79, 41, 13
Offset: 0

Views

Author

Pierre CAMI, May 24 2007

Keywords

Examples

			3*2*2^0+1=7 prime so for n=0 p=2
3*2*2^1+1=13 prime so for n=1 p=2
		

Crossrefs

Programs

  • Mathematica
    nn=100;Flatten[Module[{prs=Prime[Range[nn]],c},Table[c=2^n;Select[prs, PrimeQ[ 3c #+1]&,1],{n,0,nn}]]] (* Harvey P. Dale, Sep 01 2013 *)

Extensions

More terms from Harvey P. Dale, Sep 01 2013
Showing 1-2 of 2 results.