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

A005574 Numbers k such that k^2 + 1 is prime.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 16, 20, 24, 26, 36, 40, 54, 56, 66, 74, 84, 90, 94, 110, 116, 120, 124, 126, 130, 134, 146, 150, 156, 160, 170, 176, 180, 184, 204, 206, 210, 224, 230, 236, 240, 250, 256, 260, 264, 270, 280, 284, 300, 306, 314, 326, 340, 350, 384, 386, 396
Offset: 1

Views

Author

Keywords

Comments

Hardy and Littlewood conjectured that the asymptotic number of elements in this sequence not exceeding n is approximately c*sqrt(n)/log(n) for some constant c. - Stefan Steinerberger, Apr 06 2006
Also, nonnegative integers such that a(n)+i is a Gaussian prime. - Maciej Ireneusz Wilczynski, May 30 2011
Apparently Goldbach conjectured that any a > 1 from this sequence can be written as a=b+c where b and c are in this sequence (Lemmermeyer link below). - Jeppe Stig Nielsen, Oct 14 2015
No term > 2 can be both in this sequence and in A001105 because of the Aurifeuillean factorization (2*k^2)^2 + 1 = (2*k^2 - 2*k + 1) * (2*k^2 + 2*k + 1). - Jeppe Stig Nielsen, Aug 04 2019

References

  • Harvey Dubner, "Generalized Fermat primes", J. Recreational Math., 18 (1985): 279-280.
  • R. K. Guy, "Unsolved Problems in Number Theory", 3rd edition, A2.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 15, Thm. 17.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": this sequence (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).
Cf. A010051, A259645, A295405 (characteristic function).

