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

A331942 a(n) = number of primes of the form P(k) = k^2 + 1 <= 10^n as predicted by the Hardy and Littlewood Conjecture F, rounded to nearest integer. The actual number of primes is A083844(n).

Original entry on oeis.org

1, 4, 9, 20, 48, 121, 317, 855, 2356, 6609, 18787, 53970, 156385, 456404, 1340088, 3955219, 11726332, 34903256, 104251560, 312353236, 938461459, 2826668497, 8533343468, 25814350227, 78239112814, 237541788793, 722354115787, 2199893807666, 6708847354653, 20485514756657
Offset: 1

Views

Author

Hugo Pfoertner, Feb 02 2020

Keywords

Comments

Comparison of actual and approximated number of primes < 10^n:
Limit
10^n
| A083844(n)
| | a(n)
| | | (a(n) - A083844(n))/A083844(n)
10^1 2 1 -0.50000
10^2 4 4 0.0
10^3 10 9 -0.10000
10^4 19 20 0.052632
10^5 51 48 -0.058824
10^6 112 121 0.080357
10^7 316 317 0.0031646
10^8 841 855 0.016647
10^9 2378 2356 -0.0092515
10^10 6656 6609 -0.0070613
10^11 18822 18787 -0.0018595
10^12 54110 53970 -0.0025873
10^13 156081 156385 0.0019477
10^14 456362 456404 9.2032E-5
10^15 1339875 1340088 0.00015897
10^16 3954181 3955219 0.00026251
10^17 11726896 11726332 -4.8095E-5
10^18 34900213 34903256 8.7191E-5
10^19 104248948 104251560 2.5055E-5
10^20 312357934 312353236 -1.5040E-5
10^21 938457801 938461459 3.8979E-6
10^22 2826683630 2826668497 -5.3536E-6
10^23 8533327397 8533343468 1.8833E-6
10^24 25814570672 25814350227 -8.5396E-6
10^25 78239402726 78239112814 -3.7054E-6
10^26 237542444180 237541788793 -2.7590E-6
10^27 722354138859 722354115787 -3.1940E-8
10^28 2199894223892 2199893807666 -1.8920E-7

Crossrefs

Programs

  • PARI
    C=0.68640673140912300455609634836350943408916655062787977896811707366392;
    x=1.0;S10=sqrt(10);for(k=1,30,x*=s10;print1(round(C*intnum(y=2,x,1/log(y))),", "))

Formula

b(m) = round (C * Integral_{x=2..m} 1/log(x) dx), with C ~= 0.6864067314..., the Hardy-Littlewood constant for k^2 + 1 (A331941); a(n) = b(10^(n/2)).

A002496 Primes of the form k^2 + 1.

Original entry on oeis.org

2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101, 8837, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 21317, 22501, 24337, 25601, 28901, 30977, 32401, 33857, 41617, 42437, 44101, 50177
Offset: 1

Views

Author

Keywords

Comments

