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

A075706 Safe primes (A005385) (p and (p-1)/2 are primes) such that 8*p+1 (A023228) is also prime.

Original entry on oeis.org

5, 11, 107, 179, 347, 479, 1187, 1307, 1367, 1487, 1619, 2027, 2207, 2447, 2999, 3119, 3467, 4007, 4079, 4139, 4799, 5087, 5807, 5927, 5939, 6827, 7079, 7247, 8699, 9587, 9839, 10607, 12107, 12539, 12659, 14207, 15299, 16139, 16187, 17027
Offset: 1

Views

Author

Jani Melik, Oct 02 2002

Keywords

Examples

			11 is a prime, so is (11-1)/2=5 and also 8*11+1=89; 107 is a prime, (107-1)/2=53 and 8*107+1=857, ...
		

Crossrefs

Programs

  • Maple
    ts_sg8_var_pras := proc(nmax) local i,tren,atek; tren := 0: for i from 1 to nmax do atek := numtheory[safeprime](i): if (atek > tren) then if (isprime(atek)='true' and isprime(6*atek+1)='true') then tren := atek: fi; fi; od; end: seq(ts_sg8_var_pras(i), i=1..3000);
  • Mathematica
    Select[Prime[Range[2000]],AllTrue[{(#-1)/2,8#+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 31 2020 *)
  • PARI
    forprime(p=3,20000,if(isprime((p-1)/2),if(isprime(8*p+1),print1(p","))))

Extensions

More terms from Ralf Stephan, Mar 19 2003

A051886 a(n) is the minimal prime p such that 2^n * p + 1 is prime.

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, 929, 31, 23, 193, 101
Offset: 0

Views

Author

Labos Elemer, Dec 15 1999

Keywords

Comments

The minimal 2^n - Germain primes in order of increasing exponent n.

Examples

			The 10th term is 13, the first term in 1024-Germain prime sequence: {13,19,37,79,223,...}. The largest prime was found for 2^79: both 1427 and 604462909807314587353088*1427 + 1 = 862568572295037916152856577 are primes.
		

Crossrefs

Programs

  • Mathematica
    Table[p = 2; While[! PrimeQ[2^n*p + 1], p = NextPrime@ p]; p, {n, 0, 71}] (* Michael De Vlieger, Mar 05 2017 *)
  • PARI
    P=10^6;
    default(primelimit,P);
    a(n)={my(N=2^n);forprime(p=2,P,if(isprime(N*p+1),return(p)));}
    vector(66,n,a(n))
    /* Joerg Arndt, Jun 18 2012 */

Formula

a(n) = (A051900(n)-1)/2^n. - Amiram Eldar, Feb 28 2025

Extensions

Better name by Joerg Arndt, Jun 18 2012

A122095 Primes p for which 8*p+1 divides 2^p-1.

Original entry on oeis.org

11, 29, 179, 239, 431, 761, 857, 941, 1367, 1667, 1871, 1877, 2411, 2837, 3041, 3119, 3329, 3347, 3767, 4289, 5021, 5087, 5231, 5261, 5717, 5861, 6449, 6917, 6959, 7079, 7211, 7919, 8429, 8741, 8867, 9341, 9461, 9851, 10211, 10979, 12107, 12437, 12479
Offset: 1

Views

Author

J. Lowell, Oct 17 2006

Keywords

Comments

The first 962 terms, all those with n<500000, are also in A023228. - R. J. Mathar, Oct 20 2006
All terms are in A023228, i.e., such that 8p+1 is prime, since a divisor of 8p+1 would also divide M(p)=A000225(p) and thus be of the form 2kp+1, but it is easily checked that 8p+1 cannot be a multiple of 2p+1 (nor of 4p+1 or 6p+1, of course). - M. F. Hasler, Mar 21 2011

Examples

			29 is in this sequence because 2^29-1 is divisible by 8 * 29 + 1 = 233.
		

Crossrefs

Programs

  • Maple
    isA122095 := proc(n) RETURN( isprime(n) and ( (2^n-1) mod (8*n+1)) = 0 ) ; end: n := 1 : for a from 2 to 500000 do if isA122095(a) then print(n,a) ; n := n+1 ; fi ; od ; # R. J. Mathar, Oct 20 2006
  • Mathematica
    Select[Prime[Range[1500]],Divisible[2^#-1,8#+1]&] (* Harvey P. Dale, Dec 18 2012 *)
    Select[Prime[Range[1500]],PowerMod[2,#,8#+1]==1&] (* Harvey P. Dale, May 28 2015 *)
  • PARI
    forprime( p=1,1e4, Mod(2,p*8+1)^p-1 || print1(p, ", "))

Extensions

More terms from R. J. Mathar, Oct 20 2006

A023347 Primes which remain prime through 5 iterations of function f(x) = 8x + 1.

Original entry on oeis.org

831167, 1154567, 2502767, 3019787, 3675197, 5056577, 6352487, 14519177, 26724377, 43003577, 47378927, 47695607, 56406197, 86332457, 86611757, 99568757, 121967987, 126435527, 127990997, 128149127, 128975057, 145281557, 155715407
Offset: 1

Views

Author

Keywords

Examples

			First chain is {831167, 6649337, 53194697, 425557577, 3404460617, 27235684937};
If p is congruent to {1,3,7,9} mod 10, then consecutive iterates are congruent to {9,5,7,3}, {3,1,7,5}, {5,9,7,1} respectively; so only 10k+7 may remain prime through five iterations, as sequence demonstrates nicely. - _Labos Elemer_, Jul 23 2003
		

Crossrefs

Programs

  • Mathematica
    k=0; m=8; Do[s=Prime[n]; s1=m*s+1; s2=m*s1+1; s3=m*s2+1; s4=m*s3+1; s5=m*s4+1; If[PrimeQ[s]&&PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3]&&PrimeQ[s4]&&PrimeQ[s5], k=k+1; Print[s]], {n, 1, 1000000}]
    it5Q[n_]:=AllTrue[Rest[NestList[8#+1&,n,5]],PrimeQ]; Select[Prime[Range[ 9*10^6]],it5Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 12 2014 *)

Formula

{p, 8p+1, 64p+9, 512p+73, 4096p+585, 32768p+4681} are all primes, where the initial p is prime.
a(n) == 197 (mod 210). - John Cerkan, Nov 04 2016

A075704 p and 12*p+1 are both primes.

Original entry on oeis.org

3, 5, 13, 19, 23, 29, 31, 59, 61, 71, 73, 83, 89, 101, 103, 139, 149, 191, 199, 223, 229, 233, 269, 271, 281, 293, 311, 379, 383, 401, 409, 433, 463, 479, 503, 523, 569, 601, 631, 643, 661, 691, 719, 751, 761, 773, 811, 829, 839, 863, 883, 929, 953, 1009, 1013
Offset: 0

Views

Author

Jani Melik, Oct 02 2002

Keywords

Examples

			5 is a prime and 12*5+1=61 is also a prime. 13 and 12*13+1=157 are both primes...
		

Crossrefs

Programs

  • Maple
    ts_m_sophie_germain_pras := proc(n); if (isprime(n)='true' and isprime(12*n+1)='true') then RETURN(n); fi; end: seq(ts_m_sophie_germain_pras(i), i=1..2030);
  • Mathematica
    Select[Prime[Range[300]],PrimeQ[12#+1]&] (* Harvey P. Dale, Feb 06 2012 *)

A023291 Primes that remain prime through 3 iterations of function f(x) = 8x + 1.

Original entry on oeis.org

2, 1487, 2207, 2927, 8807, 11117, 16187, 17657, 26357, 44927, 45377, 48497, 91757, 110237, 117167, 122327, 125387, 126107, 145007, 170927, 174527, 190787, 193847, 203897, 230567, 244247, 246017, 270287, 280547, 283937, 347957, 362237, 364337
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 8*p+1, 64*p+9 and 512*p+73 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A005123, A023228, and A023260.

Programs

  • Magma
    [n: n in [1..450000] | IsPrime(n) and IsPrime(8*n+1) and IsPrime(64*n+9) and IsPrime(512*n+73)]; // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    okQ[n_]:=And@@PrimeQ[NestList[8#+1&,n,3]]; Select[Prime[Range[50000]],okQ] (* Harvey P. Dale, Jan 09 2011 *)

Formula

a(n) == 17 (mod 30) for n > 1. - John Cerkan, Sep 23 2016

A158014 Primes p such that (p-1)/8 is also prime.

Original entry on oeis.org

17, 41, 89, 137, 233, 569, 809, 857, 1049, 1097, 1193, 1433, 1913, 2153, 2777, 3209, 3449, 3593, 3833, 3929, 4073, 4457, 4793, 4937, 5273, 5417, 6089, 6473, 6569, 6857, 7433, 7529, 7577, 7817, 9209, 9497, 9833
Offset: 1

Views

Author

Roger L. Bagula, Mar 11 2009

Keywords

Crossrefs

Cf. A005385 for (p-1)/2, A090866 for (p-1)/4, A051644 for (p-1)/6, A055781 for (p-1)/10.

Programs

  • Mathematica
    Flatten[Table[If[PrimeQ[n] && PrimeQ[(n - 1)/8], n, {}], {n, 1, 10000}]]
    Select[Prime[Range[1500]], PrimeQ[(# - 1) / 8]&] (* Vincenzo Librandi, Apr 14 2013 *)
  • PARI
    list(lim)=my(v=List()); forprime(p=2,(lim-1)\8, if(isprime(8*p+1), listput(v,8*p+1))); Vec(v) \\ Charles R Greathouse IV, Oct 20 2021

Formula

a(n)=8*A023228(n)+1. - R. J. Mathar, Mar 15 2009
a(n) >> n log^2 n. - Charles R Greathouse IV, Oct 21 2021

Extensions

Edited by the Associate Editors of the OEIS, Apr 22 2009

A228857 Odd primes p > 3 for which 14*p+1 is also prime.

Original entry on oeis.org

5, 17, 47, 53, 59, 83, 107, 113, 149, 167, 173, 239, 269, 353, 419, 443, 449, 503, 509, 563, 587, 599, 647, 659, 677, 719, 797, 827, 929, 947, 977, 983, 1097, 1103, 1109, 1187, 1193, 1223, 1229, 1259, 1289, 1367, 1409, 1427, 1433, 1439, 1493, 1523, 1667
Offset: 1

Views

Author

Ant King, Sep 06 2013

Keywords

Comments

In 1823, Legendre proved that the first case of Fermat’s Last Theorem is true for all exponents that are members of this sequence (see Ribenboim’s reference, p.112).

Examples

			As both 5 and 14*5 + 1 = 71 are prime, then 5 is a member of this sequence.
		

References

  • Paulo Ribenboim; Fermat’s Last Theorem For Amateurs, Springer-Verlag, New York, Inc., (1999).

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(5,2000) |IsPrime(14*p+1)]; // Vincenzo Librandi, Sep 18 2016
    
  • Mathematica
    Select[Prime[Range[3,1667]],PrimeQ[14#+1] &]
  • PARI
    lista(nn) = forprime(p=5, nn, if(isprime(14*p+1), print1(p, ", "))); \\ Altug Alkan, Sep 18 2016
Showing 1-8 of 8 results.