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

A002648 A variant of the cuban primes: primes p = (x^3 - y^3)/(x - y) where x = y + 2.

Original entry on oeis.org

13, 109, 193, 433, 769, 1201, 1453, 2029, 3469, 3889, 4801, 10093, 12289, 13873, 18253, 20173, 21169, 22189, 28813, 37633, 43201, 47629, 60493, 63949, 65713, 69313, 73009, 76801, 84673, 106033, 108301, 112909, 115249, 129793, 139969, 142573, 147853, 169933
Offset: 1

Views

Author

Keywords

Comments

Primes p such that p = 1 + 3*m^2 for some integer m (A111051). - Michael Somos, Sep 15 2005

Examples

			193 is a term since 193 = (9^3 - 7^3)/(9 - 7) is a prime.
		

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • 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).

Crossrefs

Cf. A002407, A111051 (values of m).
A subsequence of A007645.

Programs

  • Magma
    [a: n in [0..400] | IsPrime(a) where a is 3*n^2+1]; // Vincenzo Librandi, Dec 02 2011
  • Mathematica
    Select[Table[3n^2+1,{n,0,700}],PrimeQ] (* Vincenzo Librandi, Dec 02 2011 *)
  • PARI
    {a(n)= local(m, c); if(n<1, 0, c=0; m=1; while( cMichael Somos, Sep 15 2005 */
    

Formula

a(n) = 3*A111051(n)^2 + 1. - Paul F. Marrero Romero, Nov 03 2023

Extensions

Entry revised by N. J. A. Sloane, Jan 29 2013

A062325 Numbers k for which phi(prime(k)) is a square.

Original entry on oeis.org

1, 3, 7, 12, 26, 45, 55, 79, 106, 123, 211, 252, 422, 446, 595, 723, 907, 1019, 1101, 1448, 1595, 1687, 1797, 1849, 1949, 2058, 2393, 2516, 2703, 2819, 3146, 3339, 3477, 3626, 4353, 4437, 4590, 5153, 5398, 5653, 5836, 6276, 6543, 6736, 6911, 7207, 7695
Offset: 1

Views

Author

Jason Earls, Jul 05 2001

Keywords

Comments

Also A002496 indexed by A000040.

Examples

			79 is in the sequence because the 79th prime is 401 and phi(401) is 400 = 20^2.
595 is in the sequence because the 595th prime is 4357 and phi(4357) is 4356 = 66^2.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Table[IntegerQ[Sqrt[Prime[w]-1]], {w, 1, 25000}], True]]
    Flatten[Position[EulerPhi[Prime[Range[8000]]],?(IntegerQ[Sqrt[#]]&)]] (* _Harvey P. Dale, Apr 23 2014 *)
  • PARI
    for(n=1,1600, if(issquare(eulerphi(prime(n))),print(n)))
    
  • PARI
    { default(primelimit, 2*10^8); n=m=0; forprime (p=2, 2*10^8, m++; if (issquare(eulerphi(p)), write("b062325.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 05 2009

Formula

a(n) = A000720(A002496(n)).
A000040(a(n)) = A002496(n).

Extensions

More terms from Labos Elemer, Jul 09 2001

A090693 Positive numbers n such that n^2 - 2n + 2 is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 15, 17, 21, 25, 27, 37, 41, 55, 57, 67, 75, 85, 91, 95, 111, 117, 121, 125, 127, 131, 135, 147, 151, 157, 161, 171, 177, 181, 185, 205, 207, 211, 225, 231, 237, 241, 251, 257, 261, 265, 271, 281, 285, 301, 307, 315, 327, 341, 351, 385, 387, 397
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 19 2003

Keywords

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

A002496 gives primes, A062325 gives prime index. Cf. A001912.
A005574(n+1) + 1.

Programs

  • Mathematica
    a={};Do[If[PrimeQ[n^2-2n+2],AppendTo[a,n]],{n,1000}];a (* Peter J. C. Moses, Apr 02 2013 *)
    Select[Range[400],PrimeQ[#^2-2#+2]&] (* Harvey P. Dale, May 10 2013 *)
  • Python
    # Python 3.2 or higher required.
    from itertools import accumulate
    from sympy import isprime
    A090693_list = [i for i,n in enumerate(accumulate(range(10**5),lambda x,y:x+2*y-3)) if i > 0 and isprime(n+2)] # Chai Wah Wu, Sep 23 2014

Formula

a(n) = A005574(n)+1.

Extensions

Corrected and extended by Ray Chandler, Dec 28 2003
Definition corrected by Chai Wah Wu, Sep 23 2014

A002646 Half-quartan primes: primes of the form p = (x^4 + y^4)/2.

Original entry on oeis.org

41, 313, 353, 1201, 3593, 4481, 7321, 8521, 10601, 14281, 14321, 14593, 21601, 26513, 32633, 41761, 41801, 42073, 42961, 49081, 56041, 66361, 67073, 72481, 90473, 97241, 97553, 104561, 106921, 111521, 139921, 141121, 165233, 195353, 198593
Offset: 1

Views

Author

Keywords

Comments

The 1001-digit number ((10^250 + 5659)^4 + (10^250 + 5661)^4)/2 is currently the largest known half-quartan prime. - Paul Muljadi, Mar 03 2011
The largest known is now ((2*3960926^2048 + 1)^4 + 1^4)/2 with 54051 digits. - Jens Kruse Andersen, Mar 20 2011
Primes of the form p = a^2 + b^2 with a > b > 0 such that a + b and a - b are squares. - Thomas Ordowski, Jul 07 2016
Primes p = a^2 + b^2 with a > b > 0 such that a^2 - b^2 is a square. - Thomas Ordowski, Feb 14 2017
Primes p > 5 such that the Diophantine equation X^4 + Y^2 = p^2 has a solution X,Y with nonzero X. Then X must be odd. - Thomas Ordowski and Robert G. Wilson v, Nov 29 2017

Examples

			41 is in the sequence since it is prime and 41 = (3^4 + 1^4)/2. - _Michael B. Porter_, Jul 07 2016
		

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 41, p. 16, Ellipses, Paris 2008.
  • 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).

Crossrefs

Programs

  • Haskell
    a002646 n = a002646_list !! (n-1)
    a002646_list = [hqp | x <- [1, 3 ..], y <- [1, 3 .. x - 1],
                          let hqp = div (x ^ 4 + y ^ 4) 2, a010051' hqp == 1]
    -- Reinhard Zumkeller, Jul 15 2013
  • Maple
    N:= 10^6: # to get all terms <= N
    sort(select(isprime, convert({seq(seq((x^4+y^4)/2, y=x..floor((2*N-x^4)^(1/4)),2),x=1..floor((2*N-1)^(1/4)),2)},list))); # Robert Israel, Jul 11 2016
  • Mathematica
    nmax = 200000; jmax = Floor[(nmax/8)^(1/4)]; s = {}; Do[n = ((2 j + 1)^4 + (2 k + 1)^4)/2; If[n <= nmax && PrimeQ[n], AppendTo[s, n]], {j, 0, jmax}, {k, j,  jmax}]; Union[s] (* Jean-François Alcover, Mar 23 2011 *)
    Sort[Select[Total/@(Union[Sort/@Tuples[Range[0,50],2]]^4)/2,PrimeQ]] (* Harvey P. Dale, Feb 12 2012 *)

Extensions

More terms from Len Smiley

A214517 Differences between the numbers n such that 4n^2 + 1 is prime.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 2, 1, 5, 2, 7, 1, 5, 4, 5, 3, 2, 8, 3, 2, 2, 1, 2, 2, 6, 2, 3, 2, 5, 3, 2, 2, 10, 1, 2, 7, 3, 3, 2, 5, 3, 2, 2, 3, 5, 2, 8, 3, 4, 6, 7, 5, 17, 1, 5, 2, 3, 7, 5, 3, 2, 2, 10, 1, 2, 2, 8, 3, 20, 4, 6, 7, 3, 4, 5, 20, 1, 4, 1, 4, 10, 3, 3, 2, 3
Offset: 1

Views

Author

T. D. Noe, Aug 06 2012

Keywords

Comments

Sequence A001912 has the values of n. This sequence is the first differences of A001912.

Crossrefs

Cf. A121326 (primes of the form 1+4*n^2), A001912 (values of n).

Programs

  • Mathematica
    Differences[Select[Range[100], PrimeQ[1 + 4*#^2] &, 101]]

Formula

a(n) = A214516(n)/2 for n > 1.

A002649 Quintan primes: p = (x^5 - y^5)/(x - y).

Original entry on oeis.org

5, 31, 211, 1031, 2801, 4651, 5261, 6841, 8431, 14251, 17891, 20101, 21121, 22621, 22861, 26321, 30941, 33751, 36061, 41141, 46021, 48871, 51001, 58411, 61051, 88741, 92821, 103801, 109141, 114641, 118061, 125591, 170101, 176641, 209801
Offset: 1

Views

Author

Keywords

Comments

5 is a term because x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4 = 5 when x=y=1. - N. J. A. Sloane, May 12 2014

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 2, p. 200.
  • 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).

Crossrefs

Cf. A002650.

Programs

  • PARI
    m=10^6; v=[5]; for(x=1, m^(1/4), for(y=1, x-1, n=(x^5-y^5)/(x-y); if(n<=m && isprime(n), v=concat(v,n)))); vecsort(v) \\ Jens Kruse Andersen, Jul 14 2014

Extensions

a(26)-a(35) from Sean A. Irvine, May 08 2014

A002641 Numbers k such that (k^2 + k + 1)/7 is prime.

Original entry on oeis.org

4, 9, 11, 23, 32, 39, 44, 51, 53, 60, 65, 72, 86, 93, 95, 114, 123, 156, 170, 179, 186, 200, 207, 212, 219, 228, 233, 240, 249, 261, 270, 303, 317, 333, 338, 345, 375, 389, 401, 443, 452, 473, 480, 492, 515, 534, 548, 564, 578, 585, 597, 599, 611, 641, 660, 662
Offset: 1

Views

Author

Keywords

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • 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).

Crossrefs

Subsequence of A047348.

Programs

Extensions

More terms from Jon E. Schoenfield, Mar 24 2010

A002642 Numbers k such that (k^2 + k + 1)/13 is prime.

Original entry on oeis.org

9, 29, 35, 42, 48, 113, 120, 126, 152, 185, 204, 224, 237, 243, 276, 302, 308, 321, 341, 386, 399, 419, 432, 477, 503, 510, 516, 542, 549, 588, 633, 659, 666, 705, 731, 770, 776, 783, 789, 815, 848, 854, 887, 906, 932, 945, 965, 978
Offset: 1

Views

Author

Keywords

Comments

All terms are congruent to 3 or 9 (mod 13). [Bruno Berselli, Sep 26 2012]

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • 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).

Programs

  • Magma
    I:=[m: m in [1..1000] | m mod 13 in [3,9]];
    [n: n in I | IsPrime( (n^2 + n + 1) div 13 )];
    // Bruno Berselli, Sep 26 2012
  • Mathematica
    Select[Range[1000], PrimeQ[(#^2 + # + 1)/13]&] (* Vincenzo Librandi, Sep 25 2012 *)
  • PARI
    forstep(n=9,1e4,[7,6],if(isprime((n^2+n+1)/13),print1(n", "))) \\ Charles R Greathouse IV, Sep 25 2012
    

A325437 Final digit of primes of the form k^2 + 1.

Original entry on oeis.org

2, 5, 7, 7, 1, 7, 7, 1, 7, 7, 7, 1, 7, 7, 7, 7, 7, 1, 7, 1, 7, 1, 7, 7, 1, 7, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 7, 1, 7, 1, 1, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 1, 7, 7, 7, 1, 7, 1, 1, 7, 1, 7, 7, 7, 1, 7, 1, 7, 7, 7, 7, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 7, 1, 7
Offset: 1

Views

Author

Martin Renner, Apr 27 2019

Keywords

Comments

This sequence is presumably infinite. See 1st comment of A002496.
For k > 2, i.e., primes > 5 the final digit is always 1 or 7. Proof: Let k = 2*m - 1 odd. Then k^2 + 1 is divisible by 2, hence prime only for m = 1. Let k = 2*m even. Then k^2 + 1 = 4*m^2 + 1. The final digit of multiples of four is 4, 8, 2, 6, 0, 4, 8, 2, 6, 0, ... and of squares 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, ... (cf. A008959), hence the last digit of the product 4*m^2 is 4, 6, 6, 4, 0, ... or of the sum 4*m^2 + 1 is 5, 7, 7, 5, 1, ... (cf. A053755) and therefore for primes > 5 the final digit is 1 or 7.
Accordingly, for large k approximately one-third of the primes of the form k^2 + 1 end in 1, two-thirds end in 7.

Crossrefs

Programs

  • Maple
    seq(k mod 10,k=select(isprime,[2,seq(4*i^2+1,i=1..10000)]));
  • Mathematica
    Mod[#,10]&/@Select[Range[1000]^2+1,PrimeQ] (* Harvey P. Dale, Jul 05 2023 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (issquare(p-1), print1(p % 10, ", ")););} \\ Michel Marcus, May 07 2019

Formula

a(n) = A002496(n) mod 10.

A002640 Numbers k such that (k^2 + k + 1)/3 is prime.

Original entry on oeis.org

4, 7, 10, 13, 19, 28, 31, 34, 40, 43, 52, 70, 73, 76, 82, 85, 91, 97, 103, 112, 115, 124, 127, 136, 145, 148, 157, 166, 175, 187, 190, 199, 202, 223, 241, 244, 259, 265, 271, 274, 280, 286, 316, 325, 358, 370, 376, 385, 388, 409, 421, 427, 442, 460, 469, 472
Offset: 1

Views

Author

Keywords

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • 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).

Crossrefs

Cf. A002384.

Programs

  • Magma
    [n: n in [4..500] | IsPrime((n^2+n+1) div 3)]; // Vincenzo Librandi, Nov 18 2010
    
  • Mathematica
    Select[Range[500], PrimeQ[(#^2 + # + 1)/3] &] (* Vincenzo Librandi, Sep 25 2012 *)
  • PARI
    isok(k) = my(x=k^2+k+1); !(x%3) && isprime(x/3); \\ Michel Marcus, Aug 22 2025
Previous Showing 11-20 of 43 results. Next