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

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

A297785 Decimal expansion of 4099200041/9999^3.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jan 05 2018

Keywords

Examples

			0.0041004300470053006100710083009701130131015101730197...
		

Crossrefs

Programs

  • Mathematica
    First[RealDigits[4099200041/9999^3, 10, 100, -1]] (* Paolo Xausa, Jun 16 2024 *)

Formula

Sum_{k>=0} 10^(-4*k-4)*A202018(k) = 4099200041/9999^3.

A319906 Number of prime numbers of the form k^2 + k + 41 below 10^n.

Original entry on oeis.org

0, 8, 31, 86, 221, 581, 1503, 4149, 11355, 31985, 90940, 261081, 756081, 2208197, 6483148, 19132652, 56714624, 168806741, 504209234
Offset: 1

Views

Author

Amiram Eldar, Oct 01 2018

Keywords

Examples

			The first 8 values of k^2 + k + 41 for k = 0 to 7 are above 10 and below 100: 41, 43, 47, 53, 61, 71, 83, 97, thus a(1) = 0 and a(2) = 8.
		

References

  • Henri Cohen, Number Theory, Volume II: Analytic and Modern Tools, GTM Vol. 240, Springer, 2007; see pp. 208-209.

Crossrefs

Programs

  • Mathematica
    f[n_] := n^2 + n + 41; c = 0; k = 0; a={}; Do[f1 = f[k]; While[f1 < 10^n, If[PrimeQ[f1], c++]; k++; f1 = f[k]];  AppendTo[a, c], {n, 1, 10}]; a

Formula

According to Hardy and Littlewood's Conjecture F: a(n) ~ 2 * C * 10^(n/2)/(n*log(10)), where C = 3.319773... (Hardy-Littlewood constant for x^2+x+41, A221712).

A212325 Prime-generating polynomial: a(n) = n^2 + 3*n - 167.

Original entry on oeis.org

-167, -163, -157, -149, -139, -127, -113, -97, -79, -59, -37, -13, 13, 41, 71, 103, 137, 173, 211, 251, 293, 337, 383, 431, 481, 533, 587, 643, 701, 761, 823, 887, 953, 1021, 1091, 1163, 1237, 1313, 1391, 1471, 1553, 1637, 1723, 1811, 1901, 1993, 2087, 2183, 2281, 2381
Offset: 0

Views

Author

Marius Coman, May 14 2012

Keywords

Comments

The polynomial generates 24 primes in absolute value (23 distinct ones) in row starting from n=0 (and 42 primes in absolute value for n from 0 to 46).
The polynomial n^2 - 49*n + 431 generates the same primes in reverse order.
Note: we found in the same family of prime-generating polynomials (with the discriminant equal to 677) the polynomial 13*n^2 - 311*n + 1847 (13*n^2 - 469*n + 4217) generating 23 primes and two noncomposite numbers (in absolute value) in row starting from n=0 (1847, 1549, 1277, 1031, 811, 617, 449, 307, 191, 101, 37, -1, -13, 1, 41, 107, 199, 317, 461, 631, 827, 1049, 1297, 1571, 1871).
Note: another interesting algorithm to produce prime-generating polynomials could be N = m*n^2 + (6*m+1)*n + 8*m + 3, where m, 6*m+1 and 8*m+3 are primes. For m=7 then n=t-20 we get N = 7*t^2 - 237*t + 1999, which generates the following primes: 239, 163, 101, 53, 19, -1, -7, 1, 23, 59, 109, 173, 251 (we can see the same pattern: …, -1, -m, 1, …).

Crossrefs

