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.

A059394 Special safe primes (from A005385) such that the next prime is also a safe prime.

Original entry on oeis.org

5, 7, 467, 1307, 2447, 5087, 5927, 12527, 18947, 44687, 55079, 78467, 79943, 83207, 93383, 103007, 105143, 111443, 118787, 128879, 143687, 164987, 196907, 204587, 207227, 208787, 229487, 232823, 236507, 257627, 267143, 275987, 289319, 296159
Offset: 1

Views

Author

Labos Elemer, Jan 29 2001

Keywords

Examples

			For {467,55079,103007,728579,887759,..} safe primes {479,55103,103043,728627,887819} are the next primes, whose differences are 12,24,36,48,60,.. respectively,not necessarily equal to 12, the possible minimum (see A059322).
		

Crossrefs

Programs

  • Mathematica
    ss[x_] := PrimeQ[(Prime[x]-1)/2]&&PrimeQ[(Prime[x+1]-1)/2] t=Prime[Flatten[Position[Table[ss[w], {w, 1, 100000}], True]]]

A059395 Smaller of safe prime twins: special safe primes (A005385) p such that the next prime is also the next safe prime and is p+12, i.e., occurs at the closest possible distance, 12.

Original entry on oeis.org

467, 1307, 2447, 5087, 5927, 12527, 18947, 44687, 78467, 83207, 118787, 143687, 164987, 196907, 204587, 207227, 208787, 229487, 236507, 257627, 275987, 297707, 330887, 339827, 367007, 369647, 394007, 454907, 458807, 474347, 534827, 536087
Offset: 1

Views

Author

Labos Elemer, Jan 29 2001

Keywords

Examples

			The pairs (5,7) and (7,11) are omitted, albeit are both consecutive primes and consecutive safe primes, however their distances (2 and 4) are singular. Cases [467, 439] and [20738027, 20738039] are pairs are both consecutive of consecutive primes and consecutive safe primes in minimal distance=12. The corresponding twins of Sophie Germain primes are [233, 239] or [1369013, 1369019] in distance 6.
		

Crossrefs

Programs

  • Mathematica
    safeQ[p_] := PrimeQ[(p-1)/2]; seq={}; c=0; p1 = p2 = 11; q1 = safeQ[p1]; While[c < 30, p2 = NextPrime[p2]; q2 = safeQ[p2]; If[q1 && q2 && p2 == p1 + 12, c++; AppendTo[seq, p1]]; p1 = p2; q1 = q2]; seq (* Amiram Eldar, Jan 13 2020 *)

A274381 Safe primes p such that p + 24 is also a safe prime.

Original entry on oeis.org

23, 59, 83, 359, 479, 563, 839, 863, 1283, 2039, 2879, 2999, 3779, 4259, 4679, 5483, 7703, 10079, 12203, 13103, 23603, 26903, 27803, 30323, 31583, 33623, 35339, 41519, 43403, 44519, 44939, 53759, 55079, 57119, 57899, 58043, 65123, 66359, 70139, 70199, 76379, 77723, 79943
Offset: 1

Views

Author

Keywords

Examples

			83 is a safe prime and so is 83 + 24 = 107.
4679 is a safe prime and so is 4679 + 24 = 4703.
		

Crossrefs

Programs

  • Maple
    A274381:=n->`if`(type((n-1)/2, prime) and isprime(n+24) and isprime(n) and type((n+23)/2, prime), n, NULL): seq(A274381(n), n=1..10^5); # Wesley Ivan Hurt, Jun 25 2016
  • Mathematica
    Select[Prime@ Range[10^4], PrimeQ[(# - 1)/2] && PrimeQ[# + 24] && PrimeQ[(23 + #)/2] &] (* Giovanni Resta, Jun 23 2016 *)
    Select[Prime[Range[8000]],AllTrue[{(#-1)/2,(#+23)/2,#+24},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 31 2019 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if (isprime((p-1)/2) && isprime(q=p+24) && isprime((q-1)/2), print1(p, ", "))); \\ Michel Marcus, Jun 23 2016

Formula

{ x | both x and x + 24 are safe primes }.
Showing 1-3 of 3 results.