OFFSET
1,1
COMMENTS
EXAMPLE
Trajectories of the first few terms:
2->0
11->5->1
41->11->5->1
251->41->11->5->1
2579->269->59->29->5->1
32609->2579->269->59->29->5->1
543131->32621->2591->281->71->11->5->1
10243031->543341->32831->2801->491->71->11->5->1
233336819->10243949->544259->33749->3719->1409->149->29->5->1
6703033091->233339861->10246991->547301->36791->6761->2141->41->11->5->1.
PROG
(PARI) a260187(n)=my(t=1, k); forprime(p=2, , k=t*p; if(k>n, return(n%t), t=k));
isok(k, n) = {for (j=1, n-1, nk = 260187(k); if (! isprime(nk), return (0)); k = nk; ); ! isprime(a260187(k)); }
a(n) = {my(k = 2); while(! isok(k, n), k = nextprime(k+1)); k; } \\ Michel Marcus, Nov 16 2015
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jean-Marc Rebert, Nov 07 2015
STATUS
approved