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

A082605 Using Euler's 6-term sequence A014556, we define the partial recurrence relation a(0)=2, a(1)=3, a(2)=5; a(k) = 2*a(k-1) - 1 - (-2)^(k-2), 3 <= k <= 5.

Original entry on oeis.org

2, 3, 5, 11, 17, 41, 65, 161, 257, 641, 1025, 2561, 4097, 10241, 16385, 40961, 65537, 163841, 262145, 655361, 1048577, 2621441, 4194305, 10485761, 16777217, 41943041, 67108865, 167772161, 268435457, 671088641, 1073741825, 2684354561
Offset: 0

Views

Author

Johan Meyer and Ben de la Rosa (meyerjh.sci(AT)mail.uovs.ac.za), May 23 2003

Keywords

Comments

Using this definition of a(k) we (formally) work backwards towards a(2)=5 to arrive at the formula for a(k) below.
For k >= 3, a(k) has the simple form a(k) = 2^(k-2)*(4 + (1 + (-1)^(k+1))/2) + 1; and it follows by induction that a(k) is congruent to 17 (mod 24) for all k >= 4. Direct calculations show that for k >= 3, the discriminants of the polynomials x^2 + x + a(k), D(k) = 1 - 4*a(k), satisfy the functional equation -D(k) = a(k+2) + 2.

Crossrefs

a(0..6) and a(2*n) same as A085613(n+1).

Programs

  • Magma
    A082605:= func< n | n le 1 select n+2 else 2^(n-3)*(9-(-1)^n) +1 >;
    [A082605(n): n in [0..40]]; // G. C. Greubel, Mar 23 2024
    
  • Maple
    aList := proc(len) local egf, ser, n;
    egf := (exp(-2*x) + 9*exp(2*x) - 10)/4; ser := series(egf, x, len + 2);
    [2, 3, 5, seq(1 + n!*coeff(ser,x, n), n = 2..len)] end:
    aList(30);  # Peter Luschny, Mar 23 2024
  • Mathematica
    LinearRecurrence[{1,4,-4}, {2,3,5,11,17}, 32] (* Georg Fischer, May 15 2019 *)
  • PARI
    a(n)=if(n<2,if(n<1,2,3),if(n%2==0,4^(n/2)+1,5/2*4^((n-1)/2)+1))
    
  • SageMath
    def A082605(n): return 1 + 2^(n-3)*(9-(-1)^n) -int(n==1)/2
    [A082605(n) for n in range(41)] # G. C. Greubel, Mar 23 2024

Formula

(a(k))(k>=0) = 2^(k-2)*(4 + Sum{r=2..k-1} (-1)^r) + 1, the empty sums corresponding to k=0, 1, 2 of course taken to be zero.
a(n) = A056486(n-1) + 1. - Ralf Stephan, Mar 19 2004
From Georg Fischer, May 15 2019: (Start)
a(2*n) = 2^n + 1.
G.f.: (2+x-6*x^2+2*x^3-2*x^4)/((1-x)*(1-2*x)*(1+2*x)). (End)

Extensions

More terms from Ralf Stephan, Mar 19 2004

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

A007635 Primes of form n^2 + n + 17.

Original entry on oeis.org

17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257, 359, 397, 479, 523, 569, 617, 719, 773, 829, 887, 947, 1009, 1277, 1423, 1499, 1657, 1823, 1997, 2087, 2179, 2273, 2467, 2879, 3209, 3323, 3557, 3677, 3923, 4049, 4177, 4987, 5273
Offset: 1

Views

Author

Keywords

Comments

