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

A051686 Smallest prime p such that 2n*p+1 is also prime.

Original entry on oeis.org

2, 3, 2, 2, 3, 3, 2, 7, 2, 2, 3, 3, 2, 7, 2, 3, 3, 2, 5, 7, 3, 2, 3, 2, 2, 3, 2, 2, 19, 3, 5, 3, 3, 2, 3, 13, 2, 3, 2, 3, 19, 5, 2, 7, 2, 3, 3, 2, 2, 7, 3, 3, 7, 5, 3, 3, 2, 2, 7, 2, 3, 3, 3, 2, 7, 3, 2, 3, 2, 2, 13, 3, 2, 37, 5, 3, 3, 2, 2, 13, 3, 5, 3, 2, 11, 13, 2, 2, 31, 3, 3, 7, 2, 5, 3, 3, 2, 7, 2, 2
Offset: 1

Views

Author

Keywords

Comments

These are the primes arising in A051899.

Examples

			a(29)=19 because 19 is the smallest prime p such that 2*29*p+1 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[2 n Prime@ k + 1], k++]; Prime@ k, {n, 120}] (* Michael De Vlieger, Jul 26 2016 *)
  • PARI
    a(n) = p=2; while(!isprime(2*n*p+1), p = nextprime(p+1)); p; \\ Michel Marcus, Dec 10 2013

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

A051651 Primes of the form 30030*p + 1 where p is a prime.

Original entry on oeis.org

150151, 330331, 390391, 870871, 930931, 1231231, 1411411, 1831831, 2012011, 2372371, 2672671, 3813811, 4174171, 4474471, 5375371, 5435431, 5735731, 5915911, 8078071, 9219211, 10120111, 10420411, 11021011, 11501491, 12642631, 14024011, 14624611, 16246231, 16426411
Offset: 1

Views

Author

Keywords

Comments

Generalization of A005385; can be called 30030-safe primes.
A002110(6)*p + 1 = 30030*p + 1 (prime).

Examples

			390391 is a term because 390391 = 2*3*5*7*11*13*p + 1 is prime, where p = 13.
		

Crossrefs

Programs

  • Mathematica
    Select[30030Prime[Range[100]]+1,PrimeQ] (* Harvey P. Dale, Dec 09 2010 *)
  • PARI
    isok(k) = isprime(k) && k % 30030 == 1 && isprime((k-1)/30030); \\ Amiram Eldar, Feb 24 2025

Formula

a(n) = 30030 * A051654(n) + 1. - Amiram Eldar, Feb 24 2025

A051692 a(n) is twice the smallest k such that A051686(k) = prime(n).

Original entry on oeis.org

2, 4, 38, 16, 170, 72, 446, 58, 512, 282, 178, 148, 758, 856, 836, 1592, 1712, 388, 1906, 2606, 2034, 1918, 656, 5924, 1648, 13082, 652, 1514, 2758, 10922, 5758, 18986, 6764, 10570, 20918, 4936, 8188, 5842, 4094, 30710, 15212, 11482, 57932, 14626, 5624, 36232, 16018, 57874
Offset: 1

Views

Author

Keywords

Comments

The sequence is based on the first 50000 terms of A051686, in which the first 54 primes (2,3,...,251) appear along with 19 others, the largest of which is A051686(37976) = 823.

Examples

			The 25th term in this sequence is 1648. This means that prime(25) = 97 arises in A051686 as A051686(1648/2) = A051686(824). Thus, 1648 is the first term in the sequence {..., 2k, ...} = {1648, 1798, 4108, ...} with the property that 2k*97 + 1 = 194k + 1 is also a prime, moreover the smallest one: 159857.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{p = 2, i = 1}, While[! PrimeQ[2*n*p + 1], p = NextPrime[p]; i++]; i]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 1, i}, While[c < len, i = s[k]; If[i <= len && v[[i]] == 0, v[[i]] = 2*k; c++]; k++]; v]; seq[48] (* Amiram Eldar, Feb 28 2025 *)
  • PARI
    a051686(n) = my(p=2); while(!isprime(2*n*p+1), p = nextprime(p+1)); p;
    a(n) = my(k=1); while(a051686(k) != prime(n), k++); 2*k; \\ Michel Marcus, Jun 08 2018
    
  • PARI
    s(n) = {my(p = 2, i = 1); while(!isprime(2*n*p + 1), p = nextprime(p+1); i++); i;}
    list(len) = {my(v = vector(len), c = 0, k = 1, i); while(c < len, i = s(k); if(i <= len && v[i] == 0, v[i] = 2*k; c++); k++); v;} \\ Amiram Eldar, Feb 28 2025

Extensions

More terms from Michel Marcus, Jun 08 2018
Showing 1-4 of 4 results.