|
|
A070245
|
|
Smallest palindromic prime with digit sum = n, or 0 if no such prime exists.
|
|
2
|
|
|
0, 2, 3, 0, 5, 0, 7, 10601, 0, 181, 191, 0, 373, 383, 0, 727, 13931, 0, 757, 929, 0, 787, 797, 0, 17971, 39293, 0, 19891, 19991, 0, 77377, 76667, 0, 78487, 79397, 0, 77977, 78887, 0, 97879, 79997, 0, 1987891, 1988891, 0, 1998991, 3799973, 0, 3899983
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(3k) = 0 for k>1 because if the digital sum is equal to a multiple of 3, then the number is divisible by 3. a(4) = 0 because any palindromic number whose digital sum is 4 is divisible by a number of the form 10^k + 1 for some k.
|
|
LINKS
|
|
|
MATHEMATICA
|
a = Table[0, {75}]; Do[p = IntegerDigits[Prime[n]]; If[ Reverse[p] == p, q = Plus @ @ p; If[ a[[q]] == 0 && q < 76, a[[q]] = FromDigits[p]]], {n, 1, 10^7}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|