cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 10 results.

A001127 Trajectory of 1 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

1, 2, 4, 8, 16, 77, 154, 605, 1111, 2222, 4444, 8888, 17776, 85547, 160105, 661166, 1322332, 3654563, 7309126, 13528163, 49710694, 99312488, 187733887, 976071668, 1842242347, 9274664828, 17559329557, 93151725128, 175304440267, 937348843838, 1775697687577
Offset: 0

Views

Author

N. J. A. Sloane, Jun 05 2002

Keywords

Comments

Normally one stops as soon as a palindrome is reached.
A Reverse and Add! sequence.
Trajectories of 25, 34, 43, 52, 59, 61, 68, 70, 86, 95, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005

Crossrefs

Programs

  • Haskell
    a001127 n = a001127_list !! n
    a001127_list = iterate a056964 1 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 1, 30] (* Robert G. Wilson v, Dec 16 2005 *)
    NestList[#+IntegerReverse[#]&,1,30] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 19 2019 *)

A033648 Trajectory of 3 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

3, 6, 12, 33, 66, 132, 363, 726, 1353, 4884, 9768, 18447, 92928, 175857, 934428, 1758867, 9447438, 17794887, 96644658, 182289327, 906271608, 1712444217, 8836886388, 17673772776, 85401510447, 159803020905, 668823329856, 1327746658722, 3606313135953, 7201626272016
Offset: 0

Views

Author

Keywords

Comments

Normally one stops as soon as a palindrome is reached.
A Reverse and Add! sequence.

Crossrefs

Programs

  • Haskell
    a033648 n = a033648_list !! n
    a033648_list = iterate a056964 3 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 3, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 3, 29] (* Robert G. Wilson v, Dec 16 2005 *)

A281301 Trajectory of 1000004999700144385 under the "Reverse and Add!" operation.

Original entry on oeis.org

1000004999700144385, 6834415079694144386, 13668830049399288772, 41457129443403175403, 71914259877895350817, 143719619755790592734, 581014717313707510075, 1151030424627424920260, 1771324671891665221771, 3542550333873429453542, 5996099577656760005995
Offset: 0

Views

Author

Andrey S. Shchebetov and Sergei D. Shchebetov, Jan 21 2017

Keywords

Comments

1000004999700144385 is the largest of the first 225 numbers that require exactly 259 steps to turn into a palindrome (see A281390). The sequence reaches a 119-digit palindrome after 259 steps (see b-file). The number was obtained empirically using computer algorithms and was not reported before.
Row 1000004999700144385 of the array in A243238. - Felix Fröhlich, Jan 21 2017

Examples

			a(1) = 1000004999700144385 + 5834410079994000001 = 6834415079694144386.
		

References

  • Popular Computing (Calabasas, CA), The 196 Problem, Vol. 3 (No. 30, Sep 1975).

Crossrefs

Programs

  • Mathematica
    NestList[#+IntegerReverse[#]&,1000004999700144385,10] (* Harvey P. Dale, Dec 24 2021 *)
  • PARI
    terms(n) = my(x=1000004999700144385, i=0); while(1, print1(x, ", "); x=x+eval(concat(Vecrev(Str(x)))); i++; if(i==n, break))
    /* Print initial 9 terms as follows: */
    terms(9) \\ Felix Fröhlich, Jan 21 2017

Formula

a(n+1) = a(n) + rev(a(n)).

Extensions

a(9)-a(10) from Felix Fröhlich, Jan 21 2017

A033650 Trajectory of 7 under map x --> x + (x-with-digits-reversed).

Original entry on oeis.org

7, 14, 55, 110, 121, 242, 484, 968, 1837, 9218, 17347, 91718, 173437, 907808, 1716517, 8872688, 17735476, 85189247, 159487405, 664272356, 1317544822, 3602001953, 7193004016, 13297007933, 47267087164, 93445163438, 176881317877, 955594506548, 1801200002107
Offset: 0

Views

Author

Keywords

Comments

A Reverse and Add! sequence.
Trajectories of 19, 23, 28, 29, 32, 37, 38, 41, 46, 47, 49, 50, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005
A Reverse and Add! sequence.

Crossrefs

Programs

  • Haskell
    a033650 n = a033650_list !! n
    a033650_list = iterate a056964 7 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 7, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 7, 26] (* Robert G. Wilson v *)

A033651 Trajectory of 9 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

9, 18, 99, 198, 1089, 10890, 20691, 40293, 79497, 158994, 658845, 1207701, 2284722, 4559544, 9019098, 17928207, 88211178, 175322466, 839546037, 1570191975, 7362102726, 13634115363, 49985258994, 99970517988, 188942025987, 978462275868, 1847034540747, 9317488848228
Offset: 0

Views

Author

Keywords

Comments

Trajectories of 27, 36, 45, 54, 63, 72, 81, 90, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005.

Crossrefs

Row n=9 of A243238.
Partial sums of A112296.

Programs

  • Haskell
    a063051 n = a063051_list !! n
    a063051_list = iterate a056964 879 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 9, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 9, 26] (* Robert G. Wilson v *)