a(n) = A117530(7,n) for n <= 7: a(1) = A117530(7,1) = A014556(5) = 17, A117531(7) = 7. - Reinhard Zumkeller, Mar 26 2006
Note that the gaps between terms increases by 2*k from k = 1 to 15: 19 - 17 = 2, 23 - 19 = 4, 29 - 23 = 6 and so on until 257 - 227 = 30 then fails at 289 - 257 = 32 since 289 = 17^2. - J. M. Bergot, Mar 18 2017
From Peter Bala, Apr 15 2018: (Start)
The polynomial P(n):= n^2 + n + 17 takes distinct prime values for the 16 consecutive integers n = 0 to 15. It follows that the polynomial P(n - 16) takes prime values for the 32 consecutive integers n = 0 to 31, consisting of the 16 primes above each taken twice. We note two consequences of this fact.
1) The polynomial P(2*n - 16) = 4*n^2 - 62*n + 257 also takes prime values for the 16 consecutive integers n = 0 to 15.
2)The polynomial P(3*n - 16) = 9*n^2 - 93*n + 257 takes prime values for the 11 consecutive integers n = 0 to 10 ( = floor(31/3)). In addition, calculation shows that P(3*n-16) also takes prime values for n from -5 to -1. Equivalently put, the polynomial P(3*n-31) = 9*n^2 - 183*n + 947 takes prime values for the 16 consecutive integers n = 0 to 15. Cf. A005846 and A048059. (End)
The primes in this sequence are not primes in the ring of integers of Q(sqrt(-67)). If p = n^2 + n + 17, then ((2n + 1)/2 - sqrt(-67)/2)((2n + 1)/2 + sqrt(-67)/2) = p. For example, 3^2 + 3 + 17 = 29 and (7/2 - sqrt(-67)/2)(7/2 + sqrt(-67)/2) = 29 also. - Alonso del Arte, Nov 27 2019

References

  • 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.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 96.

Crossrefs

Programs

  • Magma
    [a: n in [0..250]|IsPrime(a) where a is n^2+n+17]; // Vincenzo Librandi, Dec 23 2010
    
  • Mathematica
    Select[Table[n^2 + n + 17, {n, 0, 99}], PrimeQ] (* Alonso del Arte, Nov 27 2019 *)
  • PARI
    select(isprime, vector(100,n,n^2+n+17)) \\ Charles R Greathouse IV, Jul 12 2016
    
  • Python
    from sympy import isprime
    it = (n**2 + n + 17 for n in range(250))
    print([p for p in it if isprime(p)]) # Indranil Ghosh, Mar 18 2017

Formula

a(n) = A028823(n)^2 + A028823(n) + 17. - Seiichi Manyama, Mar 19 2017

A000926 Euler's "numerus idoneus" (or "numeri idonei", or idoneal, or suitable, or convenient numbers).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18, 21, 22, 24, 25, 28, 30, 33, 37, 40, 42, 45, 48, 57, 58, 60, 70, 72, 78, 85, 88, 93, 102, 105, 112, 120, 130, 133, 165, 168, 177, 190, 210, 232, 240, 253, 273, 280, 312, 330, 345, 357, 385, 408, 462, 520, 760, 840, 1320, 1365, 1848
Offset: 1

Views

Author

Keywords

Comments

There are many equivalent definitions of these numbers. Based on Cox, Theorem 3.22 and Proposition 3.24 and a comment by Eric Rains (rains(AT)caltech.edu), we can say that a positive number n belongs to this sequence if and only if any of the following equivalent statements is true:
(1) Let m > 1 be an odd number relatively prime to n which can be written in the form x^2 + n*y^2 with x, y relatively prime. If the equation m = x^2 + n*y^2 has only one solution with x, y >= 0, then m is a prime number. [Euler]
(2) Every genus of quadratic forms of discriminant -4n consists of a single class. [Gauss]
(3) If a*x^2 + b*x*y + c*y^2 is a reduced quadratic form of discriminant -4n, then either b=0, a=b or a = c. [Cox]
(4) Two quadratic forms of discriminant -4n are equivalent if and only if they are properly equivalent. [Cox]
(5) The class group C(-4n) is isomorphic to (Z/2Z)^m for some integer m. [Cox]
(6) n is not of the form ab+ac+bc with 0 < a < b < c. (See proof in link below.) [Rains]
It is conjectured that the list given here is complete. Chowla showed that the list is finite and Weinberger showed that there is at most one further term.
If an additional term exists it is > 100000000. - Jud McCranie, Jun 27 2005
The terms shown are the union of {1,2,3,4,7}, A033266, A033267, A033268 and A033269 (corresponding to class numbers 1, 2, 4, 8 and 16 respectively).
Note that for n in this sequence, n+1 is either a prime, twice a prime, the square of a prime, 8 or 16. - T. D. Noe, Apr 08 2004. [This is a general theorem that is not hard to prove using genus theory. The "32" in the original comment was an error. - Tom Hagedorn (hagedorn(AT)tcnj.edu), Dec 29 2008]
Also numbers n such that for all primes p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n), p can be uniquely written into the form as x^2+n*y^2. - V. Raman, Nov 25 2013

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 97 at p. 272.
  • Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966, pp. 425-430.
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, Section 3.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 1848, p. 146, Ellipses, Paris 2008.
  • C. F. Gauss, Disquisitiones Arithmeticae, 1801. English translation: Yale University Press, New Haven, CT, 1966, Sections 329-334.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.
  • Paulo Ribenboim, My Numbers, My Friends, Chapter 11, Springer-Verlag, NY, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 142-143.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 103.
  • A. Weil, Number theory: an approach through history; from Hammurapi to Legendre, Birkhäuser, Boston, 1984; see pp. 188, 219-226.

