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.

Previous Showing 11-20 of 27 results. Next

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

A273595 Least q > 0 such that min { x >= 0 | q + prime(n)*x + x^2 is composite } is a (local) maximum, cf. A273756 & A273770.

Original entry on oeis.org

43, 47, 53, 71, 83, 113, 131, 173, 251, 281, 383, 461, 503, 593, 743, 73361, 73421, 3071069, 15949847, 76553693, 2204597, 1842719, 246407807, 986578883, 73975907, 4069235123, 1244414939, 25213427, 656856899, 30641069183, 8221946477, 41730358853, 10066886927, 285340609997, 6232338461
Offset: 2

Views

Author

M. F. Hasler, May 26 2016

Keywords

Comments

This is a subsequence of A273756 which considers all odd numbers (2n+1) instead of only prime(n) as coefficients of the linear term.
All terms are necessarily prime, since this is necessary and sufficient to get a prime for x = 0.
The respective minima (= number of consecutive primes for x = 0, 1, 2, ...) are given in A273597.
It has been pointed out by Don Reble that the prime k-tuple conjecture predicts infinitely long sequences of primes of the given form, therefore we consider the "local" maxima, for q below some appropriate (large) limit: see sequences A273756 & A273770 for further details. - M. F. Hasler, Feb 17 2020

Crossrefs

Cf. also A002837 (n such that n^2-n+41 is prime), A007634 (n such that n^2+n+41 is composite), A005846 (primes of form n^2+n+41), A097823, A144051, A187057 .. A187060, A190800, A191456 ff.

Programs

Formula

a(n) = A273756((prime(n) - 1)/2). - M. F. Hasler, Feb 17 2020

Extensions

Edited and extended using A273756(0..100) due to Don Reble, by M. F. Hasler, Feb 17 2020

A273756 Least p for which min { x >= 0 | p + (2n+1)*x + x^2 is composite } reaches the (local) maximum given in A273770.

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, 73303, 73361, 73421, 73483, 3443897, 3071069, 3071137, 15949847, 76553693, 365462323, 365462399, 2204597, 9721, 1842719, 246407633, 246407719, 246407807, 246407897, 246407989
Offset: 0

Views

Author

M. F. Hasler, May 26 2016

Keywords

Comments

All terms are prime, since this is necessary and sufficient to get a prime for x = 0.
The values given in A273770 are the number of consecutive primes obtained for x = 0, 1, 2, ....
Sequence A273595 is the subsequence of terms for which 2n+1 is prime.
For even coefficients of the linear term, the answer would always be q=2, the only choice that yields a prime for x=0 and also for x=1 if (coefficient of the linear term)+3 is prime.
The initial term a(n=0) = 41 corresponds to Euler's famous prime-generating polynomial 41+x+x^2. Some subsequent terms are equal to the primes this polynomial takes for x=1,2,3,.... This stems from the fact that adding 2 to the coefficient of the linear term is equivalent to shifting the x-variable by 1. Since here we require x >= 0, we find a reduced subset of the previous sequence of primes, missing the first one, starting with q equal to the second one. (It is known that there is no better prime-generating polynomial of this form than Euler's, see the MathWorld page and A014556. "Better" means a larger p producing p-1 primes in a row. However, the prime k-tuple conjecture suggests that there should be arbitrarily long runs of primes of this form (for much larger p), i.e., longer than 41, but certainly much less than the respective p. Therefore we speak of local maxima.)

Crossrefs

Cf. also A002837 (n such that n^2-n+41 is prime), A007634 (n such that n^2+n+41 is composite), A005846 (primes of form n^2+n+41), A097823, A144051, A187057 ... A187060, A190800, A191456 ff.
The first line of data coincides with that of A202018, A107448, A155884 (and also A140755, A142719, except for some initial terms), which are all related.

Programs

  • PARI
    A273756(n,p=2*n+1,L=10^(5+n\10),m=0,Q)={forprime(q=1,L, for(x=1,oo, ispseudoprime(q+p*x+x^2)&& next; x>m&& [Q=q,m=x]; break));Q}

