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

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

A202018 a(n) = n^2 + n + 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, 1681, 1763, 1847, 1933, 2021, 2111, 2203, 2297, 2393
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 08 2011

Keywords

Comments

Euler's famous prime-generating polynomial; a(0) through a(39) are all prime.

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 225.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 138-139, 145.

Crossrefs

Programs

Formula

a(n) = A005846(n) for n < 41, a(41) = A145292(1);
Union of A005846 (primes) and A145292 (composites);
a(n) = A002378(n) + 41.
a(a(n) + n) = a(n)*a(n+1). - Vladimir Shevelev, Jul 16 2012 (This identity holds for all sequences of the form n^2 + n + c, Joerg Arndt, Jul 17 2012).
a(0) = 41 and for n > 0, a(n) = a(n-1) + 2*n. - Jean-Christophe Hervé, Sep 27 2014
From Colin Barker, Sep 28 2014: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (41*x^2 - 80*x + 41) / (1-x)^3. (End)
a(n) = 2*a(n-1) - a(n-2) + 2. - Vincenzo Librandi, Mar 04 2016
E.g.f.: (x^2 + 2*x + 41)*exp(x). - Robert Israel, Mar 10 2016
Sum_{n>=0} 1/a(n) = tanh(sqrt(163)*Pi/2)*Pi/sqrt(163). - Amiram Eldar, May 12 2025

A002837 Numbers k such that k^2 - k + 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, 40, 43, 44, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Keywords

Comments

Leonhard Euler published this prime-generating formula in 1772. - Harvey P. Dale, Sep 23 2020

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.
  • 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).

Crossrefs

