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 21 results. Next

A005384 Sophie Germain primes p: 2p+1 is also prime.

Original entry on oeis.org

2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, 131, 173, 179, 191, 233, 239, 251, 281, 293, 359, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 719, 743, 761, 809, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1439, 1451, 1481, 1499, 1511, 1559
Offset: 1

Views

Author

Keywords

Comments

Then 2p+1 is called a safe prime: see A005385.
Primes p such that the equation phi(x) = 2p has solutions, where phi is the totient function. See A087634 for another such collection of primes. - T. D. Noe, Oct 24 2003
Subsequence of A117360. - Reinhard Zumkeller, Mar 10 2006
Let q = 2n+1. For these n (and q), the difference of two cyclotomic polynomials can be written as a cyclotomic polynomial in x^2: Phi(q,x) - Phi(2q,x) = 2x Phi(n,x^2). - T. D. Noe, Jan 04 2008
A Sophie Germain prime p is 2, 3 or of the form 6k-1, k >= 1, i.e., p = 5 (mod 6). A prime p of the form 6k+1, k >= 1, i.e., p = 1 (mod 6), cannot be a Sophie Germain prime since 2p+1 is divisible by 3. - Daniel Forgues, Jul 31 2009
Also solutions to the equation: floor(4/A000005(2*n^2+n)) = 1. - Enrique Pérez Herrero, May 03 2012
In the spirit of the conjecture related to A217788, we conjecture that for any integers n >= m > 0 there are infinitely many integers b > a(n) such that the number Sum_{k=m..n} a(k)*b^(n-k) is prime. - Zhi-Wei Sun, Mar 26 2013
If k is the product of a Sophie Germain prime p and its corresponding safe prime 2p+1, then a(n) = (k-phi(k))/3, where phi is Euler's totient function. - Wesley Ivan Hurt, Oct 03 2013
Giovanni Resta found the first Sophie Germain prime which is also a Brazilian number (A125134), 28792661 = 1 + 73 + 73^2 + 73^3 + 73^4 = (11111)73. - _Bernard Schott, Mar 07 2019
For all Sophie Germain primes p >= 5, 2*p + 1 = min(A, B) where A is the smallest prime factor of 2^p - 1 and B the smallest prime factor of (2^p + 1) / 3. - Alain Rocchelli, Feb 01 2023
Consider a pair of numbers (p, 2*p+1), with p >= 3. Then p is a Sophie Germain prime iff (p-1)!^2 + 6*p == 1 (mod p*(2*p+1)). - Davide Rotondo, May 02 2024

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • A. Peretti, The quantity of Sophie Germain primes less than x, Bull. Number Theory Related Topics, Vol. 11, No. 1-3 (1987), pp. 81-92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 76, 227-230.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 83.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Cf. also A000355, A156541, A156542, A156592, A161896, A156660, A156874, A092816, A023212, A007528 (primes of the form 6k-1).
For primes p that remains prime through k iterations of the function f(x) = 2x + 1: this sequence (k=1), A007700 (k=2), A023272 (k=3), A023302 (k=4), A023330 (k=5), A278932 (k=6), A138025 (k=7), A138030 (k=8).

