cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A344637 a(n) is the smallest k > 0 such that the number that results from inserting a string of k zeros between all adjacent digits of prime(n) is also prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 30, 1, 1
Offset: 5

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Comments

Is a(26) = 0? Note that prime(26) = 101 and 101 is the largest known prime of the form 10^t + 1.
a(A000720(A004022(i))) = 0 for i > 1, i.e., a(n) = 0 if prime(n) is a repunit > 11.

Examples

			For n = 10: prime(10) = 29 and 200009 is the smallest prime obtained by inserting a string of zeros between all adjacent digits, so a(10) = 4.
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    insert_zeros(num, len) = my(d=digits(num), v=[]); for(k=1, #d-1, v=concat(v, concat([d[k]], vector(len)))); v=concat(v, d[#d]); eva(v)
    a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(insert_zeros(p, k)), return(k)))