OFFSET
0,2
COMMENTS
The maximum number of iterations is 8 (proof in A179767).
The similar problem with the map p -> 4p + 1 is less interesting because that sequence contains numbers <= 1: if we consider just the first two iterations 4p + 1 -> 16p + 5 -> 64p + 21, then (i) if p==0 (mod 3), 64p + 21 is composite, (ii) if p==1 (mod 3), 16p + 5 is composite and (iii) if p==2 (mod 3), 4p + 1 is composite. Thus the maximum number of iterations is 1.
EXAMPLE
a(1) = 0 because the first prime == 3 (mod 4) is A002145(1) = 3 and 3*4 + 3 = 15 is composite.
a(2) = 2 because the second prime == 3 (mod 4) is A002145(2) = 7, and 4*7 + 3 = 31 -> 4*31 + 3 = 127 are primes.
a(1761) = 8 because the 1761st prime == 3 (mod 4) is A002145(1761) = 32611 and 32611 -> 130447 -> 521791 -> 2087167 -> 8348671 -> 33394687 -> 133578751 -> 534315007 -> 2137260031 are primes.
MAPLE
with(numtheory):for i from 1 to 300 do : n:=ithprime(i):if irem(n, 4) = 3 then
nn:=n: id:=0:k:=0:for it from 1 to 8 do: p:=4*nn+3: if type (p, prime)=true and
id=0 then k:=k+1:nn:=p:else id:=1:fi:od:printf(`%d, `, k):else fi:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 10 2011
STATUS
approved