Extensions

Edited, following a remark by Don Reble, by M. F. Hasler, Jan 23 2018
a(27) corrected and more terms from Don Reble, Feb 15 2018

A273770 Max { min { x >= 0 | p + (2*n+1)*x + x^2 is composite }, p < 10^(5+n/10) }.

Original entry on oeis.org

40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 13, 12, 11, 10, 11, 12, 11, 12, 12, 13, 12, 12, 13, 16, 17, 16, 15, 14, 13, 13, 12, 11, 12, 13, 13, 14, 13, 13, 13, 12, 13, 14, 13, 14, 15, 14, 14, 13, 14, 14, 13
Offset: 0

Views

Author

M. F. Hasler, May 26 2016

Keywords

Comments

The values for p are given in A273756 which is the main entry, see there for further information and (cross)references.
From the initial values, the sequence seems strictly decreasing, with a(n) = 40-n, however, this property does not persist beyond a(27) = 13.
The upper limit on p ensures that we have a well-defined sequence: The prime k-tuple conjecture predicts existence of arbitrarily long sequences of primes of the given form, and thus unbounded minimal value of x. However, the corresponding prime tuples are expected to appear for much larger values of p. The given limit should be understood as "below the first/next such prime tuple", and in general the values a(n) should not change if that limit would be increased by some orders of magnitude. There might be counterexamples, which would be interesting. The given limit was chosen for lack of a more natural expression, and is relatively small. It could be replaced by a more appropriate function of n if a proposal is available, which should not affect the values given so far. - M. F. Hasler, Jan 22 2018, edited Feb 17 2020

Crossrefs

Programs

  • PARI
    {A273770(n, p=2*n+1, L=10^(5+n/10), m)=forprime(q=1,L, for(x=1,oo, ispseudoprime(q+p*x+x^2) || (x>m && !m=x) || break));m}

Formula

a(n) = 40 - n for 0 <= n <= 27.

Extensions

Corrected and extended by Don Reble, Feb 15 2018

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,", ")))

A194634 Numbers n such that k= n^2 + n + 41 is composite and there is no integer x such that n= x^2 + 40; n= (x^2+x)/2 + 81; or n= 3*x^2 - 2x + 122.

Original entry on oeis.org

127, 138, 155, 163, 164, 170, 173, 178, 185, 190, 204, 205, 207, 208, 213, 215, 216, 232, 237, 239, 242, 244, 245, 246, 248, 249, 251, 256, 259, 261, 266, 268, 270, 278, 279, 283, 284, 286, 287, 289, 295, 299, 300, 301, 302, 309, 314, 321, 325, 326, 327, 328
Offset: 1

Views

Author

Matt C. Anderson, Aug 30 2011

Keywords

Comments

The parabola curve fit: p1(0)=40; p1(1)=41; p1(2)=44 yields p1(x)=x^2+40. A second fit: p2(0)=81; p2(1)=82; p2(2)=84 yields p2(x)=(x^2+x)/2 + 81. A third fit: p3(0)=122; p3(1)=123; p3(2)=130 yields p3(x)=3x^2-2*x+122.
Substituting n=x^2 into k=n^2+n+41 is factorable as: k1=(x^2+x+41)*(x^2-x+41). This shows that all lattice points on p1 produce a composite k.
Similarly, substituting n=(x^2-x)/2 + 81 into k factors as k2=(x^2+163)*(x^2+2*x+164)/4. So all lattice points on p2 produce a composite k.
Similarly, substituting n=3*x^2-2*x+122 into k factors as k3=(x^2-x+41)*(9*x^2-3*x+367). So all lattice points on p3 produce a composite k.
This procedure can be continued with p4(x)=3*x^2+8*x+127, p5(x)=4*x^2-3*x+163, p6(x)=4*x^2+11*x+170, p7(x)=5*x^2-4*x+204, p8(x)=5*x^2+14*x+213, p9(x)=(3*x^2-x)/2+244, p10(x)=(3*x^2+7*x)/2+246, and so on.

