Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
A072040
Numbers n of the form k + reverse(k) for exactly two k.
6
22, 187, 202, 222, 242, 262, 282, 302, 322, 342, 362, 382, 1717, 1737, 1757, 1777, 1797, 1817, 1837, 1857, 1877, 1897, 2002, 2871, 3982, 11211, 11411, 11611, 11811, 12011, 12211, 12411, 12611, 12811, 17017, 18128, 18997, 19888, 20002, 20202
OFFSET
1,1
COMMENTS
In the cognate sequence A071265 two numbers a and b are counted only once, if n = a + b, a = reverse(b), b = reverse(a). Therefore 187 = 89 + 98 = 98 + 89 does not appear in A071265.
EXAMPLE
22 = 11 + 11 = 20 + 02, 187 = 89 + 98 = 98 + 89, 382 = 191 + 191 = 290 + 092.
MAPLE
# Maple program from N. J. A. Sloane, Mar 07 2016. Assumes digrev (from the "transforms" file) is available:
M:=21000; b := Array(1..M, 0);
for n from 1 to M do
t1:=n+digrev(n);
if t1 <= M then b[t1]:=b[t1]+1; fi;
od:
ans:=[];
for n from 1 to M do
if b[n]=2 then ans:=[op(ans), n]; fi; od:
ans;
MATHEMATICA
M = 10^5; digrev[n_] := IntegerDigits[n] // Reverse // FromDigits; Clear[b]; b[_] = 0; For[n = 1, n <= M, n++, t1 = n + digrev[n]; If[t1 <= M, b[t1] = b[t1] + 1]]; A072040 = Reap[For[n = 1, n <= M, n++, If[b[n] == 2, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 01 2016, after N. J. A. Sloane's Maple code *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Klaus Brockhaus, Jun 08 2002
STATUS
approved