login
Product of digits of n-th base 10 palindrome.
2

%I #11 Jun 14 2024 08:48:56

%S 0,1,2,3,4,5,6,7,8,9,1,4,9,16,25,36,49,64,81,0,1,2,3,4,5,6,7,8,9,0,4,

%T 8,12,16,20,24,28,32,36,0,9,18,27,36,45,54,63,72,81,0,16,32,48,64,80,

%U 96,112,128,144,0,25,50,75,100,125,150,175,200,225,0,36,72,108,144,180,216

%N Product of digits of n-th base 10 palindrome.

%F a(n) = A007954(A002113(n)). - _Michel Marcus_, Jun 14 2024~

%o (Python)

%o from math import prod

%o def A112875(n):

%o if n == 1: return 0

%o y = 10*(x:=10**(len(str(n>>1))-1))

%o return int((s:=str(n-x))[-1])*prod(int(d) for d in s[:-1])**2 if n<x+y else prod(map(int,str(n-y)))**2 # _Chai Wah Wu_, Jun 14 2024

%Y Cf. A002113, A007954.

%K base,easy,nonn

%O 1,3

%A _Giovanni Teofilatto_, Jan 02 2006

%E More terms from _Joshua Zucker_, May 03 2006