Programs

  • GAP
    Filtered([1..1600],p->IsPrime(p) and IsPrime(2*p+1)); # Muniru A Asiru, Mar 06 2019
    
  • Magma
    [ p: p in PrimesUpTo(1560) | IsPrime(2*p+1) ]; // Klaus Brockhaus, Jan 01 2009
    
  • Maple
    A:={}: for n from 1 to 246 do if isprime(2*ithprime(n)+1) then A:=A union {ithprime(n)} fi od: A:=A; # Emeric Deutsch, Dec 09 2004
  • Mathematica
    Select[Prime[Range[1000]],PrimeQ[2#+1]&]
    lst = {}; Do[If[PrimeQ[n + 1] && PrimeOmega[n] == 2, AppendTo[lst, n/2]], {n, 2, 10^4}]; lst (* Hilko Koning, Aug 17 2021 *)
  • PARI
    select(p->isprime(2*p+1), primes(1000)) \\ In old PARI versions <= 2.4.2, use select(primes(1000), p->isprime(2*p+1)).
    
  • PARI
    forprime(n=2, 10^3, if(ispseudoprime(2*n+1), print1(n, ", "))) \\ Felix Fröhlich, Jun 15 2014
    
  • PARI
    is_A005384=(p->isprime(2*p+1)&&isprime(p));
      {A005384_vec(N=100,p=1)=vector(N,i,until(isprime(2*p+1),p=nextprime(p+1));p)} \\ M. F. Hasler, Mar 03 2020
    
  • Python
    from sympy import isprime, nextprime
    def ok(p): return isprime(2*p+1)
    def aupto(limit): # only test primes
      alst, p = [], 2
      while p <= limit:
        if ok(p): alst.append(p)
        p = nextprime(p)
      return alst
    print(aupto(1559)) # Michael S. Branicky, Feb 03 2021

Formula

a(n) mod 10 <> 7. - Reinhard Zumkeller, Feb 12 2009
A156660(a(n)) = 1; A156874 gives numbers of Sophie Germain primes <= n. - Reinhard Zumkeller, Feb 18 2009
tau(4*a(n) + 2) = tau(4*a(n)) - 2, for n > 1. - Arkadiusz Wesolowski, Aug 25 2012
eulerphi(4*a(n) + 2) = eulerphi(4*a(n)) + 2, for n > 1. - Arkadiusz Wesolowski, Aug 26 2012
A005097 INTERSECT A000040. - R. J. Mathar, Mar 23 2017
Sum_{n>=1} 1/a(n) is in the interval (1.533944198, 1.8026367) (Wagstaff, 2021). - Amiram Eldar, Nov 04 2021
a(n) >> n log^2 n. - Charles R Greathouse IV, Jul 25 2024

A265759 Numerators of primes-only best approximates (POBAs) to 1; see Comments.

Original entry on oeis.org

3, 2, 5, 13, 11, 19, 17, 31, 29, 43, 41, 61, 59, 73, 71, 103, 101, 109, 107, 139, 137, 151, 149, 181, 179, 193, 191, 199, 197, 229, 227, 241, 239, 271, 269, 283, 281, 313, 311, 349, 347, 421, 419, 433, 431, 463, 461, 523, 521, 571, 569, 601, 599, 619, 617
Offset: 1

Views

Author

Clark Kimberling, Dec 15 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a primes-only best approximate (POBA), and we write "p/q in B(x)", if 0 < |x - p/q| < |x - u/v| for all primes u and v such that v < q. Note that for some choices of x, there are values of q for which there are two POBAs. In these cases, the greater is placed first; e.g., B(3) = (7/2, 5/2, 17/5, 13/5, 23/7, 19/7, ...).
See A265772 and A265774 for definitions of lower POBA and upper POBA. In the following guide, for example, A001359/A006512 represents (conjecturally in some cases) the Lower POBAs p(n)/q(n) to 1, where p = A001359 and q = A006512 except for first terms in some cases. Every POBA is either a lower POBA or an upper POBA.
x Lower POBA Upper POBA POBA

Examples

			The POBAs for 1 start with 3/2, 2/3, 5/7, 13/11, 11/13, 19/17, 17/19, 31/29, 29/31, 43/41, 41/43, 61/59, 59/61. For example, if p and q are primes and q > 13, then 11/13 is closer to 1 than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = 1; z = 200; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265759/A265760 *)
    Numerator[tL]   (* A001359 *)
    Denominator[tL] (* A006512 *)
    Numerator[tU]   (* A006512 *)
    Denominator[tU] (* A001359 *)
    Numerator[y]    (* A265759 *)
    Denominator[y]  (* A265760 *)

A005098 Numbers k such that 4k + 1 is prime.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 13, 15, 18, 22, 24, 25, 27, 28, 34, 37, 39, 43, 45, 48, 49, 57, 58, 60, 64, 67, 69, 70, 73, 78, 79, 84, 87, 88, 93, 97, 99, 100, 102, 105, 108, 112, 114, 115, 127, 130, 135, 139, 142, 144, 148, 150, 153, 154, 160, 163, 165, 168, 169, 175, 177, 183
Offset: 1

Views

Author

Keywords

Comments

Sum of i-th and j-th triangular numbers, where i=A096029(n), j=A096030(n); i.e., a(n) = A000217(A096029(n)) + A000217(A096030(n)). - Lekraj Beedassy, Jun 16 2004
For every k in the sequence, there is exactly 1 square number that can be subtracted to leave a pronic (A002378). E.g., 27 - 25 = 2, 99 - 9 = 90. - Jon Perry, Nov 06 2010
See A208295 for details concerning the preceding Jon Perry comment. - Wolfdieter Lang, Mar 29 2012
a(k) appears in the o.g.f. for floor(A002144(k)*j^2/4), j >= 0, for k >= 1: x*(a(k)*(1 + x^2) + b(k)*x)/((1 - x)^3*(1 + x)), together with b(k) = (A002144(k) + 1)/2 = A119681(k). - Wolfdieter Lang, Aug 07 2013

Crossrefs

See A002144 for the actual primes.

Programs

  • Haskell
    a005098 = (`div` 4) . (subtract 1) . a002144
    -- Reinhard Zumkeller, Mar 17 2013
  • Magma
    [k: k in [0..10000] | IsPrime(4*k+1)] // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    a := []; for k from 1 to 500 do if isprime(4*k+1) then a := [op(a), k]; fi; od: A005098 := k->a[k];
  • Mathematica
    Select[Range[200], PrimeQ[4# + 1] &] (* Harvey P. Dale, Apr 20 2011 *)
  • PARI
    is(k)=isprime(4*k+1) \\ Charles R Greathouse IV, Nov 20 2012
    

Formula

a(n) = (A002144(n)-1)/4.

Extensions

More terms from Ray Chandler, Jun 26 2004
Edited by Charles R Greathouse IV, Mar 17 2010

A090866 Primes p == 1 (mod 4) such that (p-1)/4 is prime.

Original entry on oeis.org

13, 29, 53, 149, 173, 269, 293, 317, 389, 509, 557, 653, 773, 797, 1109, 1229, 1493, 1637, 1733, 1949, 1997, 2309, 2477, 2693, 2837, 2909, 2957, 3413, 3533, 3677, 3989, 4133, 4157, 4253, 4349, 4373, 4493, 4517, 5189, 5309, 5693, 5717, 5813, 6173, 6197
Offset: 1

Views

Author

Benoit Cloitre, Feb 12 2004

Keywords

Comments

Same as Chebyshev's subsequence of the primes with primitive root 2, because Chebyshev showed that 2 is a primitive root of all primes p = 4*q+1 with q prime. If the sequence is infinite, then Artin's conjecture ("every nonsquare positive integer n is a primitive root of infinitely many primes q") is true for n = 2. - Jonathan Sondow, Feb 04 2013

References

  • Albert H. Beiler: Recreations in the theory of numbers. New York: Dover, (2nd ed.) 1966, p. 102, nr. 5.
  • P. L. Chebyshev, Theory of congruences. Elements of number theory, Chelsea, 1972, p. 306.

Crossrefs

Programs

  • Magma
    f:=[n: n in [1..2000] | IsPrime(n) and IsPrime(4*n+1)]; [4*f[n] + 1: n in [1..50]]; // G. C. Greubel, Feb 08 2019
    
  • Mathematica
    Select[Prime[Range[1000]], Mod[#, 4]==1 && PrimeQ[(#-1)/4] &] (* G. C. Greubel, Feb 08 2019 *)
  • PARI
    isok(p) = isprime(p) && !frac(q=(p-1)/4) && isprime(q); \\ Michel Marcus, Feb 09 2019

Formula

a(n) = 4*A023212(n) + 1.

A175667 Smallest number m such that phi(m) = n*tau(m), with phi=A000010 and tau=A000005; a(n)=0 if no such m exists.

Original entry on oeis.org

1, 5, 7, 34, 11, 13, 58, 17, 19, 55, 23, 65, 106, 29, 31, 85, 0, 37, 0, 41, 43, 115, 47, 119, 125, 53, 133, 145, 59, 61, 0, 388, 67, 274, 71, 73, 298, 0, 79, 187, 83, 203, 346, 89, 209, 235, 0, 97, 394, 101, 103, 169, 107, 109, 253, 113, 458, 295, 0, 287, 0, 0, 127, 514, 131
Offset: 1

Views

Author

Enrique Pérez Herrero, Aug 05 2010

Keywords

Comments

If p = 2*n+1 is a prime, and if n > 1 then a(n)=p.
From R. J. Mathar, Aug 07 2010: (Start)
First column in the array
1,3,8,10,18,24,30: A020488
5,9,15,28,40,72,84,90,120: A062516
7,21,26,56,70,78,108,126,168,210: A063469
34,45,52,102,140,156,252,360,420: A063470
11,33,88,110,198,264,330,
13,35,39,63,76,104,105,130,228,234,280,312,390,504,540,630,840,
58,98,174,294,
17,51,128,136,170,176,224,260,306,384,408,468,510,528,672,780,1260,
19,57,74,135,152,182,190,222,342,456,546,570,756,1080,
55,82,99,124,165,246,308,350,372,440,792,924,990,1050,1320,
23,69,184,230,414,552,690,
65,117,148,195,238,315,364,380,444,520,684,714,864,936,1092,1140,1170,1560,2520,
... (End)

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range[10^5], EulerPhi@ # == n DivisorSigma[0, #] &] /.
    k_ /; MissingQ@ k -> 0, {n, 120}] (* Michael De Vlieger, Aug 09 2017, Version 10.2 *)

Formula

From Enrique Pérez Herrero, Jan 01 2012: (Start)
If n > 1 then a(n) >= 2*n+1 or a(n)=0.
If p and q = 2*p+1 are both prime, A005384, then a(p) = 2*p+1.
If p > 3 and q = 4*p+1 are both prime, A023212, then a(p) = 8*p + 2 = 2*q.
If p > 2 is prime and both 2*p+1 and 4*p+1 are composite, A043297, then a(n)=0.
(End)

Extensions

More terms from R. J. Mathar, Aug 07 2010
Comment corrected by Enrique Pérez Herrero, Aug 12 2010

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

A043297 Primes p such that B(4*p) has denominator 30 where B(2n) are the Bernoulli numbers.

Original entry on oeis.org

2, 17, 19, 31, 47, 59, 61, 71, 101, 103, 107, 109, 137, 149, 151, 157, 167, 181, 197, 211, 223, 227, 229, 241, 257, 263, 269, 271, 283, 311, 313, 317, 331, 337, 347, 349, 353, 367, 379, 383, 389, 397, 401, 421, 439, 449, 457, 461, 463, 467, 479, 503, 521
Offset: 1

Views

Author

Benoit Cloitre, Mar 24 2002

Keywords

Comments

Complement of A087634, primes p such that phi(k) = 4p has a solution, where phi is Euler's totient function.
The sequences a(n), A005384 and A023212 form a partition of the set of primes > 3: Using von Staudt-Clausen formula the divisors of 4p increased by 1 are {2,3,5,p+1,2p+1,4p+1}, p+1 is clearly an even number, and if 2p+1 and 4p+1 are not prime, then denom(B(4p))=30. - Enrique Pérez Herrero, Aug 15 2011
Also 2 with the primes p such that both 2*p+1 and 4*p+1 are composite: A210684. For these numbers k > 2 the equation: phi(n)=k*tau(n), where phi is A000010 and tau is A000005, has no solutions: A112954(a(n))=0. - Enrique Pérez Herrero, May 12 2012

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100]], Denominator[BernoulliB[4# ]]==30&] (* T. D. Noe, Feb 19 2004 *)
    Select[Prime[Range[100]],!PrimeQ[4#+1]&&!PrimeQ[2#+1]||(#==2)&] (* Enrique Pérez Herrero, Aug 16 2011 *)

A106057 Primes p such that 1*p + 4 and 4*p + 1 are primes.

Original entry on oeis.org

3, 7, 13, 37, 43, 67, 79, 97, 127, 163, 193, 277, 307, 487, 499, 673, 739, 853, 883, 1087, 1093, 1297, 1423, 1429, 1549, 1567, 1579, 1597, 1663, 2293, 2437, 2683, 2953, 3037, 3163, 3457, 3793, 3907, 3943, 4447, 4519, 4729, 4789, 4999, 5503, 5527, 5569, 5653
Offset: 1

Views

Author

Zak Seidov, May 07 2005

Keywords

Crossrefs

Cf. A045536 (primes p such that 1*p + 2 and 2*p + 1 are primes).
Intersection of A023200 and A023212. - Michel Marcus, Jan 20 2018

Programs

  • Magma
    [p: p in PrimesUpTo(100000)| IsPrime(p+4) and IsPrime(4*p+1)]; // Vincenzo Librandi, Nov 13 2010
  • Mathematica
    Select[Prime[Range[220]], PrimeQ[4#+1]&&PrimeQ[1#+4]&]

Extensions

More terms from Vincenzo Librandi, Apr 01 2010

A182265 Number of primes p < 10^n such that 4*p+1 is also prime.

Original entry on oeis.org

2, 9, 31, 176, 1057, 7422, 53709, 407198, 3198946, 25773602, 212205881, 1777532673
Offset: 1

Views

Author

Enrique Pérez Herrero, Apr 22 2012

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Length[Select[Range[10^n], PrimeQ[#] && PrimeQ[4#+1]&]]; Table[f[n], {n,7}]
  • PARI
    a(n)=my(s=0); forprime(p=2,10^n,s+=isprime(4*p+1));s \\ Charles R Greathouse IV, Apr 23 2012

Extensions

a(10)-a(12) from Charles R Greathouse IV, Apr 23 2012

A229966 Numbers n such that A229964(n) = 3.

Original entry on oeis.org

12, 14, 22, 27, 33, 57, 85, 161, 203, 533, 689, 901, 1121, 1633, 2581, 4181, 5513, 5633, 7439, 10561, 18023, 18881, 20833, 21389, 23941, 25043, 28421, 32033, 37733, 48641, 58241, 64643, 66901, 77423, 80033, 84001, 90133, 106439, 116821, 119201, 149189, 155041
Offset: 1

Views

Author

Eric M. Schmidt, Oct 04 2013

Keywords

Comments

Equals {12, 14, 22, 27, 57} UNION {pq | p, q prime, q = 3p+2 or (p >= 5 and q = 4p+1)}.

Crossrefs

Programs

  • Sage
    [p * (3*p+2) for p in prime_range(10000) if (3*p+2).is_prime()] + [p * (4*p+1) for p in prime_range(5, 10000) if (4*p+1).is_prime()] + [12, 14, 22, 27, 57]
Showing 1-10 of 21 results. Next