A277338 Reverse and Add! sequence starting with 295.
295, 887, 1675, 7436, 13783, 52514, 94039, 187088, 1067869, 10755470, 18211171, 35322452, 60744805, 111589511, 227574622, 454050344, 897100798, 1794102596, 8746117567, 16403234045, 70446464506, 130992928913, 450822227944, 900544455998, 1800098901007, 8801197801088, 17602285712176, 84724043932847, 159547977975595
Offset: 0
Examples
a(0) = 295 a(1) = 295 + 592 = 887 a(2) = 887 + 788 = 1675 ...
Links
- Wikipedia, Lychrel number
Programs
-
Maple
with(StringTools): revnum := proc (n) local a, b, c; description "to REVerse the digits of a NUMber"; a := convert(n, string); b := Reverse(a); c := convert(b, decimal, 10) end proc; f := 0; e := 295; count := 0; while f <> e do e := e+f; f := revnum(e); count := count+1 end do;
-
Mathematica
a[1] = 295; a[n_] := a[n] = FromDigits@ Reverse@ IntegerDigits@ # + # &@ a[n - 1]; Array[a, 29] (* Michael De Vlieger, Oct 14 2016 *)
-
PARI
terms(n) = my(x=295, i=0); while(1, print1(x, ", "); x=x+eval(concat(Vecrev(Str(x)))); i++; if(i==n, break)) /* Print initial 30 terms as follows: */ terms(30) \\ Felix Fröhlich, Nov 15 2016
Formula
a(n) = A006960(n) for n >= 1.
a(n) = A243238(295, n+1). - Felix Fröhlich, Nov 20 2016
Comments