It is conjectured that this sequence is infinite, but this has never been proved.
An equivalent description: primes of form P = (p1*p2*...*pm)^k + 1 where p1..pm are primes and k > 1, since then k must be even for P to be prime.
Also prime = p(n) if A054269(n) = 1, i.e., quotient-cycle-length = 1 in continued fraction expansion of sqrt(p). - Labos Elemer, Feb 21 2001
Also primes p such that phi(p) is a square.
Also primes of form x*y + z, where x, y and z are three successive numbers. - Giovanni Teofilatto, Jun 05 2004
It is a result that goes back to Mirsky that the set of primes p for which p-1 is squarefree has density A, where A = A005596 denotes the Artin constant. More precisely, Sum_{p <= x} mu(p-1)^2 = A*x/log x + o(x/log x) as x tends to infinity. Conjecture: Sum_{p <= x, mu(p-1)=1} 1 = (A/2)*x/log x + o(x/log x) and Sum_{p <= x, mu(p-1)=-1} 1 = (A/2)*x/log x + o(x/log x). - Pieter Moree (moree(AT)mpim-bonn.mpg.de), Nov 03 2003
Also primes of the form x^y + 1, where x > 0, y > 1. Primes of the form x^y - 1 (x > 0, y > 1) are the Mersenne primes listed in A000668(n) = {3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ...}. - Alexander Adamchuk, Mar 04 2007
With the exception of the first two terms {2,5}, the continued fraction (1 + sqrt(p))/2 has period 3. - Artur Jasinski, Feb 03 2010
With the exception of the first term {2}, congruent to 1 (mod 4). - Artur Jasinski, Mar 22 2011
With the exception of the first two terms, congruent to 1 or 17 (mod 20). - Robert Israel, Oct 14 2014
From Bernard Schott, Mar 22 2019: (Start)
These primes are the primitive terms which generate the sequence of integers with only one prime factor and whose Euler's totient is a square: A054755. So this sequence is a subsequence of A054755 and of A039770. Additionally, the terms of this sequence also have a square cototient, so this sequence is a subsequence of A063752 and A054754.
If p prime = n^2 + 1, phi(p) = n^2 and cototient(p) = 1^2.
Except for 3, the four Fermat primes in A019434 {5, 17, 257, 65537}, belong to this sequence; with F_k = 2^(2^k) + 1, phi(F_k) = (2^(2^(k-1)))^2.
See the file "Subfamilies and subsequences" (& I) in A039770 for more details, proofs with data, comments, formulas and examples. (End)
In this sequence, primes ending with 7 seem to appear twice as often as primes ending with 1. This is because those with 7 come from integers ending with 4 or 6, while those with 1 come only from integers ending with 0 (see De Koninck & Mercier reference). - Bernard Schott, Nov 29 2020
The set of odd primes p for which every elliptic curve of the form y^2 = x^3 + d*x has order p-1 over GF(p) for those d with (d,p)=1 and d a fourth power modulo p. - Gary Walsh, Sep 01 2021 [edited, Gary Walsh, Apr 26 2025]

References

  • Jean-Marie De Koninck & Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 211 pp. 34 and 169, Ellipses, Paris, 2004.
  • Leonhard Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 22.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 17.
  • Hugh L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 208.
  • C. Stanley Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 116.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • 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 118.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.

Crossrefs

Cf. A083844 (number of these primes < 10^n), A199401 (growth constant).
Cf. A000668 (Mersenne primes), A019434 (Fermat primes).
Subsequence of A039770.
Cf. A010051, subsequence of A002522.
Cf. A237040 (an analog for n^3 + 1).
Cf. A010051, A000290; subsequence of A028916.
Subsequence of A039770, A054754, A054755, A063752.
Primes of form n^2+b^4, b fixed: A243451 (b=2), A256775 (b=3), A256776 (b=4), A256777 (b=5), A256834 (b=6), A256835 (b=7), A256836 (b=8), A256837 (b=9), A256838 (b=10), A256839 (b=11), A256840 (b=12), A256841 (b=13).
Cf. A030430 (primes ending with 1), A030432 (primes ending with 7).

