OFFSET
1,1
COMMENTS
This is a subsequence of A096012.
a(k)==4 mod 10 because if n==0, 2, 6 or 8 mod 10, then n^2+1 or (n+2)^2+1 is divisible by 5. When n==4 (mod 10), then (n+4)^2+1 and (n+8)^2+1 are always divisible by 5.
EXAMPLE
4 is in the sequence because 4^2+1 = 5; 6^2+1 = 37; 10^2+1 = 101; 14^2+1 = 197 and 16^2+1 = 257 are prime.
MAPLE
with(numtheory):f:=n->n^2+1: for n from 1 to 460000 do:if type(f(n), prime) and type(f(n+2), prime) and type(f(n+6), prime) and type(f(n+10), prime) and type(f(n+12), prime) then printf(`%d, `, n):else fi:od:
MATHEMATICA
lst={}; Do[p1=n^2+1; p2=(n+2)^2+1; p3=(n+6)^2+1; p4=(n+10)^2+1; p5=(n+12)^2+1; If[PrimeQ[p1] && PrimeQ[p2] && PrimeQ[p3] && PrimeQ[p4]&& PrimeQ[p5], AppendTo[lst, n]], {n, 0, 460000}]; lst
Select[Range[457*10^4], AllTrue[(#+{0, 2, 6, 10, 12})^2+1, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 30 2019 *)
PROG
(PARI) is_A218047(n, d=[0, 2, 6, 10, 12])=!for(i=1, #d, isprime(1+(n+d[i])^2) || return)
forstep(n=4, 9e9, 10, is_A218047(n) & print1(n", ")) \\ M. F. Hasler, Oct 21 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 19 2012
EXTENSIONS
Given terms a(1..31) double checked by M. F. Hasler, Oct 21 2012
STATUS
approved