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

A331876 Number of primes of the form P(k) = k^2 + k + 41 for k <= 10^n, where P(k) is Euler's prime-generating polynomial A202018.

Original entry on oeis.org

2, 11, 87, 582, 4149, 31985, 261081, 2208197, 19132653, 168806741, 1510676803
Offset: 0

Views

Author

Hugo Pfoertner, Jan 30 2020

Keywords

Examples

			a(0) = 2 because 41 and 43 are the 2 primes generated for k <= 1 = 10^0.
a(1) = 11 because 41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151 are the 11 primes generated for k <= 10^1, (A202018(10) = 151).
a(3) = 87 because 87 terms of A202018(0..100) are prime. The 14 composites occur for k = A007634(1..14): 40, 41, 44, 49, 56, ...
		

Crossrefs

Programs

  • PARI
    n=0;m=1;for(k=0,10^7,my(j=k^2+k+41);if(isprime(j),n++);if(k==m,m*=10;print1(n,", ")))

A330673 The possible v-factors for any A202018(k) (while A202018(k) = v * w, v and w are integers, w >= v >= 41, v = w iff w = 41, all such v-factors form the set V).

Original entry on oeis.org

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 163, 167, 173, 179, 197, 199, 223, 227, 251, 263, 281, 307, 313, 347, 359, 367, 373, 379, 383, 397, 409, 419, 421, 439, 457, 461, 487, 499, 503, 523, 547, 563, 577, 593, 607, 641, 647, 653, 661, 673, 677, 691, 701, 709, 733
Offset: 0

Views

Author

Sergey Pavlov, Dec 23 2019

Keywords

Comments

This is different from A257362: a(n) = A257362(n+1) for n=0..109, but a(110) = 1468 != 1471 = A257362(111). - Alois P. Heinz, Mar 02 2020
A kind of prime number sieve for the numbers of form x^2+x+41 (for so-called Euler primes, or A005846).
A set of all composite Euler numbers of form x^2+x+41 could be written as a 4-dimensional matrix m(i,j,t,u); a set of all terms of a(n) could be written as a 3-dimensional matrix v(i,j,t), since, for any integer u > -1, and for any w-factor that has the same values for i, j, t, we have the same v-factor (u = -1 iff w = 41); see formulas below.
Theorem. Let m be a term of A202018. Then m is composite iff m == 0 (mod v), where v is a term of a(n), v <= sqrt(m) (v = sqrt(m) iff m = 1681); otherwise, m is prime. Moreover, while m == 0 (mod p) (p is prime, p <= sqrt(m), p = sqrt(m) iff m = 1681), p is a term of a(n).
While i = 1, any v(i,t,j) is a term of both A202018 and a(n) (trivial).
Any w is a term of V and of a(n) which is the superset of V.

Examples

			Let  i = 3, t = 1, j = -1. Then v(i,t,j) = m(j) * i^2 + b + ja = 41 * 3^2 + 4 - 6 = 41 * 9 - 2 = 367, and 367 is a term of a(n).
