A257772 Numbers n>=0 such that (n+1)^3 - n^3 = 3*n^2+3*n+1 is not prime.
0, 5, 7, 8, 12, 15, 16, 18, 19, 20, 21, 22, 26, 29, 31, 33, 35, 36, 39, 40, 43, 44, 46, 47, 50, 51, 53, 54, 56, 57, 59, 60, 61, 64, 65, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 82, 83, 84, 85, 87, 89, 92, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106
Offset: 1
Examples
5 is a term since (5+1)^3 - 5^3 = 91 = 13*7 is not prime.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[n: n in [0..120] | not IsPrime(3*n^2+3*n+1)]; // Vincenzo Librandi, May 13 2015
-
Maple
remove(t -> isprime((t+1)^3-t^3), [$0..300]); # Robert Israel, May 12 2015
-
Mathematica
Select[Range[0, 200], ! PrimeQ[(#+1)^3 - #^3] &] (* Giovanni Resta, May 08 2015 *)
-
PARI
for(n=0,100,if(!isprime(3*n^2+3*n+1),print1(n,", "))) \\ Derek Orr, May 19 2015
-
UBASIC
10 print 0 20 for n=1 to 200 30 s = (n+1)^3 - n^3 40 if prmdiv(s)<>s then print n 50 next n
Formula
a(n) ~ n. - Charles R Greathouse IV, May 22 2015
Comments