cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A082940 Palindromes in A082939.

This page as a plain text file.
%I A082940 #33 Jul 09 2025 03:57:57
%S A082940 1,2,22,141,171,202,333,2002,2772,7227,10401,10701,12221,13131,14841,
%T A082940 15651,16461,17271,20002,21212,25452,26262,27072,30303,31113,33633,
%U A082940 35253,41814,51615,52425,53235,55755,58185,61416,62226,66366,69696,71217,72027,85158,96669,117711
%N A082940 Palindromes in A082939.
%H A082940 Michael S. Branicky, <a href="/A082940/b082940.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..670 from J.W.L. (Jan) Eerland)
%e A082940 22 = 2!*2! = 4 and 2 + 2 = 4.
%e A082940 141 = 1!*4!*1! = 24; 2 + 4 = 6 and 1 + 4 + 1 = 6.
%t A082940 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 *)
%o A082940 (Python)
%o A082940 from math import factorial, prod
%o A082940 from itertools import count, islice, product
%o A082940 def isA082939(n):
%o A082940     d = list(map(int, str(n)))
%o A082940     return sum(map(int, str(prod(map(factorial, d))))) == sum(d)
%o A082940 def pals(): # generator of terms
%o A082940     digits = "0123456789"
%o A082940     for d in count(1):
%o A082940         for p in product(digits, repeat=d//2):
%o A082940             if d > 1 and p[0] == "0": continue
%o A082940             left = "".join(p); right = left[::-1]
%o A082940             for mid in [[""], digits][d%2]:
%o A082940                 yield int(left + mid + right)
%o A082940 def agen(): yield from filter(isA082939, pals())
%o A082940 print(list(islice(agen(), 42))) # _Michael S. Branicky_, Aug 15 2022
%Y A082940 Intersection of A002113 and A082939.
%K A082940 nonn,base
%O A082940 1,2
%A A082940 Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 27 2003, following a suggestion by _Amarnath Murthy_
%E A082940 Corrected and extended by _J.W.L. (Jan) Eerland_, Dec 26 2021