OFFSET
1,1
COMMENTS
The sequence is not monotonic and it seems that p=5 may arise at any position > 2. a(2)=0 means that 5 is never the 2nd term in an EM sequence of A000945-type because a(2)=2 or 3.
a(31)>=8581. [Sean A. Irvine, Oct 31 2011]
EXAMPLE
The sequence for 17 is 17, 2, 5, ... where the 5 is at the third place, therefore a(3)=17.
For n=15 we have the sequence 181, 2, 3, 1087, 73, 7, 29, 151, 61, 98689, 11, 10929259909, 678859, 97, 5, ...
a(16) = 449 uses the sequence 449, 2, 29, 3, 7, 349, 190861819, 166273, 16091, 11, 3807491, 53, 17, 313, 23, 5, ...
The sequence for 11 is 11, 2, 23, 3, 7, 13, 10805892983887, 73, 6397, 19, 489407, 2753, 87491, 18618443, 5, ... with the 5 at the 18th place, so a(18)=11.
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Labos Elemer, May 04 2004
EXTENSIONS
Corrected by R. J. Mathar, Oct 06 2006
a(16) = 449 was conjectured by R. J. Mathar and confirmed by Don Reble, Oct 07 2006
a(19)-a(24) from David Wasserman, Apr 20 2007
a(25)-a(30) from Sean A. Irvine, Oct 30 2011
STATUS
approved