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-10 of 250 results. Next

A059452 Safe primes (A005385) that are not Sophie Germain primes.

Original entry on oeis.org

7, 47, 59, 107, 167, 227, 263, 347, 383, 467, 479, 503, 563, 587, 839, 863, 887, 983, 1187, 1283, 1307, 1319, 1367, 1487, 1523, 1619, 1823, 1907, 2027, 2099, 2207, 2447, 2579, 2879, 2999, 3119, 3167, 3203, 3467, 3947, 4007, 4079, 4127, 4139, 4259, 4283
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 7, these primes are congruent to 11 modulo 12.
Terminal primes in complete Cunningham chains of first kind, i.e., the chains cannot be continued from these primes.

Examples

			347 is a term because 173 is a prime but 695 is not.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)/2],If[ !PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
  • PARI
    is(p) = p > 2 && isprime(p) && isprime((p-1)/2) && !isprime(2*p+1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059452_gen(): # generator of terms
        return filter(lambda p:isprime(p>>1) and not isprime(p<<1|1),(prime(i) for i in count(1)))
    A059452_list = list(islice(A059452_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

A156659(a(n))*(1-A156660(a(n))) = 1. - Reinhard Zumkeller, Feb 18 2009

Extensions

Broken link updated by R. J. Mathar, Apr 12 2010

A059456 Unsafe primes: primes not in A005385.

Original entry on oeis.org

2, 3, 13, 17, 19, 29, 31, 37, 41, 43, 53, 61, 67, 71, 73, 79, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 173, 181, 191, 193, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

A010051(a(n))*(1-A156659(a(n))) = 1; subsequence of A156657. - Reinhard Zumkeller, Feb 18 2009
Also, primes p such that p-1 is a non-semiprime. - Juri-Stepan Gerasimov, Apr 28 2010
Conjecture: From the sequence of prime numbers, let 2 and remove the first data iteration of 2*p+1; leave 3 and remove the prime data by the iteration 2*p+1 and we get the sequence. Example for p=2, remove(5,11,23,47); p=3, remove(7); p=13, p=17, p=19, p=23, remove(47); and so on. - Vincenzo Librandi, Aug 07 2010

Examples

			31 is here because (31-1)/2=15 is not prime. 2 and 3 are here because 1/2 and 1 are not prime numbers.
		

Crossrefs

Initial terms for groups in A075712.

Programs

  • Mathematica
    Complement[Prime@ Range@ PrimePi@ Max@ #, #] &@ Select[Prime@ Range@ 90, PrimeQ[(# - 1)/2] &] (* Michael De Vlieger, May 01 2016 *)
    Select[Prime[Range[100]],PrimeOmega[#-1]!=2&] (* Harvey P. Dale, May 13 2018 *)
  • PARI
    is(n)=isprime(n) && !isprime(n\2) \\ Charles R Greathouse IV, May 02 2016

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Dec 29 2024

A059453 Sophie Germain primes (A005384) that are not safe primes (A005385).

Original entry on oeis.org

2, 3, 29, 41, 53, 89, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 2 and 3 these primes are congruent to 5 or 11 modulo 12.
Introducing terms of Cunningham chains of first kind.

Examples

			89 is a term because (89-1)/2 = 44 is not prime, but 2*89 + 1 = 179 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !PrimeQ[(p-1)/2],If[PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
    Select[Prime[Range[300]],PrimeQ[2#+1]&&!PrimeQ[(#-1)/2]&] (* Harvey P. Dale, Nov 10 2017 *)
  • PARI
    is(p) = isprime(p) && isprime(2*p+1) && if(p > 2, !isprime((p-1)/2), 1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059453_gen(): # generator of terms
        return filter(lambda p:not isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))
    A059453_list = list(islice(A059453_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

A156660(a(n))*(1-A156659(a(n))) = 1. - Reinhard Zumkeller, Feb 18 2009

A059327 a(n) is smallest safe prime (A005385) such that a(n) + 12*n is the next safe prime, i.e., x = (a(n) - 1)/2 and x + 6*n are closest Sophie Germain primes.

Original entry on oeis.org

11, 23, 227, 179, 107, 1367, 263, 887, 2099, 719, 587, 8819, 3467, 1019, 10163, 27827, 1619, 7823, 27299, 2207, 44267, 3203, 7247, 5099, 11807, 45887, 18119, 15803, 79559, 13163, 40127, 42839, 20663, 79979, 17483, 53267, 47963, 33863
Offset: 1

Views

Author

Labos Elemer, Jan 26 2001

Keywords

Examples

			{11, 23, 227, 179, 107, ...} are the smallest safe primes such that {11+12, 23+24, 227+36, 179+48, 107+60, ...} = {23, 47, 263, 227, 167, ...} are their next safe primes to which the corresponding Sophie Germain primes are {11, 23, 131, 113, 83, ...} respectively.
		

Crossrefs

Programs

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

Extensions

Offset corrected by Amiram Eldar, Jan 13 2020

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 *)

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

Original entry on oeis.org

5, 7, 11, 23, 47, 83, 107, 263, 347, 467, 503, 863, 887, 1283, 1487, 1823, 1907, 2027, 2063, 2447, 2903, 3203, 3623, 4007, 4127, 4547, 4703, 4787, 5387, 5807, 7523, 7703, 8147, 8423, 11423, 11483, 11807, 12107, 12227, 12647, 12983, 13043, 13163, 14087, 14207
Offset: 1

Views

Author

Jani Melik, Oct 02 2002

Keywords

Examples

			47 is prime, so is (47-1)/2=23 and also 6*47+1=283; 83 is a prime, (83-1)/2=41 and 6*83+1=499, ...
		

Crossrefs

Programs

  • Maple
    ts_sg_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_sg_var_pras(i), i=1..3000);
  • Mathematica
    Select[Range[20000], PrimeQ[#] && PrimeQ[(#-1)/2] && PrimeQ[6#+1] &] (* T. D. Noe, Nov 07 2011 *)
    Select[Prime[Range[1700]],And@@PrimeQ[{(#-1)/2,6#+1}]&] (* Harvey P. Dale, Feb 28 2013 *)

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

A152952 Von Staudt primes which are not safe primes (A005385).

Original entry on oeis.org

239, 443, 647, 659, 827, 1223, 1259, 1499, 1787, 1847, 2087, 2243, 2339, 2687, 2699, 3299, 3659, 3767, 4943, 5903, 6263, 6287, 6299, 6563, 6863, 6959, 7043, 7487, 7583, 7883, 7907, 7919, 8087, 8219, 8243, 8387, 8627, 8663
Offset: 1

Views

Author

Peter Luschny, Dec 25 2008

Keywords

Examples

			239 is a von Staudt prime because the denominator(B(239-1)/(239-1))=239*12, where B(n) is the Bernoulli number, but (239-1)/2=119=7*17 is not a prime.
		

Crossrefs

Programs

  • Maple
    a := proc(n) local k,L; L:= []; for k from 11 by 12 to n do map(i->i+1,divisors(k-1)); select(isprime,%) minus {2,3}; if % = {k} then L := [op(L),k] fi; od; select(isprime,map(i->i+i+1,select(isprime,[$1..iquo(n,2)]))): sort(convert(convert(L,set) minus convert(%,set),list)): end:
  • Mathematica
    vonStaudtPrimeQ[p_?PrimeQ] := Denominator[BernoulliB[p-1]/(p-1)] == 12*p; safePrimeQ[p_?PrimeQ] := PrimeQ[(p-1)/2]; Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[vonStaudtPrimeQ[p] && !safePrimeQ[p], Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Jan 27 2014 *)

A172036 Prime partial sums of safe primes A005385.

Original entry on oeis.org

5, 23, 509, 2267, 9157, 26437, 44357, 55921, 82301, 184843, 276173, 611069, 732271, 757577, 1006559, 1067611, 1195547, 2132113, 2576683, 3243511, 3302393, 4258091, 5530033, 7326931, 7984121, 10518353, 10748449, 10864151, 11096587, 11937257
Offset: 1

Views

Author

Jonathan Vos Post, Jan 23 2010

Keywords

Comments

a(2) = 23 is not only the 3rd partial sum of safe primes, but is itself the 4th safe prime. What are the next safe prime partial sums of safe primes [no more through 66869(41)]?

Examples

			a(1) = 5 = A066869(1) is prime. a(2) = 23 = A066869(3) is prime. a(3) = 2267 = A066869(15) is prime.
		

Crossrefs

Formula

A000040 INTERSECTION A066869 = A000040 INTERSECTION = SUM[i=1..n]A005385 (i) = {p such that p prime and (p-1)/2 prime and p is an element of SUM[i=1..n]{p prime and (p-1)/2 prime}.}.

Extensions

Corrected and extended by Max Alekseyev, Apr 22 2010
Showing 1-10 of 250 results. Next