A342992 Smallest k such that k*n contains only prime digits, or 0 if no such k exists.
2, 1, 1, 8, 1, 12, 1, 4, 3, 0, 2, 6, 4, 18, 5, 2, 15, 4, 3, 0, 12, 1, 1, 3, 1, 2, 1, 9, 8, 0, 12, 1, 1, 8, 1, 2, 1, 14, 7, 0, 13, 6, 54, 8, 5, 7, 5, 49, 15, 0, 5, 1, 1, 43, 1, 42, 1, 4, 43, 0, 12, 6, 4, 43, 5, 42, 5, 4, 8, 0, 5, 1, 1, 3, 1, 7, 1, 74, 3, 0, 93
Offset: 1
Examples
a(4) = 8 because 8 is the smallest number k such that 8*4 = 32 contains only prime digits.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
- Chris K. Caldwell and G. L. Honaker, Jr., Prime Curios! 56479
Programs
-
PARI
a(n) = if ((n % 10) && (n % 625), my(k=1); while (#select(x->!isprime(x), digits(k*n)), k++); k, 0); \\ Michel Marcus, Apr 21 2021
Comments