OFFSET
1,1
EXAMPLE
For a(1), the sequence is 1, 2, 3, 5, 11, 2, 3, 5, 11, 2, 3,
5, 11, ... The sequence has period {2, 3, 5, 11} so a(1) = 2.
For a(2) see the A112279: 1, 2, 3, 5, 11, 31, 127, 103, 5,
11, 31, 127, 103, 5, 11, ..., . This sequence has a cyclic length of 5,
the terms {5, 11, 31, 127, 103} and the first term 5 first appears at
the fourth term.
MATHEMATICA
f[n_] := Block[{k = 1, a}, a[0] = 1; a[i_] := a[i] = Prime[Mod[a[i - 1], 10^n]]; While[t = Table[a[i], {i, 0, k - 1}]; MemberQ[t, a[k]] == False, k++ ]; Flatten[ Position[t, a[k]]][[1]]]; Array[ f, 8]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert G. Wilson v, May 13 2007
EXTENSIONS
a(9)-a(11) from Chai Wah Wu, Sep 26 2019
a(12)-a(13) from Chai Wah Wu, Oct 02 2019
STATUS
approved