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.
%I A382179 #43 Mar 30 2025 08:17:02 %S A382179 1,3,6,9,11,14,15,22,24,25,27,28,33,44,54,63,75,78,81,88,99,111,119, %T A382179 131,141,153,168,173,219,249,252,255,279,282,322,325,333,357,363,414, %U A382179 441,459,474,491,538,553,558,565,611,666,674,699,794,797,828,831,832,858,895,924,947,955 %N A382179 Numbers k such that for each digit of k, 2*k*(digit) + 1 is prime. %C A382179 The decision to use the expression 2*k*(digit) instead of k*(digit) is based on the fact that k*(odd) + 1 is never prime. By multiplying k*(digit) by 2, we ensure that any number, regardless of its digits, can appear in the sequence. Additionally, numbers containing the digit 0 are never terms, as 2*k*(0) + 1 is never prime. %C A382179 When k is restricted to the smallest term with n distinct digits, only 7 terms exist (see A382198). %C A382179 If the smallest term k is further restricted to a prime number p with n distinct digits, the conditions become significantly more restrictive (see A382127). %H A382179 Jakub Buczak, <a href="/A382179/b382179.txt">Table of n, a(n) for n = 1..4000</a> %e A382179 63 is a term because 2*63*6 + 1 and 2*63*3 + 1 are both prime. %t A382179 Select[Range[2500], AllTrue[2 * # * IntegerDigits[#] + 1, PrimeQ] &] (* _Amiram Eldar_, Mar 17 2025 *) %o A382179 (PARI) isok(k) = my(d=Set(digits(k))); for (i=1, #d, if (!isprime(2*k*d[i]+1), return(0));); return(1); \\ _Michel Marcus_, Mar 17 2025 %o A382179 (Python) %o A382179 from sympy import isprime %o A382179 def ok(n): return all(isprime(2*n*d+1) for d in map(int, set(str(n)))) %o A382179 print([k for k in range(956) if ok(k)]) # _Michael S. Branicky_, Mar 17 2025 %Y A382179 Cf. A000040, A382127, A382198, A382199. %K A382179 nonn,base %O A382179 1,2 %A A382179 _Jakub Buczak_, Mar 17 2025