OFFSET
1,2
COMMENTS
The first term is trivial since 0-0=0*0=0. The pattern of 147 followed by blocks of 5247 followed by 5244 (and its reverse) continues indefinitely. This is also true for the pattern of 161247 followed by blocks of 5247 followed by 384 (and its reverse).
LINKS
W. P. Lo and Y. Paz, On finding all positive integers a,b such that b±a and ab are palindromic, arXiv:1812.08807 [math.HO] (2018).
FORMULA
For some positive integer k, if n=4k, a(n)=-3+147*10^(4n)+53*(10^(4n)-1)/101; if n=4k+1, a(n)=441*10^(4n)+159*(10^(4n)-1)/101; if n=4k+2, a(n)=384+161247*10^(4n-1)+53*(10^(4n-1)-10^3)/101; if n=4k+3, a(n)=1161+483741*10^(4n-1)+159*(10^(4n-1)-10^3)/101. Note that the n-th term corresponds to that of the sequence, so the formulas are valid for n>3.
EXAMPLE
For instance, 147*3=441 and 147-3=144 are terms; 161247387*3=483742161 and 161247387-3=161247384 are terms too.
MATHEMATICA
Do[If[IntegerDigits[x y] == Reverse[IntegerDigits[y - x]], Print[{x, y, y - x, x y}]], {x, 0, 10}, {y, x, 100000000}]
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Wang Pok Lo, Dec 30 2018
STATUS
approved