login
Nonpalindromes which are products of two palindromes in base 10.
3

%I #6 Jan 06 2020 20:35:02

%S 10,12,14,15,16,18,20,21,24,25,27,28,30,32,35,36,40,42,45,48,49,54,56,

%T 63,64,72,81,110,132,154,165,176,198,220,231,264,275,297,302,308,322,

%U 330,342,352,362,382,385,396,423,440,453,462,483,495,504,513,524,528

%N Nonpalindromes which are products of two palindromes in base 10.

%H Robert Israel, <a href="/A141322/b141322.txt">Table of n, a(n) for n = 1..10000</a>

%F {A140332 INTERSECTION COMPLEMENT(A002113)} = {n in A115683 and n <> A004086(n)}.

%e 726 is in this sequence because 22 * 33 = 726, 22 and 33 are palindromes base 10, but 726 is not a palindrome base 10.

%p digrev:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end:

%p N:=3: # for terms of at most N digits

%p Res:= $0..9:

%p for d from 2 to N do

%p if d::even then

%p m:= d/2;

%p Res:= Res, seq(n*10^m + digrev(n), n=10^(m-1)..10^m-1);

%p else

%p m:= (d-1)/2;

%p Res:= Res, seq(seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1);

%p fi

%p od:

%p Palis:= [Res]:

%p Res:= NULL:

%p for i from 3 to nops(Palis) while Palis[i]^2 <= 10^N do

%p for j from i to nops(Palis) while Palis[i]*Palis[j] <= 10^N do

%p v:= Palis[i]*Palis[j]; if digrev(v) <> v then Res:= Res, v fi;

%p od od:sort(convert({Res},list)); # _Robert Israel_, Jan 06 2020

%Y Cf. A002113, A004086, A140332.

%K base,easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Aug 02 2008

%E Extended beyond 330 by _R. J. Mathar_, Aug 09 2008