login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072040 Numbers n of the form k + reverse(k) for exactly two k. 6

%I

%S 22,187,202,222,242,262,282,302,322,342,362,382,1717,1737,1757,1777,

%T 1797,1817,1837,1857,1877,1897,2002,2871,3982,11211,11411,11611,11811,

%U 12011,12211,12411,12611,12811,17017,18128,18997,19888,20002,20202

%N Numbers n of the form k + reverse(k) for exactly two k.

%C 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.

%H <a href="/index/Res#RAA">Index entries for sequences related to Reverse and Add!</a>

%e 22 = 11 + 11 = 20 + 02, 187 = 89 + 98 = 98 + 89, 382 = 191 + 191 = 290 + 092.

%p # Maple program from _N. J. A. Sloane_, Mar 07 2016. Assumes digrev (from the "transforms" file) is available:

%p M:=21000; b := Array(1..M,0);

%p for n from 1 to M do

%p t1:=n+digrev(n);

%p if t1 <= M then b[t1]:=b[t1]+1; fi;

%p od:

%p ans:=[];

%p for n from 1 to M do

%p if b[n]=2 then ans:=[op(ans),n]; fi; od:

%p ans;

%t 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 *)

%Y Cf. A067030, A071265, A072041, A096768.

%K base,nonn

%O 1,1

%A _Klaus Brockhaus_, Jun 08 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 16 01:43 EST 2019. Contains 330013 sequences. (Running on oeis4.)