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-3 of 3 results.

A329736 Smallest odd prime P such that P*3*2^n - 1 and P*3*2^n + 1 are twin primes.

Original entry on oeis.org

3, 5, 3, 5, 43, 11, 3, 19, 17, 5, 113, 59, 317, 331, 307, 241, 127, 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, 3083, 541, 1483, 2069
Offset: 1

Views

Author

Pierre CAMI, Nov 20 2019

Keywords

Examples

			3*3*2^1 - 1 =  17,  17 and  19 are twin primes so a(1)=3.
5*3*2^2 - 1 =  59,  59 and  61 are twin primes so a(2)=5.
3*3*2^3 - 1 =  71,  71 and  73 are twin primes so a(3)=3.
5*3*2^4 - 1 = 119, 119 and 121 are twin primes so a(4)=5.
		

Crossrefs

Programs

  • Mathematica
    Array[Block[{p = 3}, While[! AllTrue[3 p*2^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 54] (* Michael De Vlieger, Nov 21 2019 *)
  • PARI
    for(n=1,54,my(m=3*2^n);forprime(k=3,oo,my(j=k*m);if(ispseudoprime(j-1)&&ispseudoprime(j+1),print1(k,", ");break))) \\ Hugo Pfoertner, Nov 21 2019
    
  • PARI
    a(n) = my(p=3, q); while (!isprime(q=p*3*2^n - 1) || !isprime(q+2), p = nextprime(p+1)); p; \\ Michel Marcus, May 06 2020

A182029 Least odd k > a(n-1) such that 3*k*2^n-1 is a prime number.

Original entry on oeis.org

1, 5, 7, 9, 15, 25, 31, 33, 35, 45, 47, 49, 59, 65, 91, 115, 127, 135, 137, 149, 165, 175, 183, 185, 217, 225, 245, 273, 279, 287, 303, 349, 359, 429, 433, 445, 457, 525, 577, 593, 599, 629, 641, 673, 675, 679, 727, 749, 775, 795, 835, 855, 973, 1049, 1087
Offset: 1

Views

Author

Pierre CAMI, Apr 07 2012

Keywords

Comments

As n increases a(n)/A000217(n) tends to 0.45.

Crossrefs

Cf. A210651.

Programs

  • Mathematica
    lok[{n_,a_}]:=Module[{k=a+2,c=3*2^n},While[!PrimeQ[c*k-1],k+=2];{n+1,k}]; Drop[NestList[ lok,{1,1},60][[;;,2]],{2}] (* Harvey P. Dale, Sep 12 2023 *)

A182030 Least odd number k such that 3*k*2^n-1 and 3*k*2^n+1 are twin primes.

Original entry on oeis.org

1, 1, 3, 5, 27, 1, 3, 19, 15, 5, 33, 55, 123, 15, 115, 39, 127, 1, 23, 149, 27, 11, 393, 81, 255, 125, 27, 129, 15, 115, 227, 195, 125, 89, 247, 71, 143, 1031, 55, 89, 85, 365, 3, 49, 283, 135, 497, 59, 647, 309, 375, 399, 667, 111, 173, 355, 195, 219, 43, 49
Offset: 1

Views

Author

Pierre CAMI, Apr 07 2012

Keywords

Comments

54% of a(n) for n=1 to 1755 are < 0.1*n^2.

Crossrefs

Cf. A210651.

Programs

  • Mathematica
    lon[n_]:=Module[{k=1,n2=3*2^n},While[!PrimeQ[k*n2-1]||!PrimeQ[k*n2+1], k= k+2];k]; Array[lon,60] (* Harvey P. Dale, Nov 27 2015 *)
Showing 1-3 of 3 results.