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.

A002384 Numbers m such that m^2 + m + 1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 12, 14, 15, 17, 20, 21, 24, 27, 33, 38, 41, 50, 54, 57, 59, 62, 66, 69, 71, 75, 77, 78, 80, 89, 90, 99, 101, 105, 110, 111, 117, 119, 131, 138, 141, 143, 147, 150, 153, 155, 161, 162, 164, 167, 168, 173, 176, 188, 189, 192, 194, 203, 206, 209, 215
Offset: 1

Views

Author

Keywords

Comments

A002383 lists the corresponding primes. - Bernard Schott, Dec 22 2012
This is also the list of bases where 111 represents a prime number. - Christian N. K. Anderson, Mar 28 2013
If d>1 divides m^2 + m + 1, then m + k*d is not in the sequence, for all k>=1. - Gionata Neri, Mar 04 2017

References

  • A. J. C. Cunningham, Binomial Factorisations, Vols. 1-9, Hodgson, London, 1923-1929; see Vol. 1, pp. 245-259.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 46.
  • L. Poletti, Le serie dei numeri primi appartenente alle due forme quadratiche (A) n^2+n+1 e (B) n^2+n-1 per l'intervallo compreso entro 121 milioni, e cioè per tutti i valori di n fino a 11000, Atti della Reale Accademia Nazionale dei Lincei, Memorie della Classe di Scienze Fisiche, Matematiche e Naturali, s. 6, v. 3 (1929), pages 193-218.
  • 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

Formula

a(n) = (A088503(n) - 1)/2. - Ray Chandler

Extensions

Extended by Ray Chandler, Sep 07 2005

A049407 Numbers m such that m^3 + m + 1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 9, 12, 15, 17, 18, 21, 29, 30, 32, 39, 41, 42, 44, 48, 53, 54, 56, 60, 69, 71, 74, 77, 83, 87, 95, 102, 104, 108, 116, 117, 120, 126, 131, 135, 143, 144, 146, 152, 153, 155, 162, 168, 177, 179, 180, 186, 191, 207, 212, 219, 221, 225, 239, 240, 243
Offset: 1

Views

Author

Keywords

Comments

For s = 5, 8, 11, 14, 17, 20, ... (A016789(s) for s>=2), m_s = 1 + m + m^s is composite for m>1. Also for m=1, m_s = 3 is a prime for any s. Here we consider the case s=3.
If m == 1 (mod 3), m_s == 0 (mod 3) for any s and is not prime for m > 1. Thus for n > 1, a(n) !== 1 (mod 3) and this is true for any similar sequence based on another s value (A002384, A049408, A075723). - Jean-Christophe Hervé, Sep 20 2014
Corresponding primes are in A095692.

Examples

			3 is a term because 1 + 3 + 3^3 = 31 is a prime.
		

Crossrefs

Cf. A002384 (s=2), A049408 (s=4), A075723 (s=6).
Cf. A095692 (corresponding primes).

