OFFSET
1,2
COMMENTS
There is a cycle starting with a(26)=46: ...46,45,49,48,47,46,...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(3)=4 because a(2)=5, prime[5]=11 (11+1)/2 is even and a(3)=a(2)-1
MATHEMATICA
b=1; Prepend[Table[b+=If[EvenQ[(Prime[b]+1)/2], -1, 4], {i, 52}], 1] (*A086409*)
NestList[If[EvenQ[(Prime[#]+1)/2], #-1, #+4]&, 1, 50] (* Harvey P. Dale, Mar 05 2020 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Jul 18 2003
STATUS
approved