Programs

  • Haskell
    a002496 n = a002496_list !! (n-1)
    a002496_list = filter ((== 1) . a010051') a002522_list
    -- Reinhard Zumkeller, May 06 2013
    
  • Magma
    [p: p in PrimesUpTo(100000)| IsSquare(p-1)]; // Vincenzo Librandi, Apr 09 2011
    
  • Maple
    select(isprime, [2, seq(4*i^2+1, i= 1..1000)]); # Robert Israel, Oct 14 2014
  • Mathematica
    Select[Range[100]^2+1, PrimeQ]
    Join[{2},Select[Range[2,300,2]^2+1,PrimeQ]] (* Harvey P. Dale, Dec 18 2018 *)
  • PARI
    isA002496(n) = isprime(n) && issquare(n-1) \\ Michael B. Porter, Mar 21 2010
    
  • PARI
    is_A002496(n)=issquare(n-1)&&isprime(n) \\ For "random" numbers in the range 10^10 and beyond, at least 5 times faster than the above. - M. F. Hasler, Oct 14 2014
    
  • Python
    # Python 3.2 or higher required
    from itertools import accumulate
    from sympy import isprime
    A002496_list = [n+1 for n in accumulate(range(10**5),lambda x,y:x+2*y-1) if isprime(n+1)] # Chai Wah Wu, Sep 23 2014
    
  • Python
    # Python 2.4 or higher required
    from sympy import isprime
    A002496_list = list(filter(isprime, (n*n+1 for n in range(10**5)))) # David Radcliffe, Jun 26 2016

Formula

There are O(sqrt(n)/log(n)) terms of this sequence up to n. But this is just an upper bound. See the Bateman-Horn or Wolf papers, for example, for the conjectured for what is believed to be the correct density.
a(n) = 1 + A005574(n)^2. - R. J. Mathar, Jul 31 2015
Sum_{n>=1} 1/a(n) = A172168. - Amiram Eldar, Nov 14 2020
a(n+1) = 4*A001912(n)^2 + 1. - Hal M. Switkay, Apr 03 2022

Extensions

Formula, reference, and comment from Charles R Greathouse IV, Aug 24 2009
Edited by M. F. Hasler, Oct 14 2014

A215047 Number of primes of the form 1 + b^2 for 1 < b < 10^n.

Original entry on oeis.org

3, 18, 111, 840, 6655, 54109, 456361, 3954180, 34900212, 312357933, 2826683629, 25814570671, 237542444179, 2199894223891
Offset: 1

Views

Author

Henryk Dabrowski, Aug 01 2012

Keywords

Comments

Primes 1 + b^2 are a form of generalized Fermat primes.
It is conjectured that a(n) is asymptotic to 0.6864067*li(10^n).

Examples

			a(1) = 3 because the only generalized Fermat primes F_1(b) where b < 10^1 are the primes: 5, 17, 37.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[2,10^n-1]^2 + 1, PrimeQ]], {n, 5}] (* T. D. Noe, Aug 02 2012 *)
  • PARI
    a(n) = sum(b=1,10^n/2-1,isprime((2*b)^2+1))

Formula

a(n) = A083844(2*n) - 1.

Extensions

a(13)-a(14) from Jinyuan Wang, Feb 23 2020

A206709 Number of primes of the form b^2 + 1 for b <= 10^n.

Original entry on oeis.org

5, 19, 112, 841, 6656, 54110, 456362, 3954181, 34900213, 312357934, 2826683630, 25814570672, 237542444180, 2199894223892
Offset: 1

Views

Author

Michel Lagneau, Feb 13 2012

Keywords

Comments

Conjecture: The number of primes of the form b^2 + 1 and less than n is asymptotic to 3*n/(4*log(n)).
Examples:
n = 10^3, a(n) = 112 and 3*10^3/(4*log(10^3)) = 108.573...;
n = 10^4, a(n) = 841 and 3*10^4/(4*log(10^4)) = 814.302...;
n = 10^10, a(n) = 312357934 and 3*10^10/(4*log(10^10)) = 325720861.42...
a(n) = A083844(2*n), but not always! The only known exception to this rule is at n = 1. - Arkadiusz Wesolowski, Jul 21 2012
From Jacques Tramu, Sep 14 2018: (Start)
In the table below, K = 0.686413 and pi(10^n) = A000720(10^n):
.
n a(n) K*pi(10^n)
== =========== ===========
1 5 3
2 19 17
3 112 115
4 841 843
5 6656 6584
6 54110 53882
7 456362 456175
8 3954181 3954737
9 34900213 34902408
10 312357934 312353959
11 2826683630 2826686358
12 25814570672 25814559712
(End)
For a comparison with the estimate that results from the Hardy and Littlewood Conjecture F, see A331942. - Hugo Pfoertner, Feb 03 2020

Examples

			a(2) = 19 because there are 19 primes of the form b^2 + 1 for b less than 10^2: 2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101 and 8837.
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 264.

Crossrefs

