login
A249774
The smallest number k such that prime(n)//prime(n+1)//...//prime(n+k-1) is prime, where // is the concatenation function, or 0 if no such k exists.
1
2, 0, 3, 5, 3, 17, 3, 29, 11, 7, 2, 17, 3, 19, 5, 5, 7, 0, 4, 14, 42, 11, 2, 3, 5, 5, 35, 8, 1512, 6, 36, 11, 164, 4, 4, 2, 2, 7, 2, 2027, 23, 16, 7, 0, 375, 2, 9, 20, 24, 3, 2, 3, 57, 2, 2, 2, 186, 2, 7, 16, 145, 51, 3, 687, 3, 3, 2, 104, 23, 7, 2, 3, 7, 2, 34, 3, 3
OFFSET
1,1
COMMENTS
a(2) > 4202 or 0, a(18) > 4186 or 0, and a(44) > 4160 or 0.
FORMULA
a(n) = A000720(A249775(n)) - n + 1.
EXAMPLE
a(4) starts with prime(4) = 7. 711 is not prime. 71113 is not prime. 7111317 is not prime. 711131719 is prime. Since 711131719 = 7//11//13//17//19, 711131719 is the concatenation of 5 primes, hence a(4) = 5.
PROG
(PARI) a(n)=s=Str(prime(n)); c=0; forprime(p=prime(n)+1, 40000, s=concat(s, p); c++; if(ispseudoprime(eval(s)), return(c+1))); 0
for(n=1, 50, print1(a(n), ", "))
CROSSREFS
Sequence in context: A272695 A196503 A061151 * A213407 A285310 A262946
KEYWORD
nonn,base
AUTHOR
Derek Orr, Nov 05 2014
STATUS
approved