Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #38 Sep 22 2022 13:40:45
%S 0,3456789,2456789,3,246789,5,4689,57,68,379,48,9,45,0,68,59,47,0,468,
%T 0,59,37,245,0,68,5,6,59,47,0,78,0,568,39,8,0,469,7,689,0,5,0,4789,0,
%U 6,3,24,9,8,7,0,7,4,0,4689,5,8,3,78,0,49,0,5,9,8,9,368,5
%N a(n) is the concatenation of the numbers k, 2 <= k <= 9, such that the base-k representation of n, read as a decimal number, is prime; a(n) = 0 if there is no such base.
%C Composite numbers n for which a(n)=0 we call absolute composite numbers.
%C Almost evidently that almost all integers are absolute composite numbers. Moreover, since the number of primes<=x containing no at least one digit is o(pi(x)), then, for almost all positions of prime n, a(n)=0. It is interesting to obtain an upper estimate of number of nonzero positions in the sequence, more exactly, than o(x/log(x)).
%C Only O(sqrt x) numbers up to x have nonzero values in this sequence. - _Charles R Greathouse IV_, Jan 24 2014
%H Peter J. C. Moses, <a href="/A236356/b236356.txt">Table of n, a(n) for n = 1..5000</a>
%e Let n = 29. In bases 2, 3, ..., 9 the representations of 29 are 11101_2, 1002_3, 131_4, 104_5, 45_6, 41_7, 35_8, 32_9. In this list only 131_4 and 41_7 are primes, so a(29) = 47.
%e The sequence of numbers whose representations in bases 4 and 7, read in decimal, are primes are the numbers n such that a(n) contains the digits 4 and 7: 2, 3, 5, 17, 29, 43, ....
%o (Python)
%o from sympy import isprime
%o from sympy.ntheory import digits
%o def c(n, b): return isprime(int("".join(map(str, digits(n, b)[1:]))))
%o def a(n): return int("0"+"".join(k for k in "23456789" if c(n, int(k))))
%o print([a(n) for n in range(1, 68)]) # _Michael S. Branicky_, Sep 22 2022
%Y Cf. A052026.
%K nonn,base
%O 1,2
%A _Vladimir Shevelev_, Jan 23 2014
%E Name clarified by _Jon E. Schoenfield_, Sep 21 2022