Programs

  • Maple
    for n from 1 to 9 do : i:=0:for m from 1 to 10^n do:x:=m^2+1:if type(x,prime)=true then i:=i+1:else fi:od: printf ( "%d %d \n",n,i):od:
  • Mathematica
    1 + Accumulate@ Array[Count[Range[10^(# - 1) + 1, 10^#], ?(PrimeQ[#^2 + 1] &)] &, 7] (* _Michael De Vlieger, Sep 18 2018 *)
  • PARI
    a(n)=sum(n=1,10^n,ispseudoprime(n^2+1)) \\ Charles R Greathouse IV, Feb 13 2012
    
  • Python
    from sympy import isprime
    def A206709(n):
        c, b, b2, n10 = 0, 1, 2, 10**n
        while b <= n10:
            if isprime(b2):
                c += 1
            b += 1
            b2 += 2*b - 1
        return c # Chai Wah Wu, Sep 17 2018

Extensions

a(11)-a(12) from Arkadiusz Wesolowski, Jul 21 2012
a(13)-a(14) from Jinyuan Wang, Feb 24 2020

A331941 Hardy-Littlewood constant for the polynomial x^2 + 1.

Original entry on oeis.org

6, 8, 6, 4, 0, 6, 7, 3, 1, 4, 0, 9, 1, 2, 3, 0, 0, 4, 5, 5, 6, 0, 9, 6, 3, 4, 8, 3, 6, 3, 5, 0, 9, 4, 3, 4, 0, 8, 9, 1, 6, 6, 5, 5, 0, 6, 2, 7, 8, 7, 9, 7, 7, 8, 9, 6, 8, 1, 1, 7, 0, 7, 3, 6, 6, 3, 9, 2, 1, 1, 1, 3, 3, 5, 8, 6, 8, 5, 1, 1, 5, 8, 6, 3, 8, 5, 9
Offset: 0

Views

Author

Hugo Pfoertner, Feb 02 2020

Keywords

Examples

			0.686406731409123004556096348363509434089166550627879778968117...
		

References

  • Henri Cohen, Number Theory, Vol II: Analytic and Modern Tools, Springer (Graduate Texts in Mathematics 240), 2007.
  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 85.

Crossrefs

Programs

  • PARI
    \\ See Belabas, Cohen link. Run as HardyLittlewood2(x^2+1)/2 after setting the required precision.

Formula

Equals (1/2)*Product_{p=primes} (1 - Kronecker(-4,p)/(p - 1)).
Equals A199401/2.

A083849 a(n) is the largest prime of the form x^2 + 1 <= 2^n.

Original entry on oeis.org

2, 2, 5, 5, 17, 37, 101, 197, 401, 677, 1601, 3137, 8101, 15877, 32401, 62501, 122501, 246017, 512657, 1020101, 2073601, 4137157, 8386817, 16695397, 33339077, 66977857, 133772357, 268304401, 536663557, 1073610757, 2146098277
Offset: 1

Views

Author

Harry J. Smith, May 05 2003

Keywords

Comments

It is conjectured that this sequence is increasing, but this has never been proved.
It is easily shown that all terms greater than 5 end in 1 or 7.

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 17.
  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 190.

Crossrefs

Programs

  • PARI
    a(n) = my(last = 2^n+1); while ((p = precprime(last-1)) && (! issquare(p-1)), last = p;); p \\ Michel Marcus, Jun 14 2013
    
  • PARI
    a(n)=my(k=sqrtint(2^n-1)); while(!isprime(k^2+1), k--); k^2+1 \\ Charles R Greathouse IV, Nov 29 2013

A083847 a(n) = number of primes of the form x^2 + 1 <= 2^n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 14, 18, 24, 33, 42, 54, 70, 91, 114, 158, 212, 293, 393, 539, 713, 957, 1301, 1792, 2459, 3378, 4615, 6233, 8418, 11540, 15867, 21729, 29843, 41169, 56534, 77697, 106787, 147067, 203025, 280340, 387308, 535153, 739671, 1023655, 1416635, 1960813, 2716922, 3764693, 5218926, 7238715
Offset: 1

Views

Author

Harry J. Smith, May 05 2003

Keywords

Comments

It is conjectured that the number of primes of the form x^2+1 is infinite and thus this sequence does not become a constant, but this has never been proved.

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 17.
  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 190.

Crossrefs

Programs

  • PARI
    a(n) = my(nb = 0); forprime(p=2, 2^n, if (issquare(p-1), nb++);); nb  \\ Michel Marcus, Jun 14 2013

Extensions

More terms from Alexander D. Healy, Feb 06 2005

A199401 Decimal expansion of constant Product_{p>=3} (1 - (-1)^((p-1)/2)/(p-1)). Hardy-Littlewood constant of x^2 + 1.

Original entry on oeis.org

1, 3, 7, 2, 8, 1, 3, 4, 6, 2, 8, 1, 8, 2, 4, 6, 0, 0, 9, 1, 1, 2, 1, 9, 2, 6, 9, 6, 7, 2, 7, 0, 1, 8, 8, 6, 8, 1, 7, 8, 3, 3, 3, 1, 0, 1, 2, 5, 5, 7, 5, 9, 5, 5, 7, 9, 3, 6, 2, 3, 4, 1, 4, 7, 3, 2, 7, 8, 4, 2, 2, 2, 6, 7, 1, 7, 3, 7, 0, 2, 3, 1, 7, 2, 7, 7, 1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 05 2011

Keywords

Comments

Arises in studying A002496.
The constant is Product_{primes p} (1-chi(p)/(p-1)) where chi is the Dirichlet character A101455. Its Euler expansion is (1/(L(m=4,r=2,s=1)* zeta(m=4,n=3,s=2)) *Product_{s>=2} zeta(m=4,n=1,s)^gamma(s), where L and zeta are the functions tabulated in arXiv:1008.2547 and gamma is the sequence A001037. In particular L(m=4,r=2,s=1) = A003881 and zeta(m=4,n=1,s=2)=A175647. - R. J. Mathar, Nov 29 2011

Examples

			1.372813462818246009112192696727...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 85.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 264.

Crossrefs

Cf. A002496.
Equals 2*constant given by A331941.

Programs

  • PARI
    \\ See Belabas, Cohen link. Run as HardyLittlewood2(x^2+1) after setting the required precision.

Extensions

Extended title, a(30) and beyond from Hugo Pfoertner, Feb 16 2020

A214452 Number of primes of the form x^4 + 1 less than 10^n.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 13, 18, 27, 45, 70, 111, 180, 308, 491, 790, 1319, 2231, 3747, 6396, 10761, 18291, 30947, 52611, 89157, 152514, 260277, 445869, 762919, 1307688, 2246172, 3857544, 6641424, 11440114, 19728780, 34057328, 58834623, 101709014, 176009032, 304766442
Offset: 1

Views

Author

Henryk Dabrowski, Jul 18 2012

Keywords

Comments

It is conjectured that there are infinitely many primes of the form x^4 + 1 (and thus this sequence never becomes constant), but this has not been proved.

Examples

			a(3) = 3 because the only primes of the form x^4 + 1 < 10^3 are the primes: 2, 17, 257.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1,(10^n-1)^(1/4), isprime(k^4+1))

Extensions

More terms from Henryk Dabrowski, Jul 26 2012
a(37)-a(40) from Chai Wah Wu, Oct 13 2018

A214454 Number of primes of the form x^8 + 1 less than 10^n.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 8, 13, 15, 23, 29, 41, 52, 65, 84, 114, 149, 194, 257, 336, 431, 547, 686, 880, 1151, 1478, 1961, 2499, 3258, 4264, 5550, 7231, 9416, 12286, 16031, 20887, 27181, 35466, 46009, 60053, 78107, 102086, 133309, 174369, 227810
Offset: 1

Views

Author

Henryk Dabrowski, Jul 18 2012

Keywords

Comments

It is conjectured that there are infinitely many primes of the form x^8 + 1 (and thus this sequence never becomes constant), but this has not been proved.

Examples

			a(16) = 3 because the only primes of the form x^8 + 1 < 10^16 are the primes: 2, 257, 65537.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1,(10^n-1)^(1/8), isprime(k^8+1))

Extensions

More terms from Henryk Dabrowski, Jul 28 2012
Showing 1-10 of 18 results. Next