|
|
A036931
|
|
Smallest n-digit prime containing only digits 1 and 4, or 0 if no such prime exists.
|
|
2
|
|
|
0, 11, 0, 4111, 11411, 0, 1114111, 11111141, 0, 1111111411, 11111141411, 0, 1111111111441, 11111111111411, 0, 1111111111114441, 11111111111414411, 0, 1111111111111111111, 11111111111111414441, 0, 1111111111111111144141
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For any positive integer k, a(3k) = 0 as any 3k-digit number containing only digits 1 or 4 or both has a digit-sum divisible by 3 and thus the number is divisible by 3. - Rick L. Shepherd, Feb 08 2004
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
Flatten[Table[Select[FromDigits/@Tuples[{1, 4}, n], PrimeQ, 1], {n, 25}]/.{}->{0}] (* Jinyuan Wang, Mar 09 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|