Crossrefs

Sequence A025052 is a subsequence.
Cf. A139642 (congruences for idoneal quadratic forms).

Programs

  • Mathematica
    noSol={}; Do[lim=Ceiling[(n-2)/3]; found=False; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, found=True; Break[]], {a, 1, lim-1}, {b, a+1, lim}]; If[ !found, AppendTo[noSol, n]], {n, 10000}]; noSol (* T. D. Noe, Apr 08 2004 *)
  • PARI
    A000926(Nmax=1e9)={for(n=1,Nmax,for(a=1,sqrtint(n\3),for(b=a+1,(n-a)\(3*a+2),n-a<(2*a+1+b)*b & break;(n-a*b)%(a+b)==0 & next(3)));print1(n", "))} \\ M. F. Hasler, Dec 04 2007
    
  • PARI
    ok(n)=!#select(k->k<>2, quadclassunit(-4*n).cyc) \\ Andrew Howroyd, Jun 08 2018

Extensions

Edited by N. J. A. Sloane, Dec 07 2007

A164926 Least prime p such that x^2+x+p produces primes for x=0..n-1 and composite for x=n.

Original entry on oeis.org

2, 3, 107, 5, 347, 1607, 1277, 21557, 51867197, 11, 180078317, 1761702947, 8776320587, 27649987598537, 291598227841757, 17
Offset: 1

Views

Author

T. D. Noe, Sep 01 2009

Keywords

Comments

