|
Search: id:A070245
|
|
|
| A070245 |
|
Smallest palindromic prime with digit sum = n, or 0 if no such prime exists. |
|
+0 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; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
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.
|
|
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
|
Cf. A002385.
Sequence in context: A071376 A064502 A082809 this_sequence A066398 A138197 A140664
Adjacent sequences: A070242 A070243 A070244 this_sequence A070246 A070247 A070248
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 05 2002
|
|
EXTENSIONS
|
Edited, corrected and extended by Robert G. Wilson v (rgwv(AT)rgwv.com), May 06 2002
|
|
|
Search completed in 0.002 seconds
|