|
|
|
|
1, 2, 22, 141, 171, 202, 333, 2002, 2772, 7227, 10401, 10701, 12221, 13131, 14841, 15651, 16461, 17271, 20002, 21212, 25452, 26262, 27072, 30303, 31113, 33633, 35253, 41814, 51615, 52425, 53235, 55755, 58185, 61416, 62226, 66366, 69696, 71217, 72027, 85158, 96669, 117711
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
22 = 2!*2! = 4 and 2 + 2 = 4.
141 = 1!*4!*1! = 24; 2 + 4 = 6 and 1 + 4 + 1 = 6.
|
|
MATHEMATICA
|
DeleteCases[ParallelTable[If[PalindromeQ[n]&&Total@IntegerDigits[Times@@Map[Factorial, IntegerDigits[n]]]==Total@IntegerDigits[n], n, a], {n, 0, 10^8}], a] (* J.W.L. (Jan) Eerland, Dec 26 2021 *)
|
|
PROG
|
(Python)
from math import factorial, prod
from itertools import count, islice, product
def isA082939(n):
d = list(map(int, str(n)))
return sum(map(int, str(prod(map(factorial, d))))) == sum(d)
def pals(): # generator of terms
digits = "0123456789"
for d in count(1):
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]:
yield int(left + mid + right)
def agen(): yield from filter(isA082939, pals())
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 27 2003, following a suggestion by Amarnath Murthy.
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|