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.

A257772 Numbers n>=0 such that (n+1)^3 - n^3 = 3*n^2+3*n+1 is not prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Complement of A111251.
Includes all members of A047383 except 1. - Robert Israel, May 12 2015

Examples

			5 is a term since (5+1)^3 - 5^3 = 91 = 13*7 is not prime.
		

Crossrefs

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