Other known values: a(16)=17 and a(40)=41 (which is generated by Euler's polynomial, A005846). There are no other terms less than 10^12. All of Euler's Lucky numbers, A014556, are in this sequence. Assuming the prime k-tuples conjecture, Mollin's theorem 2.1 shows this sequence is defined for n>0.
a(21)=234505015943235329417 found by J. Waldvogel and Peter Leikauf. [Jens Kruse Andersen, Sep 09 2009]

Crossrefs

Programs

  • Mathematica
    PrimeRun[p_Integer] := Module[{k=0}, While[PrimeQ[k^2+k+p], k++ ]; k]; nn=8; t=Table[0,{nn}]; cnt=0; p=1; While[cnt
    				

Extensions

a(14) and a(15) from Jens Kruse Andersen, Sep 09 2009

A331940 Addends k > 0 such that the polynomial x^2 + x + k produces a record of its Hardy-Littlewood Constant.

Original entry on oeis.org

1, 11, 17, 41, 21377, 27941, 41537, 55661, 115721, 239621, 247757
Offset: 1

Views

Author

Hugo Pfoertner, Feb 02 2020

Keywords

Comments

The Hardy and Littlewood Conjecture F provides an estimate of the number of primes generated by a quadratic polynomial P(x) for 0 <= x <= m in the form C * Integral_{x=2..m} 1/log(x) dx, with C given by an Euler product that is a function of the fundamental discriminant of the polynomial. Cohen describes an efficient method for the computation of C.
The following table provides the record values of C, together with the number of primes np generated by the polynomial x^2 + x + a(n) for x <= 10^8 and the actual ratio 2*np/Integral_{x=2..10^8} 1/log(x) dx.
a(n) C np C from ratio
1 2.24147 6456835 2.24110
11 3.25944 9389795 3.25910
17 4.17466 12027453 4.17460
41 6.63955 19132653 6.64073
21377 6.92868 19962992 6.92894
27941 7.26400 20931145 7.26497
41537 7.32220 21092134 7.32085
55661 7.45791 21483365 7.45664
115721 7.70935 22210771 7.70912
239621 7.72932 22268336 7.72909
247757 8.24741 23762118 8.24757
Jacobson and Williams found significantly larger values of C for very large addends k, e.g. C = 2*5.36708 = 10.73416 for k = 3399714628553118047.

References

  • Keith Conrad, Hardy-Littlewood Constants. In: Mathematical Properties of Sequences and Other Combinatorial Structures, eds. Jong-Seon No, Hong-Yeop Song, Tor Helleseth, P. Vijay Kumar, Springer New York, 2003, pages 133-154.

Crossrefs

Cf. A221712, A221713 (Constants C including factor 1/2).

Programs

  • PARI
    \\ The function HardyLittlewood2 is provided at the Belabas, Cohen link.
    hl2max=0; for(add=0,100,my(hl=HardyLittlewood2(n^2+n+add)); if(hl>hl2max,print1(add,", "); hl2max=hl))

A027753 Primes of form n^2 + n + 3.

Original entry on oeis.org

3, 5, 23, 59, 113, 383, 509, 653, 1193, 1409, 3083, 4973, 6323, 8933, 10103, 12659, 17033, 19463, 23873, 24809, 25763, 29759, 30803, 35159, 36293, 47309, 48623, 52673, 54059, 62753, 67343, 68909, 75353, 83813, 87323, 92723, 94559
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ a: n in [0..350] | IsPrime(a) where a is n^2+n+3 ]; // Vincenzo Librandi, Dec 29 2010

Formula

a(n) = A027752(n)^2 + A027752(n) + 3. - Seiichi Manyama, Mar 19 2017

A027755 Primes of the form k^2 + k + 5.

Original entry on oeis.org

5, 7, 11, 17, 47, 61, 137, 277, 311, 347, 467, 557, 761, 997, 1061, 1487, 1811, 2357, 2657, 3911, 4561, 5261, 5407, 5857, 6011, 6977, 7487, 8377, 8747, 9511, 11777, 12437, 13577, 14767, 16007, 17827, 18637, 18911, 21467, 23567, 25127
Offset: 1

Views

Author

Keywords

Comments

a(5) through a(14) are identical to the first 10 values of q, the left-hand column of "Example 2.3. We give examples of maximal and minimal elliptic curves over finite fields over F_q with discriminant -19 for all q < 1000", p. 4, and "Example 5.2. We produce examples of optimal curves over finite fields with discriminant -19" pp. 10-11 of E. Alekseenko, et al. - Jonathan Vos Post, Feb 12 2009

Crossrefs

Programs

  • Magma
    [a: n in [0..250]|IsPrime(a) where a is n^2+n+5]; // Vincenzo Librandi, Dec 20 2010
  • Mathematica
    nn = Range[0, 200]; Select[nn^2 + nn + 5, PrimeQ] (* Jean-François Alcover, Nov 17 2018 *)

Formula

a(n) = A027754(n)^2 + A027754(n) + 5. - Seiichi Manyama, Mar 19 2017
a(n) >> n^2 log n (Brun sieve). - Charles R Greathouse IV, Nov 01 2022

A117530 Triangle read by rows: T(n,k) = k^2 - k + prime(n), 1<=k<=n.

Original entry on oeis.org

2, 3, 5, 5, 7, 11, 7, 9, 13, 19, 11, 13, 17, 23, 31, 13, 15, 19, 25, 33, 43, 17, 19, 23, 29, 37, 47, 59, 19, 21, 25, 31, 39, 49, 61, 75, 23, 25, 29, 35, 43, 53, 65, 79, 95, 29, 31, 35, 41, 49, 59, 71, 85, 101, 119, 31, 33, 37, 43, 51, 61, 73, 87, 103, 121, 141, 37, 39, 43, 49, 57
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 25 2006

Keywords

Comments

A117531 gives the number of primes in the n-th row;
if T(n,1) is a Lucky Number of Euler then A117531(n)=n, see A014556.

Examples

			T(5,k)=A048058(k)=A048059(k), 1<=k<=5: T(5,1)=A014556(4)=11;
T(7,k)=A007635(k), 1<=k<=7: T(7,1)=A014556(5)=17;
T(13,k)=A005846(k), 1<=k<=13: T(13,1)=A014556(6)=41.
		

Crossrefs

Programs

Formula

T(n,1) = A000040(k).
T(n,2) = A052147(k) for k>1.
For 1

A027752 Numbers k such that k^2 + k + 3 is prime.

Original entry on oeis.org

0, 1, 4, 7, 10, 19, 22, 25, 34, 37, 55, 70, 79, 94, 100, 112, 130, 139, 154, 157, 160, 172, 175, 187, 190, 217, 220, 229, 232, 250, 259, 262, 274, 289, 295, 304, 307, 322, 325, 334, 337, 364, 367, 370, 382, 397, 400, 415, 439, 442, 472, 475, 484
Offset: 1

Keywords

Crossrefs

Programs

Showing 1-10 of 26 results. Next