We could find all terms of a(n) v < 10^n and then all Euler primes p < 10^(2n) (for n > 1, number of all numbers m such that are terms of A202018 (and any m < 10^(2n)) is 10^n; trivial).
Let 2n = 10; it's easy to establish that, while i > 49, any v(i,t,j)^2 > 10^10; thus, we can use 0 < i < 50 to find all numbers v < 10^5. While m is a term of A202018, m < 10^10, m is composite iff there is at least one v such that m == 0 (mod v); otherwise, m is prime. We could easily remove all "false" numbers v that cannot be divisors of any m. Let p' be a regular prime (p' is a term of A000040, but not of a(n)) such that any 3p' < UB(i); in our case, any 3p' < 50. Thus, we could try any v with p' = {2,3,5,7,11,13}; if v == 0 (mod p'), it is "false"; otherwise, there is at least one m < 10^10 such that m == 0 (mod v).
		

Crossrefs

Formula

Let j = {-1;0;-2;1;-3;2;...;-(n+1);n}, m(-1) = 41, m(0) = 41, etc. (while j is negative, m(j) = A202018(-(j+1)); while j is nonnegative, m(j) = A202018(j)). Any term of a(n) could be written at least once as v(i,t+1,j) = m(j) * i^2 + b + ja, where i, t, and j are integers (j could be negative), i > 2; a = (i^2 - 2i) - 2i(t - 1), b = a - ((i^2 - 4)/4 - ((t - 1)^2 + 2(t - 1))), 0 < t < (i/2), while i is even; a = (i^2 - i) - 2i(t - 1), b = a - ((i^2 - 1)/4 - ((t - 1)^2 + (t - 1))), 0 < t < ((i + 1)/2), while i is odd (Note: v(i,1,j) = v(i,i/2,j), while i is even; v(i,1,j) = v(i,(i + 1)/2,j), while i is odd); at i = 2, v(2,1,j) = 4 * m(j) + 3 + 4j (at i = 2, we use only j < 0); at i = 1, v(1,1,j) = m(j) (at i = 1, we use only j >= 0; trivial).

A005846 Primes of the form k^2 + k + 41.

Original entry on oeis.org

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601, 1847, 1933, 2111, 2203, 2297, 2393, 2591, 2693, 2797
Offset: 1

Views

Author

Keywords

Comments

Note that 41 is the largest of Euler's Lucky numbers (A014556). - Lekraj Beedassy, Apr 22 2004
a(n) = A117530(13, n) for n <= 13: a(1) = A117530(13, 1) = A014556(6) = 41, A117531(13) = 13. - Reinhard Zumkeller, Mar 26 2006
The link to E. Wegrzynowski contains the following incorrect statement: "It is possible to find a polynomial of the form n^2 + n + B that gives prime numbers for n = 0, ..., A, A being any number." It is known that the maximum is A = 39 for B = 41. - Luis Rodriguez (luiroto(AT)yahoo.com), Jun 22 2008
Contrary to the last comment, Mollin's Theorem 2.1 shows that any A is possible if the Prime k-tuples Conjecture is assumed. - T. D. Noe, Aug 31 2009
a(n) can be generated by a recurrence based on the gcd in the type of Eric Rowland and Aldrich Stevens. See the recurrence in PARI under PROG. - Mike Winkler, Oct 02 2013
These primes are not prime in O_(Q(sqrt(-163))). Given p = n^2 + n + 41, we have ((2*n + 1)/2 - sqrt(-163)/2)*((2*n + 1)/2 + sqrt(-163)/2) = p, e.g., 1601 = 39^2 + 39 + 41 = (79/2 - sqrt(-163)/2)*(79/2 + sqrt(-163)/2). - Alonso del Arte, Nov 03 2017
From Peter Bala, Apr 15 2018: (Start)
The polynomial P(n) := n^2 + n + 41 takes distinct prime values for the 40 consecutive integers n = 0 to 39. It follows that the polynomial P(n-40) takes prime values for the 80 consecutive integers n = 0 to 79, consisting of the 40 primes above each taken twice. We note two consequences of this fact.
1) The polynomial P(2*n-40) = 4*n^2 - 158*n + 1601 also takes prime values for the 40 consecutive integers n = 0 to 39.
2) The polynomial P(3*n-40) = 9*n^2 - 237*n + 1601 takes prime values for the 27 consecutive integers n = 0 to 26 ( = floor(79/3)). In addition, calculation shows that P(3*n-40) also takes prime values for n from -13 to -1. Equivalently put, the polynomial P(3*n-79) = 9*n^2 - 471*n + 6203 takes prime values for the 40 consecutive integers n = 0 to 39. This result is due to Higgins. Cf. A007635 and A048059. (End)

Examples

			a(39) = 1601 = 39^2 + 39 + 41 is in the sequence because it is prime.
1681 = 40^2 + 40 + 41 is not in the sequence because 1681 = 41*41.
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 225.
  • R. K. Guy, Unsolved Problems Number Theory, Section A1.
  • O. Higgins, Another long string of primes, J. Rec. Math., 14 (1981/2) 185.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 137.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 139, 149.
  • 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 115.

