login
A369331
Positive numbers whose decimal expansions are covered by that of prime numbers (without leading zeros).
0
2, 3, 5, 7, 11, 13, 17, 19, 22, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 47, 52, 53, 55, 57, 59, 61, 67, 71, 72, 73, 75, 77, 79, 83, 89, 97, 101, 103, 107, 109, 111, 112, 113, 115, 117, 119, 127, 131, 132, 133, 135, 137, 139, 149, 151, 157, 163, 167, 171
OFFSET
1,1
COMMENTS
More formally: positive numbers with decimal expansion (d_1, ..., d_w) (where d_1 <> 0) such that for any i in 1..w, we have some j, k such that j <= i <= k and d_j <> 0 and (d_j, ..., d_k) corresponds to the decimal expansion of a prime number.
This sequence contains, among others, A000040, A046034 and A152242.
This sequence first differs from A152242 for n = 42: a(42) = 111 whereas A152242(42) = 112.
EXAMPLE
The number 15195 belongs to the sequence for the following covering:
151
19
5
.....
15195
PROG
(PARI) is(n, base = 10) = { my (d = if (n, digits(n, base), [0]), ok = vector(#d), rem = #d); for (i = 1, #d, if (d[i], for (j = i, #d, if (isprime( fromdigits( d[i..j], base)), for (k = i, j, if (ok[k]==0, ok[k]++; rem--; if (rem==0, return (1)))))))); return (0); }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Jan 20 2024
STATUS
approved