OFFSET
1,4
EXAMPLE
a(1)=1 (<3); a(2)=1 (<5); a(3)=1 (<7); a(4)=10 (<11).
MAPLE
isA164276 := proc(n) not isprime(n) and ( not isprime(n+1) or not isprime(n-1) ) ; end proc:
isA001097 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2) ); end proc:
A001097 := proc(n) option remember; if n =1 then 3; else for a from procname(n-1)+2 by 2 do if isA001097(a) then return a; end if; end do: end if; end proc:
A167427 := proc(n) for a from A001097(n)-1 by -1 do if isA164276(a) then return a; end if; end do: end proc:
seq(A167427(n), n=1..120) ; # R. J. Mathar, May 30 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Nov 03 2009
EXTENSIONS
Entries checked by R. J. Mathar, May 30 2010
STATUS
approved