|
|
A193889
|
|
Base at which the first composite occurs in the sequence p=prime(n), p1=base(p,9), p2=base(p1,8), p3=base(p2,7),..., where base(N,b) means N written in base b and read in base 10; a(n)=0 if p1,...,p8 are all prime.
|
|
2
|
|
|
2, 3, 5, 7, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|