login
Total number of distinct palindromes of form 'n-digit number' x 'n-digit number_reversed' (n-digit number not palindromic).
3

%I #21 Aug 11 2024 14:41:31

%S 0,1,3,10,19,44,86,171,308,551,920

%N Total number of distinct palindromes of form 'n-digit number' x 'n-digit number_reversed' (n-digit number not palindromic).

%H P. De Geest, <a href="https://www.worldofnumbers.com/reversal.htm">Palindromic Products of Non Palindromic Integers and their Reversals </a>

%e E.g., 3 solutions for 3-digit numbers: 102 * 201 = 20502; 112 * 211 = 23632; 122 * 221 = 26962.

%o (Python)

%o def A048343(n):

%o ....y, plist = 0, []

%o ....for i in range(10**(n-1),10**n):

%o ........s1 = str(i)

%o ........s2 = s1[::-1]

%o ........if s1 != s2:

%o ............p = i*int(s2)

%o ............if not p in plist:

%o ................sp = str(p)

%o ................if sp == sp[::-1]:

%o ....................plist.append(p)

%o ....................y += 1

%o ....return y # _Chai Wah Wu_, Sep 05 2014

%Y Cf. A048344.

%K nonn,base,more

%O 1,3

%A _Patrick De Geest_, Feb 15 1999

%E More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 18 2006

%E Offset changed and two terms added by _Lars Blomberg_, Nov 25 2011