OFFSET
1,1
COMMENTS
Sequence suggested by a question asked in the "primenumbers" group, cf. link.
The first 4 occurs for p=26571169, at index n=1657999.
A variant of this sequence would have a(n)=10 for nonprime n, and a(prime(n))=A193889(n).
LINKS
J. Brennen, in reply to J. Merickel, Problem that should be solvable requiring scientific approach on yahoo group "primenumbers", Aug 07 2011.
James Merickel, Jack Brennen and others, Problem that should be solvable requiring scientific approach, digest of 11 messages in primenumbers Yahoo group, Aug 6 - Aug 7, 2011.
EXAMPLE
a(1)=2 because for p=prime(1)=2, we have p=p1=...=p7=2 all prime, but p8=base(2,2)=10 is composite.
a(5)=9 because for p=prime(5)=11, we have already p1=base(11,9)=12 composite.
a(18)=7 because for p=prime(18)=61 we have p1=base(61,9)=67 and p2=base(67,8)=103 both prime, but p3=base(103,7)=205 composite.
a(1657999)=4 because for p=prime(1657999)=26571169 we have p1=base(p,9)=54887711, p2=base(p1,8)=321302437, p3=base(p2,7)=10651011541, p4=base(p3,6)=4520520050341 and p5=base(p4,5)=1043031011113102331 all prime, but p6=base(p5,4)=321321211302312223013032233323 composite.
PROG
(PARI) base(n, b)={my(a=n%b, t=1); while(0<n\=b, a+=n%b*t*=10); a}
A193889(N)={ N=prime(N); forstep(b=9, 2, -1, isprime(N=base(N, b))||return(b))}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Aug 07 2011
STATUS
approved