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
Jinyuan Wang, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
Flatten[Table[Select[FromDigits/@Tuples[{1, 4, 7}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rick L. Shepherd, Feb 12 2004
STATUS
approved