Programs

  • Magma
    [n: n in [0..100] |IsPrime(n^2-n+41)]; // Vincenzo Librandi, Nov 21 2010
  • Maple
    A002837:=n->`if`(isprime(n^2-n+41),n,NULL): seq(A002837(n), n=0..100); # Wesley Ivan Hurt, Oct 21 2014
  • Mathematica
    Select[Range[0,100],PrimeQ[#^2-#+41]&] (* Harvey P. Dale, May 27 2012 *)
  • PARI
    v=[ ]; for(n=0,100, if(isprime(n^2-n+41),v=concat(v,n),)); v
    

Formula

a(n) = A056561(n-1) + 1, n > 1. - Robert Price, Nov 08 2019

A090102 Leading prime in each set of 7 arising in A090101.

Original entry on oeis.org

11, 516811, 20402952601, 196260616589761, 239536538008051, 426813020692661, 2681027962124411, 3605832801512401, 6450361508166761, 10392841156929031, 13162202092936411, 13655671002023851, 14501847401205811
Offset: 1

Views

Author

Labos Elemer, Dec 15 2003

Keywords

Examples

			a[15] = 69981018761651281 is first of following chain: {69981018761651281, 69981019944706811, 69981021127762351, 69981022310817901, 69981023493873461, 69981024676929031, 69981025859984611} = {P[k], P[k+1], ..., P[k+6]}, where k = A090101[15] and P[x] = 5x^2+5x+1. See A090562, A090563.
		

Crossrefs

Programs

  • Mathematica
    po[x_] := 5*x^2+5*x+1 Do[s=po[n];s0=po[n];s1=po[n+1];s2=po[n+2];s3=po[n+3];s4=po[n+4]; s5=po[n+5];s6=po[n+6];If[IntegerQ[n/100000], Print[{n}]]; If[PrimeQ[s0]&&PrimeQ[s1]&&PrimeQ[s2]&&PrimeQ[s3]&&PrimeQ[s4]&&PrimeQ[s5] &&PrimeQ[s6], Print[s0]], {n, 1, 120000000}]

A259645 Numbers m such that m^2 + 1, 3*m - 1 and m^2 + m + 41 are all prime.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 16, 20, 24, 36, 66, 90, 94, 116, 120, 134, 150, 156, 160, 206, 240, 280, 340, 350, 384, 396, 430, 436, 470, 536, 634, 690, 700, 714, 780, 826, 864, 930, 946, 960, 1004, 1124, 1150, 1176, 1294, 1316, 1376, 1410, 1430, 1494, 1644, 1674
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 03 2015

Keywords

Comments

This sequence is infinite if the generalized Dickson's conjecture holds.

Examples

			.            | (i, j, k) such that |        corresponding
.            | a(n) = A005574(i)   |        prime triples
.     |      |      = A087370(j)   |        let m = a(n):
.   n | a(n) |      = A056561(k)   |  (m^2+1, 3*m-1, m^2+m+41)
.  ---+------+---------------------+--------------------------
.   1 |    1 |     (1,  1,  2)     |        (2,   2,   43)
.   2 |    2 |     (2,  2,  3)     |        (5,   5,   47)
.   3 |    4 |     (3,  3,  5)     |       (17,  11,   61)
.   4 |    6 |     (4,  4,  7)     |       (37,  17,   83)
.   5 |   10 |     (5,  6, 11)     |      (101,  29,  151)
.   6 |   14 |     (6,  7, 13)     |      (197,  41,  251)
.   7 |   16 |     (7,  8, 15)     |      (257,  47,  313)
.   8 |   20 |     (8, 10, 21)     |      (401,  59,  461)
.   9 |   24 |     (9, 11, 25)     |      (597,  71,  641)
.  10 |   36 |    (11, 15, 37)     |     (1297, 107, 1373)
.  11 |   66 |    (15, 24, 61)     |     (4357, 197, 4463)
.  12 |   90 |    (18, 31, 79)     |     (8101, 269, 8231)  .
		

Crossrefs

Intersection of A005574, A087370 and A056561.

Programs

  • Haskell
    import Data.List.Ordered (isect)
    a259645 n = a259645_list !! (n-1)
    a259645_list = a005574_list `isect` a087370_list `isect` a056561_list
  • Mathematica
    Select[Range[100], AllTrue[{#^2 + 1, 3 # - 1, #^2 + # + 41}, PrimeQ] &] (* Robert Price, Apr 19 2025 *)

A188424 Number of primes of the form k^2 + k + 2n - 1 for k = 0..2n-1.

Original entry on oeis.org

1, 2, 4, 4, 2, 10, 4, 3, 16, 6, 5, 10, 10, 5, 13, 14, 3, 10, 16, 7, 40, 8, 6, 26, 12, 9, 19, 14, 9, 34, 21, 5, 19, 36, 13, 28, 18, 7, 31, 18, 19, 34, 15, 14, 27, 27, 11, 41, 31, 11, 68, 16, 10, 71, 30, 20, 23, 21, 16, 40, 40, 13, 57, 37, 23, 37, 24, 16, 67, 44, 16, 41, 20, 20, 54, 55, 12, 43, 54, 15, 81, 26, 15, 65, 34, 37, 50, 20, 29, 70, 68, 14, 52, 46, 14, 79, 43, 18, 60, 70
Offset: 1

Views

Author

Michel Lagneau, Mar 30 2011

Keywords

Examples

			a(21) = 40 because the polynomial k^2 + k + 41 generates 40 distinct primes for k = 0, 1, .., 39.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 by 2 to 200 do:m:=0:for k from 0 to n do: x:=k^2+k+n:if
      type(x,prime)=true then m:=m+1:else fi:od:printf(`%d, `,m):od:

A228122 Smallest nonnegative number x such that x^2 + x + 41 has exactly n prime factors counting multiplicities.

Original entry on oeis.org

0, 40, 420, 1721, 14144, 139563, 3019035, 24304266, 206583092, 3838101265
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 11 2013

Keywords

Examples

			a(1) = 0 because if x = 0 then x^2 + x + 41 = 41, which has 1 prime factor.
a(2) = 40 because if x = 40 then x^2 + x + 41 = 1681 = 41*41, which has 2 prime factors, counting multiplicities.
a(3) = 420 because if x = 420 then x^2 + x + 41 = 176861 = 47*53*71, which has 3 prime factors.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[x = 0; While[PrimeOmega[x^2 + x + 41] != k, x++]; AppendTo[a, x], {k, 9}]; a
  • PARI
    a(n) = {my(m=0); while (bigomega(m^2+m+41) != n, m++); m;} \\ Michel Marcus, Jan 31 2016
    
  • Python
    from sympy import factorint
    def A228122(n):
        k = 0
        while sum(factorint(k*(k+1)+41).values()) != n:
            k += 1
        return k # Chai Wah Wu, Sep 07 2018

Extensions

a(9) from Zak Seidov, Feb 01 2016
a(10) from Giovanni Resta, Sep 08 2018

A139219 Primes of the form 41+(n+n^2)/2=41+A000217(n).

Original entry on oeis.org

41, 47, 107, 251, 317, 419, 569, 821, 1031, 1217, 1367, 1637, 1811, 1871, 3527, 5501, 5927, 6257, 6827, 8297, 8819, 9221, 10337, 14747, 17807, 20747, 21569, 22619, 25919, 28961, 31667, 34757, 37991, 43997, 45191, 48869, 49811, 52691, 63587
Offset: 1

Views

Author

Zak Seidov, Apr 11 2008

Keywords

Comments

Corresponding values of n in A139220.

Crossrefs

Programs

  • Magma
    [a: n in [0..500] | IsPrime(a) where a is  41 +(n + n^2) div 2]; // Vincenzo Librandi, Mar 22 2013
  • Mathematica
    Select[Table[41+(n+n^2)/2,{n,0,800}],PrimeQ]

A139221 Numbers k such that both 41+(k+k^2)/2 and 41+(k+k^2) are primes.

Original entry on oeis.org

0, 3, 11, 20, 23, 27, 32, 39, 48, 51, 59, 60, 83, 108, 111, 116, 128, 132, 135, 171, 188, 203, 212, 227, 240, 263, 275, 315, 324, 356, 359, 363, 384, 392, 447, 476, 479, 515, 528, 588, 627, 647, 648, 672, 731, 759, 780, 804, 839, 864, 875, 900, 903, 968, 975
Offset: 1

Views

Author

Zak Seidov, Apr 11 2008

Keywords

Comments

Intersection of A139220 and A056561.

Examples

			If k = 11 then 41 + (k + k^2) / 2 = 107 (prime) and 41 + (k + k^2) = 173 (prime).
		

Crossrefs

Programs

  • Magma
    [k:k in [0..1000]| IsPrime(41+(k+k^2) div 2) and IsPrime(41+k+k^2)]; // Marius A. Burtea, Feb 12 2020
    
  • Mathematica
    Select[Table[Range[0,2000]],PrimeQ[41+(#+#^2)/2]&&PrimeQ[41+#+#^2]&]
    Select[Range[0,1000],AllTrue[41+{(#+#^2)/2,#+#^2},PrimeQ]&] (* Harvey P. Dale, May 21 2024 *)
  • PARI
    for(n=0, 1000, if(isprime(binomial(n+1,2) +41) && isprime(n^2+n+41), print1(n", "))) \\ G. C. Greubel, Feb 12 2020
    
  • Sage
    [n for n in (0..1000) if is_prime(binomial(n+1,2)+41) and is_prime(n^2+n+41)] # G. C. Greubel, Feb 12 2020
Showing 1-10 of 22 results. Next