Cf. A060566 (an 80 primes generating pol.), A202018 (Euler's p.g.p.), A050268, A181963, A181973, A182409, A211773, A318791, A320772, A330363 (other p.g.p.).

Programs

  • Magma
    [n^2+3*n-167: n in [0..47]]; // Bruno Berselli, May 18 2012
    
  • Mathematica
    Table[n^2+3n-167,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{-167,-163,-157},50] (* Harvey P. Dale, Feb 08 2020 *)
  • PARI
    Vec((-167+338*x-169*x^2)/(1-x)^3+O(x^99)) \\ Charles R Greathouse IV, Oct 01 2012
    
  • PARI
    apply( {A212325(n)=(n+3)*n-167}, [0..55]) \\ M. F. Hasler, Feb 11 2025
    
  • Python
    def A212325(n=None, upto=None): return(A212325(i)for i in range(n or 0, upto or 2**63)) if upto or n is None else(n+3)*n-167 # M. F. Hasler, Feb 11 2025

Formula

G.f.: (-167 + 338*x - 169x^2)/(1-x)^3. - Bruno Berselli, May 18 2012
From Elmo R. Oliveira, Feb 10 2025: (Start)
E.g.f.: exp(x)*(-167 + 4*x + x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

Extensions

Edited by Bruno Berselli, May 18 2012

A226097 a(n) = ((-1)^n + 2*n - 38)*(2*n - 38) + 41.

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, May 26 2013

Keywords

Comments

a(n) are distinct primes for n = 0 to 59.
All terms are in A202018.

Crossrefs

Programs

  • Magma
    [((-1)^n+a)*a+41 where a is 2*n-38 : n in [0..50]];
    
  • Mathematica
    g[n_] := 2*n - 38; f[n_] := ((-1)^n + g[n])*g[n] + 41; Table[f[n], {n, 0, 50}]
    EulerP[n_] := n^2 - n + 41; f[n_] := 2*n - (3 + (-1)^n)/2; LinearRecurrence[{1, 2, -2, -1, 1}, Table[EulerP@f[n], {n, 19, 15, -1}], {0, 50}]
  • PARI
    Vec((1447 - 74*x - 3104*x^2 + 82*x^3 + 1681*x^4) / ((1 - x)^3*(1 + x)^2) + O(x^100)) \\ Colin Barker, Aug 14 2017

Formula

G.f.: (1447-2*x*(37+1552*x-41*x^2)+(41*x^2)^2)/((1+x)^2*(1-x)^3).
From Colin Barker, Aug 14 2017: (Start)
G.f.: (1447 - 74*x - 3104*x^2 + 82*x^3 + 1681*x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = 4*n^2 - 150*n + 1447 for n even.
a(n) = 4*n^2 - 154*n + 1523 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
(End)

A258841 a(n) = 9*n^2 - 237*n + 1927.

Original entry on oeis.org

1927, 1699, 1489, 1297, 1123, 967, 829, 709, 607, 523, 457, 409, 379, 367, 373, 397, 439, 499, 577, 673, 787, 919, 1069, 1237, 1423, 1627, 1849, 2089, 2347, 2623, 2917, 3229, 3559, 3907, 4273, 4657, 5059, 5479, 5917, 6373, 6847, 7339, 7849, 8377, 8923, 9487, 10069
Offset: 0

Views

Author

Robert Potter, Jun 12 2015

Keywords

Comments

Empirical observation. All integers generated by polynomial for 0 < n <= 37 are prime with the exception of a(26) = 43^2 and a(29) = 43*61.

Crossrefs

Programs

  • Magma
    [9*n^2-237*n+1927: n in [0..50]]; // Vincenzo Librandi, Jun 22 2015
  • Mathematica
    Table[9 n^2 - 237 n + 1927, {n, 0, 25}] (* Michael De Vlieger, Jun 12 2015 *)
    LinearRecurrence[{3,-3,1},{1927,1699,1489},50] (* Harvey P. Dale, Oct 08 2024 *)
  • PARI
    vector(50, n, 9*n^2 - 237*n + 1927) \\ Michel Marcus, Jun 21 2015
    

Formula

From Vincenzo Librandi, Jun 22 2015: (Start)
G.f.: (1927 - 4082*x + 2173*x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
E.g.f.: exp(x)*(1927 - 228*x + 9*x^2). - Elmo R. Oliveira, Feb 09 2025

A259552 a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 41.

Original entry on oeis.org

41, 43, 53, 83, 151, 281, 503, 853, 1373, 2111, 3121, 4463, 6203, 8413, 11171, 14561, 18673, 23603, 29453, 36331, 44351, 53633, 64303, 76493, 90341, 105991, 123593, 143303, 165283, 189701, 216731, 246553, 279353, 315323, 354661, 397571, 444263, 494953
Offset: 1

Views

Author

Robert Potter, Jun 30 2015

Keywords

Comments

Empirical Observation: Reasonably productive (better than 85% in first 24 terms) prime-generating polynomial.
All integers generated by this polynomial for 0 < n <= 24 are prime with the exception of a(14) = 47*179, a(17) = 71*263, and a(20) = 47*773.
Negative and zero values of n also produce primes but they are not unique.
a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 809, for 0 < n <= 24, is also reasonably productive but produces composites at a(4), a(7), a(19) and a(20).
a(n) = (1/4)*n^4 - (1/2)*n^3 + (3/4)*n^2 - (1/2)*n + 641, for 0 < n <= 24, is also quite productive.

Crossrefs

Cf. A202018.

Programs

  • Magma
    [(1/4)*n^4-(1/2)*n^3+(3/4)*n^2-(1/2)*n+41: n in [1..40]]; // Vincenzo Librandi, Jul 03 2015
  • Maple
    A259552:=n->n^4/4-n^3/2+3*n^2/4-n/2+41: seq(A259552(n), n=1..100); # Wesley Ivan Hurt, Jul 09 2015
  • Mathematica
    f[n_] := n^4/4 - n^3/2 + 3 n^2/4 - n/2 + 41; Array[f, 38] (* or *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {41, 43, 53, 83, 151}, 38] (* Robert G. Wilson v, Jul 07 2015 *)

Formula

G.f.: x*(41 - 162*x + 248*x^2 - 162*x^3 + 41*x^4)/(1-x)^5. - Vincenzo Librandi, Jul 03 2015
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5), n>5. - Wesley Ivan Hurt, Jul 09 2015

Extensions

Corrected and extended by Vincenzo Librandi, Jul 03 2015

A268101 Smallest prime p such that some polynomial of the form a*x^2 - b*x + p generates distinct primes in absolute value for x = 1 to n, where 0 < a < p and 0 <= b < p.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 647, 1277, 1979, 2753
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 26 2016

Keywords

Examples

			a(1) = 2 (a prime), x^2 + 2 gives a prime for x = 1.
a(2) = 3 (a prime), 2*x^2 + 3 gives distinct primes for x = 1 to 2.
a(4) = 5 (a prime), 2*x^2 + 5 gives distinct primes for x = 1 to 4.
a(6) = 7 (a prime), 4*x^2 + 7 gives distinct primes for x = 1 to 6.
a(10) = 11 (a prime), 2*x^2 + 11 gives distinct primes for x = 1 to 10.
a(12) = 13 (a prime), 6*x^2 + 13 gives distinct primes for x = 1 to 12.
a(16) = 17 (a prime), 6*x^2 + 17 gives distinct primes for x = 1 to 16.
a(18) = 19 (a prime), 10*x^2 + 19 gives distinct primes for x = 1 to 18.
a(22) = 23 (a prime), 3*x^2 - 3*x + 23 gives distinct primes for x = 1 to 22.
a(28) = 29 (a prime), 2*x^2 + 29 gives distinct primes for x = 1 to 28.
a(29) = 31 (a prime), 2*x^2 - 4*x + 31 gives distinct primes for x = 1 to 29.
a(40) = 41 (a prime), x^2 - x + 41 gives distinct primes for x = 1 to 40.
a(41) = 647 (a prime), abs(36*x^2 - 594*x + 647) gives distinct primes for x = 1 to 41.
a(42) = 1277 (a prime), abs(36*x^2 - 666*x + 1277) gives distinct primes for x = 1 to 42.
a(43) = 1979 (a prime), abs(36*x^2 - 738*x + 1979) gives distinct primes for x = 1 to 43.
a(44) = 2753 (a prime), abs(36*x^2 - 810*x + 2753) gives distinct primes for x = 1 to 44.
		

Crossrefs

A268513 Numbers n such that bigomega(n) = bigomega(n*(n+1)+41).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 49, 53, 59, 61, 65, 67, 71, 73, 79, 82, 83, 87, 91, 97, 101, 103, 107, 113, 121, 122, 123, 131, 137, 139, 143, 149, 151, 155, 157, 159, 161, 167, 178, 179, 181, 185, 187, 191, 193, 197, 199
Offset: 1

Views

Author

Zak Seidov, Feb 06 2016

Keywords

Examples

			Let eu(x) = x*(x + 1) + 41 and n-AP= n-almost prime, then:
both 2 and eu(2)=47 are primes,
both 49=7*7 and eu(49)=47*53 are semiprimes,
both 574=2*7*41 and eu(574)=41*83*97 are 3-AP,
both 3484=2^2*13*67 and eu(3484)=12141781=41*43*71*97 are 4-AP,
both 54224=2^4*3389 and eu(2940296441)=43^2*61*131*199 are 5-AP,
both 506022=2*3*11^2*17*41 and eu(506022)=41*43^2*71*113*421 are 6-AP,
both 7375900=2^2*5^2*7*41*257 and eu(7375900)=41*47*53*71^2*251*421 are 7-AP,
both 151072290=2*3^4*5*41*4549 and eu(151072290)=41*47*61*83*113^2*167*1097 are 8-AP.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq &+[d[2]: d in Factorization(n^2+n+41)] ]; // Vincenzo Librandi, Feb 08 2016
  • Mathematica
    Select[Range[100], PrimeOmega[#] == PrimeOmega[# (# + 1) + 41] &]
  • PARI
    isok(n) = bigomega(n) == bigomega(n^2+n+41); \\ Michel Marcus, Feb 07 2016
    

A282319 a(n) = (2097203 mod n)^2 + (2097203 mod n) + 41.

Original entry on oeis.org

41, 43, 47, 53, 53, 71, 53, 53, 71, 53, 131, 173, 61, 53, 113, 53, 281, 71, 47, 53, 347, 131, 347, 173, 53, 347, 71, 53, 151, 593, 547, 421, 461, 281, 53, 593, 83, 503, 347, 53, 197, 347, 97, 1033, 593, 347, 313, 1301, 53, 53, 1097, 1933, 2203, 71
Offset: 1

Views

Author

Frederic Isenmann, Feb 11 2017

Keywords

Comments

This sequence gives 168 prime numbers for n=1 to 168 with 63 different primes. This formula is based on the lucky numbers of Euler.

Examples

			For n = 23, a(23) = 17^2+17+41 = 347, and 347 is prime.
		

Crossrefs

Programs

  • Mathematica
    Table[#^2 + # + 41 &@ Mod[2097203 , n], {n, 54}] (* Michael De Vlieger, Feb 12 2017 *)
    f[n_]:=Module[{x=Mod[2097203,n]},x^2+x+41]; Array[f,60] (* Harvey P. Dale, Jul 28 2017 *)
  • PARI
    a(n)=subst(x^2+x+41,x,2097203%n) \\ Charles R Greathouse IV, Feb 14 2017
  • Python
    def formul(i):
        return ((i*i+2097203)%i)*((i*i+2097203)%i)+((i*i+2097203)%i)+41
    for i in range(1, 169):
        n=formul(i)
        print(n, end=", ")
    
Previous Showing 11-20 of 24 results. Next