login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049407 Numbers m such that m^3 + m + 1 is prime. 39

%I #39 Feb 21 2022 20:31:27

%S 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,

%T 71,74,77,83,87,95,102,104,108,116,117,120,126,131,135,143,144,146,

%U 152,153,155,162,168,177,179,180,186,191,207,212,219,221,225,239,240,243

%N Numbers m such that m^3 + m + 1 is prime.

%C 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.

%C 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

%C Corresponding primes are in A095692.

%H T. D. Noe, <a href="/A049407/b049407.txt">Table of n, a(n) for n = 1..1000</a>

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

%p A049407:=n->`if`(isprime(n^3+n+1), n, NULL): seq(A049407(n), n=1..300); # _Wesley Ivan Hurt_, Nov 14 2014

%t Select[Range[500], PrimeQ[Total[#^Range[1, 3, 2]] + 1] &] (* _Vincenzo Librandi_, Jun 27 2014 *)

%o (PARI) is(n)=isprime(n^3+n+1) \\ _Charles R Greathouse IV_, Nov 20 2012

%o (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

%o (Python)

%o from sympy import isprime

%o def ok(m): return isprime(m**3 + m + 1)

%o print([m for m in range(244) if ok(m)]) # _Michael S. Branicky_, Feb 17 2022

%Y Cf. A002384 (s=2), A049408 (s=4), A075723 (s=6).

%Y Cf. A095692 (corresponding primes).

%K nonn,easy,nice

%O 1,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)