OFFSET
1,1
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
FORMULA
k^3-k^2-k-1 = A162295(n), where k=a(n).
Sum_{i=1..n} a(i) = Sum_{i=1..n} i * ( pi(i^3 - i^2 - i - 1) - pi(i^3 - i^2 - i - 2) ). - Wesley Ivan Hurt, May 24 2013
EXAMPLE
k=4 is in the sequence because 4^3-4^2-4-1=43 is prime.
k=6 is in the sequence because 6^3-6^2-6-1=173 is prime.
MATHEMATICA
lst={}; Do[p=n^3-n^2-n-1; If[PrimeQ[p], AppendTo[lst, n]], {n, 2, 6!}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jun 30 2009
EXTENSIONS
Edited by R. J. Mathar, Jul 02 2009
STATUS
approved