Crossrefs

Intersection of A000040 and A202018; A010051.
Cf. A048059.

Programs

  • GAP
    Filtered(List([0..100],n->n^2+n+41),IsPrime); # Muniru A Asiru, Apr 22 2018
    
  • Haskell
    a005846 n = a005846_list !! (n-1)
    a005846_list = filter ((== 1) . a010051) a202018_list
    -- Reinhard Zumkeller, Dec 09 2011
    
  • Magma
    [a: n in [0..55] | IsPrime(a) where a is n^2+n+ 41]; // Vincenzo Librandi, Apr 24 2018
  • Maple
    for y from 0 to 10 do
    U := y^2+y+41;
    if isprime(U) = true then print(U) end if ;
    end do:
    # Matt C. Anderson, Jan 04 2013
  • Mathematica
    Select[Table[n^2 + n + 41, {n, 0, 59}],PrimeQ] (* Alonso del Arte, Dec 08 2011 *)
  • PARI
    for(n=1,1e3,if(isprime(k=n^2+n+41),print1(k", "))) \\ Charles R Greathouse IV, Jul 25 2011
    
  • PARI
    {k=2; n=1; for(x=1, 100000, f=x^2+x+41; g=x^2+3*x+43; a=gcd(f, g-k); if(a>1, k=k+2); if(a==x+2-k/2, print(n" "a); n++))} \\ Mike Winkler, Oct 02 2013
    

Formula

a(n) = A056561(n)^2 + A056561(n) + 41.

Extensions

More terms from Henry Bottomley, Jun 26 2000

A221712 Hardy-Littlewood constant for x^2+x+41.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 26 2013

Keywords

Examples

			3.31977317747142166532355685764988796646855...
		

References

  • Henri Cohen, Number Theory, Vol II: Analytic and Modern Tools, Springer (Graduate Texts in Mathematics 240), 2007.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 265-266.

Crossrefs

Programs

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

Extensions

More terms from Hugo Pfoertner, Jan 31 2020

A056561 Numbers n such that n^2 + n + 41 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78
Offset: 1

Views

Author

Henry Bottomley, Jun 26 2000

Keywords

Comments

Among first 100000 terms, the only run of 13 subsequent values >39 is 219..231. - Zak Seidov, Jan 28 2009
Number of terms less than 10^n: 1, 10, 86, 581, 4149, 31985, 261081, 2208197, 19132652, ... . - Robert G. Wilson v, Apr 20 2015
Complement of A007634. - Robert Israel, Apr 20 2015

Examples

			39 is in the sequence because 39^2+39+41=1601 which is prime but 40 is not because 40^2+40+41=1681=41*41.
		

References

  • P. Hoffman, Archimedes' Revenge, pp. 39-40,Penguin Books 1988.

Crossrefs