Programs

  • Magma
    [n: n in [0..300] | IsPrime(s) where s is 1+&+[n^i: i in [1..3 by 2]]]; // Vincenzo Librandi, Jun 27 2014
    
  • Maple
    A049407:=n->`if`(isprime(n^3+n+1), n, NULL): seq(A049407(n), n=1..300); # Wesley Ivan Hurt, Nov 14 2014
  • Mathematica
    Select[Range[500], PrimeQ[Total[#^Range[1, 3, 2]] + 1] &] (* Vincenzo Librandi, Jun 27 2014 *)
  • PARI
    is(n)=isprime(n^3+n+1) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import isprime
    def ok(m): return isprime(m**3 + m + 1)
    print([m for m in range(244) if ok(m)]) # Michael S. Branicky, Feb 17 2022

A049408 Numbers k such that k^4 + k + 1 is prime.

Original entry on oeis.org

1, 2, 5, 6, 9, 11, 12, 14, 24, 26, 32, 36, 44, 47, 60, 69, 72, 74, 77, 89, 90, 102, 107, 119, 126, 131, 146, 147, 159, 162, 170, 171, 186, 191, 197, 204, 206, 219, 239, 240, 252, 266, 284, 285, 290, 296, 300, 324, 347, 351, 362, 384, 426, 437, 459, 465, 470
Offset: 1

Views

Author

Keywords

Comments

For s = 5,8,11,14,17,20,..., n_s = 1 + n + n^s is always composite for any n > 1. Also for n=1, n_s=3 is a prime for any s. Here we consider the case s=4.

Examples

			26 is a term because at s=4, n=26, n_s = 1 + n + n^s = 457003 is a prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(s) where s is 1+n+n^4]; // Vincenzo Librandi, Jul 28 2014
  • Mathematica
    Select[Range[1000], PrimeQ[1 + # + #^4] &] (* Vincenzo Librandi, Jul 28 2014 *)
  • PARI
    for(n=1, 1000, if(isprime(1+n+n^4), print1(n",")))
    

A075722 Numbers n such that 1 + n + n^s is a prime, s = 7.

Original entry on oeis.org

1, 2, 15, 21, 29, 39, 42, 53, 57, 77, 81, 92, 117, 123, 131, 147, 149, 153, 167, 168, 200, 204, 207, 233, 249, 251, 252, 275, 278, 314, 317, 326, 357, 372, 378, 380, 410, 422, 434, 438, 440, 462, 467, 468, 498, 516, 546, 585, 587, 596, 608, 615, 621, 636
Offset: 1

Views

Author

Zak Seidov, Oct 03 2002

Keywords

Comments

For s = 5,8,11,14,17,20,..., n_s=1+n+n^s is always composite for any n>1. Also at n=1, n_s=3 is a prime for any s. So it is interesting to consider only the cases of s != 5,8,11,14,17,20,... and n>1. Here I consider the case s=7 and find several first n's making n_s a prime (or a probable prime).

Examples

			15 is OK because at s=7, n=15, n_s = 1 + n + n^s = 170859391 is a prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(s) where s is 1+n+n^7]; // Vincenzo Librandi, Jul 28 2014
    
  • Mathematica
    Select[Range[1000], PrimeQ[1 + # + #^7] &] (* Vincenzo Librandi, Jul 28 2014 *)
  • PARI
    for(n=1,10^3,if(isprime(n^7+n+1),print1(n,", "))) \\ Derek Orr, Feb 07 2015

Extensions

More terms from Ralf Stephan, Apr 05 2003

A245476 Least number k > 1 such that k^n + k + 1 is prime, or 0 if no such number exists.

Original entry on oeis.org

2, 2, 2, 2, 0, 2, 2, 0, 3, 3, 0, 2, 5, 0, 2, 2, 0, 2, 8, 0, 6, 3, 0, 6, 15, 0, 6, 2, 0, 2, 23, 0, 23, 56, 0, 15, 114, 0, 14, 11, 0, 3, 14, 0, 29, 110, 0, 21, 9, 0, 53, 59, 0, 6, 2, 0, 3, 29, 0, 71, 21, 0, 146, 17, 0, 35, 2, 0, 9, 6, 0, 77, 41, 0, 27, 176, 0, 153, 21, 0, 39, 32, 0, 2, 314, 0, 3, 5, 0, 66, 44, 0, 234
Offset: 1

Views

Author

Derek Orr, Jul 23 2014

Keywords

Comments

Except for a(2), a(n) = 0 if n == 2 mod 3 (A016789).
It appears that this is an "if and only if".
a(n) = 2 if and only if n is in A057732.
Many terms in the linked table correspond to probable primes. If n == 2 mod 3 then k^2+k+1 divides k^n+k+1. This is why a(n) = 0 if n > 2 and n == 2 mod 3. - Jens Kruse Andersen, Jul 28 2014

Examples

			2^9 + 2 + 1 = 515 is not prime. 3^9 + 3 + 1 = 19687 is prime. Thus a(9) = 3.
		

Crossrefs

Cf. Numbers n such that n^s + n + 1 is prime: A005097 (s = 1), A002384 (s = 2), A049407 (s = 3), A049408 (s = 4), A075723 (s = 6), A075722 (s = 7), A075720 (s = 9), A075719 (s = 10), A075718 (s = 12), A075717 (s = 13), A075716 (s = 15), A075715 (s = 16), A075714 (s = 18), A075713 (s = 19).

Programs

  • Maple
    f:= proc(n) local k;
       if n mod 3 = 2 and n > 2 then return 0 fi;
       for k from 2 to 10^6 do
          if isprime(k^n+k+1) then return k fi
       od:
      error("no solution found for n = %1",n);
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Jul 27 2014
  • PARI
    a(n) = if(n>2&&n==Mod(2, 3), return(0)); k=2; while(!ispseudoprime(k^n+k+1), k++); k
    vector(150, n, a(n)) \\ Derek Orr with corrections and improvements from Colin Barker, Jul 23 2014
Showing 1-5 of 5 results.