References

  • John Stillwell, Elements of Number Theory, Springer, 2003, page 3.
  • R. Crandall and C. Pomerance, Prime Numbers A Computational Perspective 2nd ed., Springer, 2005, page 21.

Crossrefs

Cf. A007634 (n such that n^2+n+41 is composite).
Cf. A055390 (members of A007634 that are not lattice points of x^2+40).
Cf. A194565 (members of A055390 that are not lattice points of (x^2+x)/2 + 81).

Programs

  • Maple
    A007634:={}:
    for n from 1 to 1000 do
    k:=n^2+n+41:
    if isprime(k)=false then
    A007634:=A007634 union {n}:
    end if:
    end do:
    pv1:=Vector(1000,j->(j-1)^2+40):
    p1:=convert(pv1,set):
    A055390:=A007634 minus p1 minus {0}:
    pv2:=Vector(1000,j->((j-1)^2+(j-1))/2+81):
    p2:=convert(pv2,set):
    A194565:=A055390 minus p2:
    pv3:=Vector(1000,j->(3*(j-1)^2-2*(j-1)+122)):
    p3:=convert(pv3,set):
    p3set:=A194565 minus p3;
  • PARI
    is(n)=!isprime(n^2+n+41) && !issquare(n-40) && !issquare(8*n-647) && n > 126 && (x->3*x^2-2*x+122)(round((1+sqrt(3*n-365))/3))!=n \\ Charles R Greathouse IV, Apr 25 2014

Formula

a(n) ~ n. - Charles R Greathouse IV, Apr 25 2014

Extensions

Fixed subscripts in first comment. Added * in 4th comment. Added 5th comment. Changed g to k for consistancy. Improved Maple code. Added second book reference. Changed name to agree with comment of editor.

A228184 Numbers k such that k^2 + k + 41 is semiprime.

Original entry on oeis.org

40, 41, 44, 49, 56, 65, 76, 81, 82, 84, 87, 89, 91, 96, 102, 104, 109, 117, 121, 122, 123, 126, 127, 130, 136, 138, 140, 143, 147, 155, 159, 161, 162, 163, 164, 170, 172, 173, 178, 184, 185, 186, 187, 190, 201, 204, 205, 207, 208, 209, 213, 215, 216, 217, 218
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 15 2013

Keywords

Comments

Subsequence of A007634. Numbers in A007634 but not in here are 420, 431, 491, 492, 514, 533, 573, etc. (A097822). - R. J. Mathar, Aug 17 2013

Examples

			a(3) = 44 is in the sequence because 44^2 + 44 + 41 = 43*47 is semiprime.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[
    If[PrimeOmega[x^2 + x + 41] == 2, AppendTo[a, x]], {x, 1, 500}]; a

A235381 Positive numbers n such that n^2 + n + 41 is composite and there are no positive integers c or d such that n = c*d*x^2 + ((d-2)*c + 1)*x + ((41*d^2 - d + 1)*c -1)/d for an integer x.

Original entry on oeis.org

611, 622, 630, 663, 679, 734, 758, 835, 867, 966, 978, 995, 1006, 1009, 1060, 1088, 1127, 1142, 1157, 1173, 1175, 1183, 1228, 1280, 1345, 1355, 1368, 1388, 1390, 1426, 1433, 1455, 1457, 1467, 1497, 1538, 1539, 1543, 1554, 1578, 1603, 1612, 1613, 1630, 1661
Offset: 1

Views

Author

Matt C. Anderson, Jan 08 2014

Keywords

Comments