Programs

  • Haskell
    a005574 n = a005574_list !! (n-1)
    a005574_list = filter ((== 1) . a010051' . (+ 1) . (^ 2)) [0..]
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Magma
    [n: n in [0..400] | IsPrime(n^2+1)]; // Vincenzo Librandi, Nov 18 2010
    
  • Mathematica
    Select[Range[350], PrimeQ[ #^2 + 1] &] (* Stefan Steinerberger, Apr 06 2006 *)
    Join[{1},2Flatten[Position[PrimeQ[Table[x^2+1,{x,2,1000,2}]],True]]]  (* Fred Patrick Doty, Aug 18 2017 *)
  • PARI
    isA005574(n) = isprime(n^2+1) \\ Michael B. Porter, Mar 20 2010
    
  • PARI
    for(n=1, 1e3, if(isprime(n^2 + 1), print1(n, ", "))) \\ Altug Alkan, Oct 14 2015
    
  • Python
    from sympy import isprime; [print(n, end = ', ') for n in range(1, 400) if isprime(n*n+1)] # Ya-Ping Lu, Apr 23 2025

Formula

a(n) = A090693(n) - 1.
a(n) = 2*A001912(n-1) for n > 1. - Jeppe Stig Nielsen, Aug 04 2019

A056899 Primes of the form k^2 + 2.

Original entry on oeis.org

2, 3, 11, 83, 227, 443, 1091, 1523, 2027, 3251, 6563, 9803, 11027, 12323, 13691, 15131, 21611, 29243, 47963, 50627, 56171, 59051, 62003, 65027, 74531, 88211, 91811, 95483, 103043, 119027, 123203, 131771, 136163, 140627, 149771, 173891
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Comments

Also, primes of the form k^2 - 2k + 3.
Note that all terms after the first two are equal to 11 modulo 72 and that (a(n)-11)/72 is a triangular number, since they have to be 2 more than the square of an odd multiple of 3 to be prime, and if k = 6*m+3 then a(n) = k^2 + 2 = 72*m*(m+1)/2 + 11.
The quotient cycle length is 2 in the continued fraction expansion of sqrt(p) for these primes. E.g.: cfrac(sqrt(6563),6) = 81+1/(81+1/(162+1/(81+1/(162+1/(81+1/(162+`...`)))))). - Labos Elemer, Feb 22 2001
Primes in A059100; except for a(2)=3 a subsequence of A007491 and congruent to 2 modulo 9. For n>2, a(n)=11 (mod 72). - M. F. Hasler, Apr 05 2009

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.

Crossrefs

Intersection of A146327 and A000040; intersection of A059100 and A000040.
Cf. A002496.

Programs

  • Magma
    [n: n in PrimesUpTo(175000) | IsSquare(n-2)];  // Bruno Berselli, Apr 05 2011
    
  • Magma
    [ a: n in [0..450] | IsPrime(a) where a is n^2 +2 ]; // Vincenzo Librandi, Apr 06 2011
    
  • Maple
    select(isprime, [seq(t^2+2, t = 0..1000)]); # Robert Israel, Sep 03 2015
  • Mathematica
    Select[ Range[0, 500]^2 + 2, PrimeQ] (* Robert G. Wilson v, Sep 03 2015 *)
  • PARI
    print1("2, 3");forstep(n=3,1e4,6,if(isprime(t=n^2+2),print1(", "t))) \\ Charles R Greathouse IV, Jul 19 2011

Formula

For n>1, a(n) = 72*A000217(A056900(n-2))+11
a(n) = A067201(n)^2 + 2. - M. F. Hasler, Apr 05 2009

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

Original entry on oeis.org

0, 2, 4, 8, 10, 14, 22, 28, 38, 50, 52, 62, 64, 70, 74, 76, 92, 94, 106, 112, 122, 130, 134, 140, 146, 154, 158, 160, 172, 178, 218, 230, 242, 244, 248, 256, 274, 286, 298, 304, 316, 322, 326, 340, 350, 356, 364, 368, 398, 406, 416, 424, 430, 434, 440, 458, 470
Offset: 1

Views

Author

Paul Jobling (paul.jobling(AT)whitecross.com)

Keywords

Examples

			4^2 + 3 = 19, which is prime.
		

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), this sequence (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

A007591 Numbers k such that k^2 + 4 is prime.

Original entry on oeis.org

1, 3, 5, 7, 13, 15, 17, 27, 33, 35, 37, 45, 47, 57, 65, 67, 73, 85, 87, 95, 97, 103, 115, 117, 125, 135, 137, 147, 155, 163, 167, 177, 183, 193, 203, 207, 215, 217, 233, 235, 243, 245, 253, 255, 265, 267, 275, 277, 287, 293, 303, 307, 313, 317, 347, 357, 373, 375
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), this sequence (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

A078402 Numbers k such that k^2 + 5 is prime.

Original entry on oeis.org

0, 6, 12, 36, 48, 72, 78, 96, 114, 126, 162, 168, 198, 204, 246, 258, 294, 336, 342, 372, 414, 432, 456, 462, 492, 504, 516, 534, 552, 576, 588, 594, 624, 666, 714, 726, 756, 768, 786, 792, 798, 804, 834, 852, 876, 888, 918, 954, 996
Offset: 1

Views

Author

Cino Hilliard, Dec 26 2002

Keywords

Comments

The sum of the reciprocals of the primes generated from these indices converges to 0.2332142.. The sum of the reciprocals of these indices cannot be computed.
All terms are divisible by 6. - Zak Seidov, Dec 27 2014

Crossrefs

For the primes see A056905(n).
Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), this sequence (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

  • Magma
    [n: n in [0..1000]| IsPrime(n^2+5)]; // Vincenzo Librandi, Jul 15 2012
  • Mathematica
    Select[Range[0,1000],PrimeQ[#^2+5]&] (* Vincenzo Librandi, Jul 13 2012 *)
  • PARI
    for(n=0,10^4,q=n^2+5;if(isprime(q),print1(n,", ")));
    

Formula

a(n) = 6 * A056906(n).

Extensions

Offset corrected by Arkadiusz Wesolowski, Aug 09 2011

A106571 Indices n of perfect squares n^2 which are not the difference of two primes.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 25, 27, 29, 31, 35, 37, 41, 43, 47, 49, 51, 53, 55, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 107, 109, 113, 115, 119, 121, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 149, 151, 153, 155
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Comments

Also, n such that 1+n^2 is a nontotient (A005277). - T. D. Noe, Sep 13 2007

Examples

			a(3)=11 because the third square which is not the difference of two primes (121=11^2) is the 11th one in the succession of the perfect squares (thus index 11).
		

Crossrefs

Cf. A067201 (n such that n^2 + 2 is prime).

Formula

a(n) = sqrt(A106564(n)).

Extensions

Extended by Ray Chandler, May 12 2005

A114270 Numbers k such that k^2 + 7 is prime.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 16, 18, 22, 26, 30, 32, 34, 36, 38, 40, 48, 52, 58, 60, 62, 66, 74, 76, 78, 100, 106, 110, 114, 116, 118, 120, 122, 124, 132, 136, 138, 144, 146, 148, 158, 162, 164, 176, 184, 186, 190, 192, 194, 206, 208, 216, 220, 228, 232, 248, 250, 256, 258
Offset: 1

Views

Author

Zak Seidov, Nov 19 2005

Keywords

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), this sequence (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

A114269 Numbers k such that k^2 + 6 is prime.

Original entry on oeis.org

1, 5, 11, 19, 25, 31, 35, 61, 65, 79, 89, 91, 109, 131, 145, 151, 175, 185, 199, 221, 269, 329, 331, 355, 401, 431, 445, 481, 485, 511, 515, 529, 539, 569, 595, 605, 611, 649, 695, 709, 731, 775, 779, 859, 889, 905, 929, 941, 949, 955, 971, 985, 991
Offset: 1

Views

Author

Zak Seidov, Nov 19 2005

Keywords

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

  • Mathematica
    With[{k=6}, Select[Range[1000], PrimeQ[ #^2+k]&]]
  • PARI
    is(n)=isprime(n^2+6) \\ Charles R Greathouse IV, Jan 21 2015

A114272 Numbers k such that k^2 + 9 is prime.

Original entry on oeis.org

2, 8, 10, 20, 32, 38, 40, 52, 58, 62, 70, 82, 88, 98, 100, 110, 112, 118, 140, 142, 160, 170, 188, 190, 200, 202, 212, 218, 220, 242, 298, 308, 320, 332, 350, 358, 368, 380, 382, 400, 410, 412, 422, 448, 472, 482, 490, 502, 512, 530, 538, 542, 568, 572, 578
Offset: 1

Views

Author

Zak Seidov, Nov 19 2005

Keywords

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), this sequence (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).

Programs

Formula

a(n) = 2 * A002970(n). - Michel Marcus, Jan 20 2015

A114273 Numbers k such that k^2 + 10 is prime.

Original entry on oeis.org

1, 3, 7, 11, 13, 27, 31, 39, 49, 53, 57, 59, 71, 77, 81, 83, 91, 97, 99, 101, 123, 127, 129, 141, 151, 157, 161, 169, 171, 179, 181, 189, 207, 209, 211, 223, 227, 237, 239, 249, 253, 291, 311, 319, 333, 343, 363, 367, 379, 393, 403, 413, 423, 427, 437, 447, 449
Offset: 1

Views

Author

Zak Seidov, Nov 19 2005

Keywords

Crossrefs

Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), this sequence (i=10), A114274 (i=11), A114275 (i=12).

Programs

Showing 1-10 of 45 results. Next