%I #31 Feb 04 2016 09:57:45
%S 351,621,886,920781,3524751,338752611,35247524751,920780120781,
%T 920879219781,3387524752611,3526124738751,338738752612611,
%U 352475247524751,33875247524752611,35247387526124751,35261247524738751,920780120780120781,920780219879120781,920879120780219781,920879219879219781
%N Number x = concat(MSD(x),b), where MSD = A000030 stands for Most Significant Digit, such that MSD(x)*b is equal to the reverse of x.
%C If we consider numbers x = concat(a,b), where a has two digits, such that a*b is equal to the reverse of x, the first terms are 425322, 44235301, 119910901, ...
%C Terms of the form 3(5247)*51, i.e. 351, 3524751, 35247524751, ..., form an infinite subsequence. - _Robert Israel_, Jan 28 2016
%C Other infinite sequences of terms include 92078(012078)*1 and 33875(2475)*2611. - _Robert Israel_, Jan 31 2016
%H Robert Israel, <a href="/A267939/b267939.txt">Table of n, a(n) for n = 1..415</a>
%e 3*51 = 153;
%e 6*21 = 126;
%e 3*524751 = 1574253.
%p T:=proc(w) local x, y, z; x:=w; y:=0;
%p for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10); od; y; end:
%p P:=proc(q) local a,b,n; for n from 1 to q do a:=n mod 10; b:=trunc(n/10^ilog10(n));
%p if (a=1 and b>1) or (a=6 and (b=2 or b=4 or b=6 or b=8)) or (b=5 and (a=3 or a=5 or a=7 or a=9)) then
%p if T(n)=b*(n mod 10^ilog10(n)) then print(n); fi; fi; od; end: P(10^10);
%p # alternative:
%p N:= 20: # to get all terms with at most N digits.
%p extend:= proc(d,psol,eqs)
%p local peqs, cvars, bvars, ncs, res,T, cs, ceqs, sol, svals;
%p peqs:= subs(psol, eqs);
%p cvars,bvars:= selectremove(t -> op(0,t) = 'c',indets(peqs));
%p ncs:= nops(cvars);
%p res:= NULL;
%p if ncs >= 1 then
%p T:= combinat:-cartprod([[$0..d-1]$ncs]);
%p while not T[finished] do
%p cs:= T[nextvalue]();
%p cs:= seq(cvars[i]=cs[i],i=1..ncs);
%p ceqs:= subs(cs,peqs);
%p sol:= solve(ceqs,bvars); svals:= map(rhs,sol);
%p if indets(svals) <> {} then error("Oops: %1",svals) fi;
%p if svals::set(nonnegint) and max(svals) <= 9 then
%p res:= res, [op(psol), cs, op(sol)];
%p fi
%p od
%p else
%p sol:= solve(peqs,bvars);
%p svals:= map(rhs,sol);
%p if indets(svals) <> {} then error("Oops: %1",svals) fi;
%p if svals::set(nonnegint) and max(svals) <= 9 then
%p res:= [op(psol), op(sol)];
%p fi
%p fi;
%p [res]
%p end proc:
%p G:= proc(d,n)
%p local eqs, i, rs, b0s;
%p eqs:= [d*b[0] - d - 10*c[0],
%p seq(d*b[i]+c[i-1] - b[n-i] - 10*c[i], i=1..n-2),
%p d*b[n-1] + c[n-2] - b[1] - 10*b[0]];
%p b0s:= [msolve(eqs[1] mod 10,10)];
%p rs:= select(t -> (map(rhs,t))::set(nonnegint),
%p map(t -> t union solve(eval(eqs[1],t),{c[0]}),b0s));
%p for i from 1 to floor(n/2) do
%p rs:= map(s -> op(extend(d,s,{eqs[i+1],eqs[-i]})), rs);
%p od;
%p sort(map(s -> d*10^n + subs(s, add(10^i*b[i],i=0..n-1)), rs));
%p end proc:
%p A:= NULL;
%p for n from 2 to N-1 do
%p for d from 3 to 9 do
%p res:= G(d,n);
%p if res <> [] then
%p A:= A, op(res);
%p fi
%p od
%p od:
%p A; # _Robert Israel_, Feb 01 2016
%t Select[Range@ 4000000, First[#] FromDigits@ Rest@ # == FromDigits@ Reverse@ # &@ IntegerDigits@ # &] (* _Michael De Vlieger_, Jan 29 2016 *)
%Y Cf. A000030, A004086.
%K base,nonn
%O 1,1
%A _Paolo P. Lava_, Jan 22 2016
%E a(7) to a(20) from _Robert Israel_, Feb 01 2016
|