A033649 Trajectory of 5 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

5, 10, 11, 22, 44, 88, 176, 847, 1595, 7546, 14003, 44044, 88088, 176176, 847847, 1596595, 7553546, 14007103, 44177144, 88354288, 176599676, 853595347, 1597190705, 6668108656, 13236127322, 35608290553
Offset: 0

Views

Author

Keywords

Comments

Trajectories of 15, 21, 24, 30, 39, 42, 48, 51, 57, 60, 69, 75, 78, 84, 87, 93, 96, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005
A Reverse and Add! sequence.
Trajectories of 13, 17, 20, 26, 31, 35, 40, 53, 62, 71, 79, 80, 97, ..., merge into this sequence. - Robert G. Wilson v, Dec 16 2005

Crossrefs

Programs

  • Haskell
    a033649 n = a033649_list !! n
    a033649_list = iterate a056964 5 -- Reinhard Zumkeller, Sep 22 2011
  • Maple
    a:= proc(n) option remember; `if`(n=0, 5, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(a(n-1)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 18 2014
  • Mathematica
    NestList[ # + FromDigits@Reverse@IntegerDigits@# &, 5, 29] (* Robert G. Wilson v, Dec 16 2005 *)

A033652 Trajectory of 13 under map x->x + (x-with-digits-reversed).

Original entry on oeis.org

13, 44, 88, 176, 847, 1595, 7546, 14003, 44044, 88088, 176176, 847847, 1596595, 7553546, 14007103, 44177144, 88354288, 176599676, 853595347, 1597190705, 6668108656, 13236127322, 35608290553, 71117571206
Offset: 0

Views

Author

Keywords

Comments

To get the next term, reverse the present term and add it to itself.

Examples

			44 = 13 + 31.
		

Crossrefs

Row n=13 of A243238.

Programs

  • Mathematica
    NestList[#+FromDigits[Reverse[IntegerDigits[#]]]&,13,30] (* Harvey P. Dale, Mar 04 2015 *)

Formula

a(n+1) = a(n) + {a(n) reversed}.

A244058 n-th term of the 'Reverse and Add!' sequence starting with n.

Original entry on oeis.org

1, 4, 12, 77, 44, 363, 484, 4444, 79497, 14003, 88088, 175857, 1596595, 1716517, 17794887, 13528163, 176599676, 839546037, 1317544822, 853595347, 8836886388, 13236127322, 13297007933, 668823329856, 175304440267, 909153350908, 9317488848228, 8813200023188
Offset: 1

Views

Author

Alois P. Heinz, Jun 18 2014

Keywords

Comments

a(n) is a palindrome for n in {1, 2, 4, 5, 6, 7, 8, 9, 11, 21, 28, 30}.

Crossrefs

Main diagonal of A243238.

Programs

  • Maple
    b:= proc(n, j) option remember; `if`(j=1, n, (h-> h+ (s->
          parse(cat(s[-i]$i=1..length(s))))(""||h))(b(n, j-1)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=1..40);
  • Mathematica
    Table[Nest[#+IntegerReverse[#]&,n,n-1],{n,30}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 07 2021 *)

A298972 Number of positive integers k < n such that n occurs in the Reverse-and-Add trajectory of k.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 2, 2, 0, 1, 0, 4, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Felix Fröhlich, Jan 30 2018

Keywords

Comments

Number of integers k < n such that n occurs in row k of A243238.
For n > 0, a(n) = 0 iff n is a term of A067031.
For n > 0, a(n) > 0 iff n is a term of A067030.

Examples

			For n = 22: There exist 4 positive integers k < 22 such that 22 occurs in the Reverse-and-Add trajectory of k, namely 5, 10, 11 and 20, so a(22) = 4.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 85, s}, s = Array[Union@ NestWhileList[# + IntegerReverse@ # &, #, # < nn &, 1, nn] &, nn]; Array[Count[Take[s, # - 1], #, 2] &, nn + 1, 0]] (* Michael De Vlieger, Feb 01 2018 *)
  • PARI
    a(n) = my(i=0); for(k=1, n-1, my(x=k); while(x < n, x=x+eval(concat(Vecrev(Str(x))))); if(x==n, i++)); i

A277338 Reverse and Add! sequence starting with 295.

Original entry on oeis.org

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

Views

Author

Matt C. Anderson, Oct 09 2016

Keywords

Comments

Apart from the initial term in both sequences, the same as A006960.
a(0) = 295; a(n+1) = a(n) + A004086(a(n)).
295 is conjectured to be the second smallest initial term which does not lead to a palindrome. Also, 196 is possibly the smallest initial term which does not lead to a palindrome. a(0) = 196 is described in A006960.

Examples

			a(0) = 295
a(1) = 295 + 592 = 887
a(2) = 887 + 788 = 1675
...
		

Crossrefs

Cf. A004086.
Almost the same as A006960.
See index entries at A023108.

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
Showing 1-10 of 10 results.