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

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

A056561 Numbers n such that n^2 + n + 41 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78
Offset: 1

Views

Author

Henry Bottomley, Jun 26 2000

Keywords

Comments

Among first 100000 terms, the only run of 13 subsequent values >39 is 219..231. - Zak Seidov, Jan 28 2009
Number of terms less than 10^n: 1, 10, 86, 581, 4149, 31985, 261081, 2208197, 19132652, ... . - Robert G. Wilson v, Apr 20 2015
Complement of A007634. - Robert Israel, Apr 20 2015

Examples

			39 is in the sequence because 39^2+39+41=1601 which is prime but 40 is not because 40^2+40+41=1681=41*41.
		

References

  • P. Hoffman, Archimedes' Revenge, pp. 39-40,Penguin Books 1988.

Crossrefs

Programs

  • Haskell
    a056561 n = a056561_list !! (n-1)
    a056561_list = filter ((== 1) . a010051' . a202018) [0..]
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Magma
    [n: n in [0..80] |IsPrime(n^2 + n + 41)]; // Vincenzo Librandi, Sep 28 2012
    
  • Maple
    select(t -> isprime(t^2+t+41), [$0..100]); # Robert Israel, Apr 20 2015
  • Mathematica
    Select[Range[80], PrimeQ[#^2 + # + 41] &] (* Vincenzo Librandi, Sep 28 2012 *)
  • PARI
    is(n)=isprime(n^2+n+41) \\ Charles R Greathouse IV, Sep 02 2015

Formula

a(n) = (sqrt(4*A005846(n)-163)-1)/2.
a(n) = A002837(n+1)-1. - Robert Price, Nov 08 2019

A087370 Numbers n such that 3n - 1 is a prime.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 14, 16, 18, 20, 24, 28, 30, 34, 36, 38, 44, 46, 50, 56, 58, 60, 64, 66, 76, 78, 80, 84, 86, 88, 90, 94, 98, 104, 106, 116, 118, 120, 128, 130, 134, 140, 144, 148, 150, 154, 156, 160, 164, 168, 170, 174, 186, 188, 190, 196, 198, 200, 206, 214, 216
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 21 2003

Keywords

Comments

3*n - 1 is an Eisenstein prime. - Vincenzo Librandi, Aug 08 2010
For all elements of this sequence there are no pairs (x,y) of positive integers such that a(n) = 3*x*y - x + y. - Pedro Caceres, Jan 28 2021

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

A003627 gives primes, A091177 gives prime index.
Cf. A010051, subsequence of A016789, A259645.

Programs

  • Haskell
    a087370 n = a087370_list !! (n-1)
    a087370_list = filter ((== 1) . a010051' . subtract 1 . (* 3)) [0..]
    -- Reinhard Zumkeller, Jul 03 2015

Formula

a(n)= A024893(n) + 1 = A088879(n) + 2.

Extensions

Corrected and extended by Ray Chandler, Oct 22 2003

A342814 Numbers k such that k - 1 and floor(k/5) are both prime.

Original entry on oeis.org

12, 14, 18, 38, 68, 98, 158, 308, 338, 368, 398, 488, 548, 758, 788, 908, 968, 998, 1118, 1568, 1658, 1748, 1868, 1988, 2288, 2438, 2618, 2708, 2858, 2888, 3038, 3068, 3218, 3308, 3458, 3548, 3638, 3698, 3848, 4058
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 22 2021

Keywords

Comments

Except for a(1) and a(2), all terms == 8 (mod 10).
The first three absolute differences (d) between two consecutive floor(k/5) are respectively equal to 0, 1 and 4 and all the others to 6 or a multiple of 6.
Subsequence of A008864, by definition. - Michel Marcus, Mar 22 2021
For n >= 3, a(n) = 5*A023217(n-2) + 3. Higher terms also coincide with A265767 + 1. - Hugo Pfoertner, Mar 22 2021

Examples

			12 is a term because 12 - 1 = 11 and 11 is prime and 12/5 = 2.4 whose floor value is 2 and 2 is also prime.
97 is not a term because 97 - 1 = 96 and 96 is not prime although floor(97/5) = 19 is prime.
Initial terms, associated primes and d:
          k       k - 1     floor(k/5)     d
a(1)     12        11          2
a(2)     14        13          2           0
a(3)     18        17          3           1
a(4)     38        37          7           4
a(5)     68        67         13           6
a(6)     98        97         19           6
a(7)    158       157         31          12
a(8)    308       307         61          30
a(9)    338       337         67           6
a(10)   368       367         73           6
		

Crossrefs

Programs

  • Maple
    R:= NULL:
    p:= 1: count:= 0:
    while count < 100 do
      p:= nextprime(p);
      if isprime(floor((p+1)/5)) then
         R:= R,p+1; count:= count+1
      fi
    od:
    R; # Robert Israel, May 22 2024
  • Mathematica
    Select[Range[2,5000,2],And@@PrimeQ[{#-1,Floor[#/5]}]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
  • PARI
    for(k = 1,10000,if(isprime(k - 1) && isprime(k\5),print1(k", ")))

A342809 Numbers k such that k-1 and round(k/5) are both prime.

Original entry on oeis.org

8, 12, 14, 24, 54, 84, 114, 234, 264, 294, 354, 444, 504, 564, 654, 684, 744, 864, 954, 984, 1164, 1194, 1284, 1554, 1584, 1734, 1914, 2004, 2154, 2214, 2244, 2334, 2394, 2544, 2844, 2964, 3084, 3204, 3414, 3594
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 22 2021

Keywords

Comments

Except for a(1) and a(2), all terms == 4 (mod 10).
The first three absolute differences (d) between two consecutive rounded (k/5) are respectively equal to 0, 1 and 2 and all the others to 6 or a multiple of 6.
Subsequence of A008864, by definition. - Michel Marcus, Mar 22 2021
For n >= 3, a(n) = 5*A158318(n-2) - 1. - Hugo Pfoertner, Mar 22 2021

Examples

			8 is a term because 8 - 1 = 7 and 7 is prime and 8/5 = 1.6 which when rounded gives 2 and 2 is also prime.
235 is not a term because 235 - 1 = 234 and 234 is not a prime although 235/5 = 47 is prime.
Initial terms, associated primes and d:
         k     k - 1   round(k/5)    d
a(1)     8       7         2
a(2)    12      11         2         0
a(3)    14      13         3         1
a(4)    24      23         5         2
a(5)    54      53        11         6
a(6)    84      83        17         6
a(7)   114     113        23         6
a(8)   234     233        47        24
a(9)   264     263        53         6
a(10)  294     293        59         6
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2,5000,2],And@@PrimeQ[{#-1,Round[#/5]}]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
  • PARI
    for(k = 1,10000,if(isprime(k - 1) && isprime(k\/5),print1(k", ")))
    
  • Python
    from sympy import isprime
    A342809_list = [k for k in range(1,10**5) if isprime(k-1) and isprime(k//5+int(k % 5 > 2))] # Chai Wah Wu, Apr 08 2021
Showing 1-5 of 5 results.