OFFSET
1,1
COMMENTS
Essentially the same as A129293. - R. J. Mathar, Jun 14 2008
Solutions to the equation: A000005(n^4-1) = 8. - Enrique Pérez Herrero, May 03 2012
Terms > 6 are multiples of 30. Subsequence of A070689. - Zak Seidov, Nov 12 2012
{a(n)-1} is a subsequence of A157468; for n>1, {a(n)^2+2} is a subsequence of A242720. - Vladimir Shevelev, Aug 31 2014
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
FORMULA
For n>1, a(n)^2 = A242720(pi(a(n)-2)) - 2, where pi(n) is the prime counting function (A000720). - Vladimir Shevelev, Sep 02 2014
EXAMPLE
150 is a term since 149, 151 and 22501 are all primes.
MAPLE
select(n -> isprime(n-1) and isprime(n+1) and isprime(n^2+1), [seq(2*i, i=1..10000)]); # Robert Israel, Sep 02 2014
MATHEMATICA
Do[s=n; If[PrimeQ[s-1]&&PrimeQ[s+1]&&PrimeQ[1+s^2], Print[n]], {n, 1, 1000000}]
Select[Range[22000], AllTrue[{#+1, #-1, #^2+1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 19 2014 *)
PROG
(PARI) is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1); \\ Amiram Eldar, Apr 15 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, Apr 23 2002
STATUS
approved