OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..670 from J.W.L. (Jan) Eerland)
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())
print(list(islice(agen(), 42))) # Michael S. Branicky, Aug 15 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 27 2003, following a suggestion by Amarnath Murthy.
EXTENSIONS
Corrected and extended by J.W.L. (Jan) Eerland, Dec 26 2021
STATUS
approved