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

A051900 Minimal 2^n safe-primes: a(n) = 2^n*A051886(n) + 1 (a prime number).

Original entry on oeis.org

3, 5, 13, 17, 113, 97, 193, 257, 769, 11777, 13313, 59393, 12289, 40961, 114689, 65537, 2424833, 6946817, 786433, 5767169, 7340033, 23068673, 155189249, 595591169, 1224736769, 167772161, 469762049, 2281701377, 3489660929, 12348030977, 3221225473
Offset: 0

Views

Author

Labos Elemer, Dec 16 1999

Keywords

Comments

Equivalently, a(n) is the smallest prime p such that (p-1)/gpf(p-1) = 2^n where gpf(m) is the greatest prime factor of m, A006530. Subsequence of A074781, primes p such that the ratio (p-1)/gpf(p-1) = 2^k. - Bernard Schott, Dec 14 2020

Examples

			1 + 2^11*A051886(11) = 2048*29 + 1 = 59393 = a(11) is the smallest q prime so that (q-1)/2048 is also a (minimal, generalized Germain-) prime. The 101st term is 2385718429629527733616795432517633 = 1 + (2^101)*941.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B46, p. 154.

Crossrefs

Programs

  • Maple
    alias(pf = NumberTheory:-PrimeFactors): gpf := n -> max(pf(n)):
    a := proc(n) local p, q; q := 2^n; p := 2;
       while (p-1) <> gpf(p-1)*q
       do p := nextprime(p) od;
    p end: seq(a(n), n=0..14); # Peter Luschny, Dec 14 2020
  • Mathematica
    f[n_] := Block[{e = IntegerExponent[n - 1, 2]}, g = (n - 1)/2^e; If[g == 1, e - 1, If[ PrimeQ[g], e, -1]]]; t = Table[0, {50}]; p = 3; While[p < 13000000000, a = f@ p; If[t[[a + 1]] == 0, t[[a + 1]] = p; Print[{a, p}]]; p = NextPrime@ p]; t  (* Robert G. Wilson v, Jun 17 2012 *)
    f[n_] := Block[{k = 1}, While[ !PrimeQ[2^n*Prime[k] + 1], k++]; 2^n*Prime[k] + 1]; Array[f, 32, 0] (* Robert G. Wilson v, Jun 17 2012 *)

Extensions

Name clarified by Joerg Arndt, Jun 18 2012
Offset changed to 0 and a(0) prepended by Amiram Eldar, Feb 28 2025

A084705 Duplicate of A051886.

Original entry on oeis.org

2, 2, 3, 2, 7, 3, 3, 2, 3, 23, 13, 29, 3, 5, 7, 2, 37, 53, 3, 11, 7, 11, 37, 71, 73, 5, 7, 17, 13, 23, 3, 239, 43, 113, 163, 59, 3, 89, 349, 5, 97, 3, 73, 11, 67, 101, 19, 101, 61, 23, 7, 17, 7, 233, 127, 5, 541, 29, 103, 71, 31, 53, 109, 179, 163, 71, 3
Offset: 0

Views

Author

Keywords

A051888 a(n) is the smallest prime p such that p*n! + 1 is prime.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 3, 3, 7, 3, 3, 5, 2, 3, 13, 7, 31, 5, 2, 7, 17, 67, 41, 3, 13, 3, 43, 17, 97, 7, 29, 109, 3, 71, 5, 2, 7, 41, 3, 59, 3, 11, 29, 7, 107, 67, 79, 3, 743, 149, 163, 2, 211, 2, 19, 71, 73, 23, 37, 113, 149, 67, 41, 617, 107, 37, 107, 283, 113, 19, 239, 107, 73, 97, 5
Offset: 0

Views

Author

Labos Elemer, Dec 15 1999

Keywords

Comments

Analogous to or subset of A051686; generalization of A005384.
The PFGW program has been used to certify all the primes corresponding to the terms up to a(1000), using a deterministic test which exploits the factorization of a(n) - 1. - Giovanni Resta, May 30 2018

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[ !PrimeQ[ Prime[k]*n! + 1], k++ ]; Print[ Prime[k]], {n, 1, 75} ]
    spp[n_]:=Module[{p=2,nf=n!},While[!PrimeQ[p*nf+1],p=NextPrime[p]];p]; Array[ spp,80,0] (* Harvey P. Dale, May 17 2019 *)
  • PARI
    a(n) = {my(p=2); while (!isprime(p*n! + 1), p = nextprime(p+1)); p;} \\ Michel Marcus, May 28 2018

Formula

a(n) = (A051901(n)-1)/n!. - Amiram Eldar, Feb 25 2025

Extensions

More terms from James Sellers, Dec 16 1999

A051887 Minimal and special 2k-Germain primes, where 2k is in A002110 (primorial numbers).

Original entry on oeis.org

2, 2, 2, 2, 2, 5, 17, 11, 11, 11, 2, 23, 7, 43, 19, 3, 5, 2, 7, 3, 61, 53, 2, 41, 47, 2, 5, 7, 31, 2, 47, 13, 113, 7, 137, 103, 43, 41, 97, 3, 173, 97, 41, 13, 97, 59, 29, 53, 3, 107, 127, 197, 3, 487, 433, 31, 281, 587, 7, 89, 41, 47, 193, 239, 41, 7, 31, 67
Offset: 1

Views

Author

Labos Elemer, Dec 15 1999

Keywords

Comments

a(n) is the minimal prime p such that primorial(n)*p + 1 is also prime.
While p is in A005384, the primorial(n)*p + 1 primes are in A051902 (primorial-safe primes).
Analogous to or subset of A051686, where the even numbers are 2, 6, ..., A002110(n), ...

Examples

			a(25) = 47 because primorial(25)*47 + 1 is also prime and minimal with this property: primorial(25)*47 + 1 = 47*2305567963945518424753102147331756070 + 1 = 108361694305439365963395800924592535291 is a minimal prime. The first 6 terms (2,2,2,2,2,5) correspond to first entries in A005384, A007693, A051645, A051647, A051653, A051654, respectively.
		

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[! PrimeQ[Product[Prime@ i, {i, n}] p + 1], p = NextPrime@ p]; p, {n, 68}] (* Michael De Vlieger, Jun 29 2017 *)
  • PARI
    a(n) = {my(p = 2, r = vecprod(primes(n))); while(!isprime(p * r + 1), p = nextprime(p+1)); p;} \\ Amiram Eldar, Feb 25 2025

Formula

a(n) = (A051902(n)-1)/A002110(n). - Amiram Eldar, Feb 25 2025

Extensions

More terms from Michael De Vlieger, Jun 29 2017

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
Showing 1-5 of 5 results.