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-9 of 9 results.

A097822 Numbers n such that n^2+n+41 (Euler's "prime generating polynomial") has more than 2 prime factors.

Original entry on oeis.org

420, 431, 491, 492, 514, 533, 573, 574, 603, 614, 655, 686, 738, 775, 798, 858, 861, 890, 895, 901, 904, 917, 919, 942, 984, 989, 1025, 1059, 1116, 1130, 1162, 1169, 1188, 1215, 1222, 1224, 1245, 1251, 1253, 1268, 1271, 1318, 1321, 1334, 1365, 1374, 1407
Offset: 1

Views

Author

Hugo Pfoertner, Aug 26 2004

Keywords

Comments

All visible sequence terms give exactly 3 prime factors. The smallest composite of the form p(n)=n^2+n+41 with 4 prime factors occurs for p(1721)=2963603=43*41^3. Smallest n with 4 distinct prime factors: p(2911)=8476873=83*53*47*41, smallest n with 5 prime factors: p(14144)=200066921=47^4*41, smallest n with 5 distinct prime factors: p(38913)=1514260523=173*71*61*47*43.

Examples

			a(1)=420 because 420^2+420+41=176861=71*53*47 is the first n for which p(n)=n^2+n+41 has more than 2 prime factors. For all smaller n p(n) is either prime or semiprime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1500],PrimeOmega[#^2+#+41]>2&] (* Harvey P. Dale, Dec 26 2017 *)
  • PARI
    isok(n) = #factor(n^2+n+41)~ > 2; \\ Michel Marcus, Sep 07 2017

Extensions

Corrected a(19) by Hugo Pfoertner, Sep 07 2017

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
    

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

A260678 Numbers n>0 for which n+(17-n)^2 is not prime.

Original entry on oeis.org

33, 34, 37, 42, 49, 50, 51, 53, 56, 58, 60, 65, 67, 68, 69, 71, 72, 75, 78, 82, 83, 84, 85, 86, 88, 91, 94, 95, 97, 100, 101, 102, 105, 106, 107, 110, 111, 113, 114, 116, 117, 118, 119, 122, 123, 124, 128, 129, 132, 133, 134, 135, 136, 139, 141, 143, 148, 151, 152, 153
Offset: 1

Views

Author

M. F. Hasler, Nov 15 2015

Keywords

Comments

Motivated by the fact that n+(17-n)^2 = 1+16^2, 2+15^2, ..., 16+1^2, 17+0^2, 18+1^2, 19+2^2, ..., 32+15^2 are all prime. This has an explanation through Heegener numbers, similar to Euler's prime-generating polynomial, cf. A002837 and related crossrefs.

Crossrefs

Cf. A260679 (n+(17-n)^2), A007635 (primes in that sequence = primes of the form n^2+n+17).
Cf. A002837 (n^2-n+41 is prime), A005846 (primes of form n^2+n+41), A007634 (n^2+n+41 is composite), A097823 (n^2+n+41 is not squarefree).

Programs

  • Magma
    [n: n in [1..180] | not IsPrime(n+(17-n)^2)]; // Vincenzo Librandi, Nov 16 2015
  • Maple
    remove(t -> isprime(t+(17-t)^2), [$1..200]); # Robert Israel, May 02 2017
  • Mathematica
    Select[Range[200], !PrimeQ[# + (17 - #)^2] &] (* Vincenzo Librandi, Nov 16 2015 *)
  • PARI
    for(n=1,999,isprime(n+(17-n)^2)||print1(n","))
    

A273597 min { x >= 0 | A273595(n) + prime(n)*x + x^2 is composite }, where A273595(n) is such that this is a local maximum.

Original entry on oeis.org

39, 38, 37, 35, 34, 32, 31, 29, 26, 25, 22, 20, 19, 17, 14, 12, 11, 12, 12, 12, 12, 16, 15, 12, 12, 13, 14, 13, 13, 14, 13, 13, 13, 13, 14, 14, 14, 16, 16, 16, 15, 15, 16, 16, 17
Offset: 2

Views

Author

M. F. Hasler, May 26 2016

Keywords

Comments

See A273595 for further information and (cross)references.
From the initial values, the sequence seems strictly decreasing, with a(n+1) - a(n) = (prime(n+1) - prime(n))/2; however, this property does not persist beyond n = 16.
This is the subsequence of A273770 with indices n corresponding to odd primes 2n+1, see formula. - M. F. Hasler, Feb 17 2020

Crossrefs

Programs

Formula

a(n) = (81 - prime(n))/2 for 1 < n < 17.
a(n) = A273770((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

A238203 Squares s such that s^2+s+41 is prime.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 64, 100, 144, 169, 196, 225, 324, 400, 441, 484, 529, 576, 625, 841, 900, 961, 1089, 1444, 1521, 1849, 2209, 2601, 2704, 2809, 3025, 3136, 3249, 3364, 3721, 3844, 4096, 4225, 4356, 4489, 5476, 5625, 5776, 6241, 7056, 7921, 8464, 8836, 9025
Offset: 1

Views

Author

K. D. Bajpai, Feb 20 2014

Keywords

Comments

n^2+n+41: Euler’s prime generating polynomial.
First 6 terms in the sequence are first 6 consecutive squares.

Examples

			9 is in the sequence because 9 = 3^2 and 9^2+9+41 = 131 is prime.
36 is in the sequence because 36 = 6^2 and 36^2+36+41 = 1373 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):KD := proc() local a,b; a:=(n^2);b:=a^2+a+41; if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..500);
  • Mathematica
    Select[Table[k = n^2, {n, 100}], PrimeQ[#^2 + # + 41] &] (* or *) c = 0; Do[k = n^2; If[PrimeQ[k^2 + k + 41], c = c + 1; Print[c, " ", k]], {n, 1, 10000}];
    Select[Range[100]^2,PrimeQ[#^2+#+41]&] (* Harvey P. Dale, Dec 13 2021 *)

A260679 a(n) = n + (17 - n)^2.

Original entry on oeis.org

257, 227, 199, 173, 149, 127, 107, 89, 73, 59, 47, 37, 29, 23, 19, 17, 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257, 289, 323, 359, 397, 437, 479, 523, 569, 617, 667, 719, 773, 829, 887, 947, 1009, 1073, 1139, 1207, 1277, 1349, 1423, 1499, 1577, 1657
Offset: 1

Views

Author

M. F. Hasler, Nov 15 2015

Keywords

Comments

Motivated by the fact that the first 32 terms of this sequence are primes. This has an explanation through Heegener numbers, similar to Euler's prime-generating polynomial (cf. A002837 and related crossrefs).
See also A007635 for the primes in this sequence, A260678 for indices k for which a(k) is composite.
Sequence provides all numbers m for which 4*m - 67 is a square. - Bruno Berselli, Nov 16 2015

Crossrefs

Cf. A007635 (primes in this sequence = primes of the form n^2 + n + 17).
Cf. A002837 (n^2 - n + 41 is prime), A005846 (primes of form n^2 + n + 41), A007634 (n^2 + n + 41 is composite), A097823 (n^2 + n + 41 is not squarefree).
Cf. A260678.

Programs

  • Magma
    [n+(17-n)^2: n in [1..70]]; // Vincenzo Librandi, Nov 16 2015
  • Mathematica
    Table[n + (17 - n)^2, {n, 70}] (* Vincenzo Librandi, Nov 16 2015 *)
    LinearRecurrence[{3,-3,1},{257,227,199},60] (* Harvey P. Dale, May 12 2019 *)
  • PARI
    for(n=1,99,print1(n+(17-n)^2,","))
    

Formula

G.f.: x*(257 - 544*x + 289*x^2)/(1 - x)^3.
From Elmo R. Oliveira, Feb 11 2025: (Start)
E.g.f.: exp(x)*(x^2 - 32*x + 289) - 289.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)
Showing 1-9 of 9 results.