[go: up one dir, main page]

login
Search: a036944 -id:a036944
     Sort: relevance | references | number | modified | created      Format: long | short | data
Smallest n-digit prime with digits from {1,4,7} only, or 0 if no such prime exists.
+10
1
7, 11, 0, 1117, 11117, 0, 1111447, 11111117, 0, 1111111411, 11111111741, 0, 1111111111177, 11111111111411, 0, 1111111111111447, 11111111111111171, 0, 1111111111111111111, 11111111111111111447, 0, 1111111111111111111711
OFFSET
1,1
COMMENTS
Any 3k-digit number containing only digits from {1,4,7} has a digit-sum divisible by 3. Therefore the number is divisible by 3 and a(3k) = 0 for all positive integers k.
LINKS
FORMULA
a(k) <= minimum(A036931(k), A036934(k), A036944(k)), a(3k) = 0 and a(A004023(k)) = (10^A004023(k) - 1)/9 = A004022(k) for all positive integers k. (The inequality above holds iff a(k) contains at least one of each digit 1, 4 and 7.)
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{1, 4, 7}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)
CROSSREFS
Other smallest n-digit primes: A036931 (digits from {1, 4} only), A036934 (digits from {1, 7} only), A036944 (digits from {4, 7} only), A004022 (repunit primes), A004023.
KEYWORD
nonn,base
AUTHOR
Rick L. Shepherd, Feb 12 2004
STATUS
approved

Search completed in 0.008 seconds