Restricting c and d so that c is congruent to 1 modulo d, we have that the composition of functions k(x) factors. k(x) = (1/d^2)*((1 + x*d^2 + x^2*d^2 - d - 2*x*d + 41*d^2)*(c^2*d^2*x^2 + x*d^2*c^2 + 41*c^2*d^2 + 2*x*d*c^2 - 2*x*d*c^2 + c*d - c^2*d + 1). So k(x) is the product of two integers greater than one and is thus composite.

Examples

			If d = 1 then n = c*n^2 + (1 - c)*x + 41*c  - 1. This is, up to a change of variables, equivalent to A201998.
		

References

  • John Stillwell, Elements of Number Theory, Springer 2003, page 3.

Crossrefs

Cf. A007634 (numbers n such that n^2 + n + 41 is composite).
Cf. A201998 and A241529 (similar subsequences of A007634).

Programs

  • Maple
    maxn := 1000;
    A := {};
    for n to maxn do
    g := n^2+n+41;
    if isprime(g) = false then
    A := `union`(A, {n}) :
    end if :
    end do :
    A:
    # the A list now contains Positive numbers n such that
    # n^2 + n + 41 is composite.
    # an upper limit for the number of iterations in the
    # triple nested while loops is 1000^3 or a billion.
    c:=1:
    d:=1:
    x:=-1:
    p:=41:
    q:=c*d*x^2+((d-2)*c+1)*x+((p*d^2-d+1)*c-1)/d;
    A2:=A:
    while q < maxn do
    while q < maxn do
    while q < maxn do
      A2:=A2 minus {q}:
      A2:=A2 minus {c*x^(2)+(c+1)*x+c*p}:
      A2:=A2 minus {c*d*x^2-((d-2)*c+1)*x+((p*d^2-d+1)*c-1)/d}:
      x:=x+1:
      q:=c*d*x^2+((d-2)*c+1)*x+((p*d^2-d+1)*c-1)/d:
    end do:
    c:=c+1:
    x:=-1:
    q:=c*d*x^2+((d-2)*c+1)*x+((p*d^2-d+1)*c-1)/d:
    end do:
    d:=d+1:
    c:=1:
    x:=-1:
    q:=c*d*x^2+((d-2)*c+1)*x+((p*d^2-d+1)*c-1)/d:
    end do:
    A2

Extensions

Corrected and edited by Matt C. Anderson, Jan 23 2014

A087090 Positive numbers n such that p=n^2+n+41 and p+2 are twin primes.

Original entry on oeis.org

0, 5, 12, 15, 17, 20, 24, 35, 45, 50, 59, 75, 90, 92, 105, 110, 119, 120, 132, 134, 167, 174, 182, 222, 225, 230, 264, 269, 285, 320, 335, 339, 362, 365, 372, 390, 419, 434, 437, 455, 462, 470, 479, 495, 539, 540, 549, 572, 594, 705, 710, 714, 759, 785, 789
Offset: 1

Views

Author

Zak Seidov, Aug 08 2003

Keywords

Examples

			5 is in the sequence because 71 and 73 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,800],AllTrue[#^2 +#+{41,43},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 20 2016 *)
  • PARI
    isok(n) = isprime(n^2+n+41) && isprime(n^2+n+43); \\ Michel Marcus, Oct 03 2013

A087091 Numbers k such that p = k^2 + k + 41 and p - 2 are twin primes.

Original entry on oeis.org

1, 4, 10, 16, 19, 31, 34, 43, 55, 58, 61, 70, 73, 79, 85, 94, 100, 118, 148, 154, 160, 175, 196, 199, 211, 214, 223, 226, 229, 238, 253, 274, 313, 340, 424, 430, 469, 499, 508, 529, 538, 541, 550, 565, 640, 658, 673, 706, 724, 760, 763, 781
Offset: 1

Views

Author

Zak Seidov, Aug 08 2003

Keywords

Examples

			4 is in the sequence because 61 = 4^2 + 4 + 41 and 59 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^3], And @@ PrimeQ[#^2 + # + {39, 41}] &] (* Amiram Eldar, Dec 27 2019 *)
  • PARI
    isok(n) = isprime(n^2+n+41) && isprime(n^2+n+39); \\ Michel Marcus, Oct 03 2013
Previous Showing 11-20 of 27 results. Next