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+1)+1)+1=r(r(23)+1)+1=r(33+1)+1=r(34)+1
48+1=49 (nonprime).
n=10:
r(r(r(r(10)+1)+1)+1)+1=r(r(r(15+1)+1)+1)+1=r(r(r(16)+1)+1)+1=r(r(24+1)+1)+1=r(r(25)+1)+1=r(35+1)+1=r(36)+1
50+1=51(nonprime)
n=11:
r(r(r(r(11)+1)+1)+1)+1=r(r(r(16+1)+1)+1)+1=r(r(r(17)+1)+1)+1=r(r(25+1)+1)+1=r(r(26)+1)+1=r(36+1)+1=r(37)+1=51+1=52(nonprime),
etc.
MAPLE
A141468 := proc(n) option remember ; if n = 1 then 0; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a); fi; od: fi; end: rep := 4: for n from 1 to 400 do arep := n ; for i from 1 to rep do arep := A141468(arep)+1 ; od: if isprime(arep) then printf("%d, ", arep) ; fi; od: # R. J. Mathar, Sep 05 2008
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 25 2008
EXTENSIONS
97 removed and extended by R. J. Mathar, Sep 05 2008
STATUS
approved