login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154112 Numbers n such that (n+1)^3 - n^2 is prime. 3
1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 16, 19, 20, 32, 34, 37, 42, 44, 45, 49, 51, 52, 56, 60, 62, 70, 72, 74, 75, 77, 79, 81, 89, 90, 95, 96, 97, 100, 101, 104, 105, 111, 114, 115, 121, 126, 131, 136, 145, 151, 154, 156, 161, 171, 174, 175, 180, 182, 191, 199, 200, 202, 207 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..2000

EXAMPLE

2^3-1^2=7, 3^3-2^2=23, ....

MATHEMATICA

a[n_]:=(n+1)^3-n^2; lst={}; Do[If[PrimeQ[a[n]], AppendTo[lst, n]], {n, 6!}]; lst

Select[Range[210], PrimeQ[(#+1)^3-#^2]&] (* Harvey P. Dale, Sep 20 2011 *)

PROG

(MAGMA) [n: n in [0..5000] | IsPrime(((n+1)^3-n^2))] # Vincenzo Librandi, Nov 26 2010

(PARI) is(n)=isprime((n+1)^3 - n^2) \\ Charles R Greathouse IV, Sep 02 2016

CROSSREFS

Cf. A140719, A005097, A154111.

Sequence in context: A230633 A024616 A023733 * A039101 A140102 A288866

Adjacent sequences:  A154109 A154110 A154111 * A154113 A154114 A154115

KEYWORD

nonn,easy

AUTHOR

Vladimir Joseph Stephan Orlovsky, Jan 04 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 16:14 EDT 2021. Contains 347669 sequences. (Running on oeis4.)