Programs

  • Haskell
    a056561 n = a056561_list !! (n-1)
    a056561_list = filter ((== 1) . a010051' . a202018) [0..]
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Magma
    [n: n in [0..80] |IsPrime(n^2 + n + 41)]; // Vincenzo Librandi, Sep 28 2012
    
  • Maple
    select(t -> isprime(t^2+t+41), [$0..100]); # Robert Israel, Apr 20 2015
  • Mathematica
    Select[Range[80], PrimeQ[#^2 + # + 41] &] (* Vincenzo Librandi, Sep 28 2012 *)
  • PARI
    is(n)=isprime(n^2+n+41) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = (sqrt(4*A005846(n)-163)-1)/2.
a(n) = A002837(n+1)-1. - Robert Price, Nov 08 2019

A145292 Composite numbers generated by the Euler polynomial x^2 + x + 41.

Original entry on oeis.org

1681, 1763, 2021, 2491, 3233, 4331, 5893, 6683, 6847, 7181, 7697, 8051, 8413, 9353, 10547, 10961, 12031, 13847, 14803, 15047, 15293, 16043, 16297, 17071, 18673, 19223, 19781, 20633, 21797, 24221, 25481, 26123, 26447, 26773, 27101, 29111
Offset: 1

Views

Author

Artur Jasinski, Oct 06 2008

Keywords

Comments

The Euler polynomial x^2 + x + 41 gives primes for consecutive x from 0 to 39.
For numbers x for which x^2 + x + 41 is not prime see A007634.
Let P(x)=x^2 + x + 41. In view of identity P(x+P(x))=P(x)*P(x+1), all values of P(x+P(x)) are in the sequence. - Vladimir Shevelev, Jul 16 2012

Crossrefs

Intersection of A002808 and A202018; A010051.

Programs

  • Haskell
    a145292 n = a145292_list !! (n-1)
    a145292_list = filter ((== 0) . a010051) a202018_list
    -- Reinhard Zumkeller, Dec 09 2011
    
  • Mathematica
    a = {}; Do[If[PrimeQ[x^2 + x + 41], null,AppendTo[a, x^2 + x + 41]], {x, 0, 500}]; a
    Select[Table[x^2+x+41,{x,200}],CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 21 2018 *)
  • PARI
    for(n=1,1e3,if(!isprime(t=n^2+n+41),print1(t", "))) \\ Charles R Greathouse IV, Dec 08 2011

Formula

a(n) ~ n^2. [Charles R Greathouse IV, Dec 08 2011]

A060566 a(n) = n^2 - 79*n + 1601.

Original entry on oeis.org

1601, 1523, 1447, 1373, 1301, 1231, 1163, 1097, 1033, 971, 911, 853, 797, 743, 691, 641, 593, 547, 503, 461, 421, 383, 347, 313, 281, 251, 223, 197, 173, 151, 131, 113, 97, 83, 71, 61, 53, 47, 43, 41, 41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601, 1681
Offset: 0

Views

Author

Jason Earls, Apr 11 2001

Keywords

Comments

a(n) is prime for 0 <= n <= 79. a(80) = 1681 = 41^2.
More than the usual number of terms are shown in order to display the initial 80 primes.
First 80 prime entries are palindromically distributed because a(n) = P(x) = x^2 + x + 41, with x = n - 40 and we observe that P(x) generates primes (A005846) for x = 0 through 39, along with the fact that P(-x) = P(x-1). - Lekraj Beedassy, Apr 24 2006

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.
  • C. Stanley Ogilvy and John T. Anderson, Excursions in Number Theory, Dover Publications, NY, 1966, p. 37, 147.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 115.

Crossrefs

Programs

Formula

From Vincenzo Librandi, Feb 27 2017: (Start)
G.f.: (1601 - 3280*x + 1681*x^2)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n) = (n-40)^2 + (n-40) + 41. - Miquel Cerda, Jul 10 2017
E.g.f.: exp(x)*(1601 - 78*x + x^2). - Elmo R. Oliveira, Feb 09 2025

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 16 2007
a(125) in b-file corrected by Andrew Howroyd, Feb 21 2018

A211773 Prime-generating polynomial: a(n) = 2*n^2 - 108*n + 1259.

Original entry on oeis.org

1259, 1153, 1051, 953, 859, 769, 683, 601, 523, 449, 379, 313, 251, 193, 139, 89, 43, 1, -37, -71, -101, -127, -149, -167, -181, -191, -197, -199, -197, -191, -181, -167, -149, -127, -101, -71, -37, 1, 43, 89, 139, 193, 251, 313, 379, 449, 523, 601, 683, 769, 859, 953
Offset: 0

Views

Author

Marius Coman, May 18 2012

Keywords

Comments

This polynomial generates 92 primes (66 distinct ones) for 0 <= n <= 99 (in fact the next two terms are still primes but we keep the range 0-99, customary for comparisons), just three primes less than the record held by Euler's polynomial for n = m - 35, which is m^2 - 69*m + 1231 (see the link below), but having six distinct primes more than this one.
The nonprime terms in the first 100 are: 1 (taken twice), 1369 = 37^2, 1849 = 43^2, 4033 = 37*109, 5633 = 43*131, 7739 = 71*109 and 8251 = 37*223.
For n = 2*m - 34 we obtain the polynomial 8*m^2 - 488*m + 7243, which generates 31 primes in a row starting from m = 0 (polynomial already reported, see the link below).
For n = 4*m - 34 we obtain the polynomial 32*m^2 - 976*m + 7243, which generates 31 primes in row starting from m = 0.
The polynomial 2*n^2 + 40*n + 1, which generates the positive terms of this sequence in ascending order (i.e., a(37), ...), yields 10774009 distinct primes for 0 <= n < 49999999 while Euler's polynomial (n^2 - n + 41) gives 9967520 primes in same range. - Mikk Heidemaa, Feb 23 2016

References

  • Joe L. Mott and Kermite Rose, Prime-Producing Cubic Polynomials in Lecture Notes in Pure and Applied Mathematics (Vol. 220), Marcel Dekker Inc., 2001, pages 281-317.

Crossrefs

Programs

Formula

G.f.: (1259 - 2624*x + 1369*x^2)/(1-x)^3. - Bruno Berselli, May 18 2012
a(n-37) = 2*n^2 + 40*n + 1. - Mikk Heidemaa, Feb 18 2016
From Elmo R. Oliveira, Feb 09 2025: (Start)
E.g.f.: exp(x)*(1259 - 106*x + 2*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

A238242 Primes p such that p^2+p+41 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 113, 131, 137, 139, 149, 151, 157, 167, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 241, 257, 263, 269, 277, 281, 293, 307, 311, 313, 317, 337, 353
Offset: 1

Views

Author

K. D. Bajpai, Feb 20 2014

Keywords

Comments

n^2 + n + 41 is Euler’s prime generating polynomial.
The first 12 terms in the sequence are the first 12 consecutive primes.

Examples

			13 is in the sequence because 13 is prime and 13^2+13+41 = 223 is also prime.
113 is in the sequence because 113 is prime and 113^2+113+41 =  12923 is also prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(400)| IsPrime(p^2+p+41)]; // Vincenzo Librandi, Feb 22 2014
  • Maple
    with(numtheory):KD := proc() local a,b; a:=ithprime(n); b:=a^2+a+41;  if isprime(b) then RETURN (a);  fi; end: seq(KD(), n=1..500);
  • Mathematica
    Select[Prime[Range[200]],PrimeQ[#^2+#+41]&]
  • PARI
    s=[]; forprime(p=2, 1000, if(isprime(p^2+p+41), s=concat(s, p))); s \\ Colin Barker, Feb 20 2014
    

A257362 Odd primes modulo which -163 is a square.

Original entry on oeis.org

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 163, 167, 173, 179, 197, 199, 223, 227, 251, 263, 281, 307, 313, 347, 359, 367, 373, 379, 383, 397, 409, 419, 421, 439, 457, 461, 487, 499, 503, 523, 547, 563, 577, 593, 607, 641, 647, 653, 661, 673, 677, 691
Offset: 1

Views

Author

Robert Israel, Apr 20 2015

Keywords

Comments

Contains A005846. The first members that are not in A005846 are 163 and 167.
Primes that divide some member of A202018.
Primes congruent to x^2 mod 163 for some x, 0 <= x <= 162.
Primes of the form x^2 + xy + 41y^2. Also, primes of the form x^2 - xy + 41y^2 with x and y nonnegative. - Jianing Song, Feb 19 2021

Crossrefs

Programs

  • Maple
    select(p -> isprime(p) and (p=163 or numtheory:-legendre(-163,p)=1), [seq(2*i+1,i=1..1000)]);
    # Another Maple program is given in A296920. - N. J. A. Sloane, Dec 25 2017
  • Mathematica
    Reap[For[p=3, p<1000, p = NextPrime[p], If[p==163 || KroneckerSymbol[-163, p] == 1, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Apr 29 2019 *)
  • PARI
    is(n)=isprime(n) && issquare(Mod(-163,n)) \\ Charles R Greathouse IV, Nov 28 2016

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 28 2016
Showing 1-10 of 24 results. Next