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 72 results. Next

A117817 Let T_n be the infinite sequence formed by starting with 1 and repeatedly reversing the digits and adding n to get the next term. If T_n eventually reaches a cycle, sequence gives length of that cycle, otherwise -1.

Original entry on oeis.org

9, 81, 3, 54, 207, 30, 63, 27, 1, -1, 9, 15, 18, 72, -1, 90, 54, 13, 18, -1, 15, 9, 9, 36, 45, 18, 9, 36, 18, -1, 9, 9, 3, 36, 72, 2, 27, 18, 3, -1, 18, 57, 63, 9, 22, 90, 18, 30, 54, -1, 6, 99, 54, 13, 36, 207, 12, 63, 45, -1, 36, 27, 30, 108, 36, 264, 99, 36, 3, -1, 18, 22, 45, 90, 12, 45, 117, 192, 18, -1, 36, 45, 63, 168, 1008, 36, 24, 306, 9, -1, 99, 639, 36, 54, 144, 18, 225, 468, 1, -1, 18, 300, 189, 171, 765, 90, 45, 462, 90, -1, 9, 513, 63, 69
Offset: 1

Views

Author

N. J. A. Sloane, following discussions with Luc Stevens, May 04 2006

Keywords

Comments

a(multiple of 10) = -1 (see A117816). a(15) = -1 (see A118532). a(n) is a multiple of 9/gcd(9,n) unless it is -1. - Martin Fuller, May 12 2006
For a discussion of the -1 entries see A117816.

Crossrefs

See A117817 for the -1 entries and cross-references to T_1 through T_16.

Programs

  • Mathematica
    ReverseNum[n_] := FromDigits[Reverse[IntegerDigits[n]]]; maxLen=10000; Table[z=1; lst={1}; While[z=ReverseNum[z]+n; !MemberQ[lst,z] && Length[lst]
    				

Extensions

a(21)-a(33) from Luc Stevens, May 08 2006
a(33) onwards from T. D. Noe and Martin Fuller, May 10 2006

A117831 Let S_n be the infinite sequence formed by starting with n and repeatedly reversing the digits and adding 4 to get the next term. Sequence gives number of steps for S_n to reach a cycle, or -1 if no cycle is ever reached.

Original entry on oeis.org

1, 1, 40, 7, 0, 0, 39, 6, 0, 0, 38, 5, 0, 18, 37, 3, 0, 43, 10, 0, 4, 42, 9, 4, 4, 41, 7, 0, 47, 40, 0, 8, 46, 13, 0, 8, 45, 11, 0, 7, 44, 0, 12, 50, 17, 3, 12, 49, 15, 1, 11, 48, 1, 16, 36, 3, 0, 16, 35, 1, 0, 41, 8, 2, 2, 40, 7, 2, 2, 39, 5, 0, 45, 12, 0, 6, 44, 11, 0, 6, 43, 9, 0, 49, 42, 0, 10
Offset: 1

Views

Author

N. J. A. Sloane, following discussions with Luc Stevens, May 03 2006

Keywords

Comments

It is conjectured that S_n always reaches a cycle.
There are 22 different cycles of length 90 with 4-digit components. I guess that at most half of the numbers between 1000 and 10000 lead to the cycle of length 54 shown in A117830. - Klaus Brockhaus, May 05 2006

Crossrefs

S_1 is given in A117828, S_3 in A117829, S_1015 in A117807.
Records are in A118473, A118474.
Full list of sequences on this topic (1): A117230, A117521, A117800, A117816, A117817, A117827, A117828, A117829, A117830, A117831 (this sequence)
Full list of sequences on this topic (2): A117837, A117841, A118473, A118474, A118510, A118511, A118512, A118513, A118514, A118515, A118516
Full list of sequences on this topic (3): A118517-A118533, A118535

Programs

  • Maple
    V:= Vector(10^5,-1):
    f:= proc(n)
      local L, H, S, i, j,found,x,y;
      global V;
      S:= {n}: H:= n; x:= n;
      for i from 1 to 10^5 do
        if V[x] > -1 then
           for j from 1 to i-1 do V[H[j]]:= i-j+V[x] od;
           return V[n];
        fi;
        L:= convert(x,base,10);
        x:= add(L[-j]*10^(j-1),j=1..nops(L)) + 4;
        if member(x, S) then
          found:= false; y:= 0;
          V[x]:= 0;
          for j from i by -1 to 1 do
            if H[j] = x then found:= true
            elif not found then V[H[j]]:= 0
            else y:= y+1; V[H[j]]:= y;
            fi
          od;
          return V[n]
        fi;
        H:= H, x;
        S:= S union {x};
      od;
    end proc:
    map(f, [$1..200]); # Robert Israel, May 07 2020

Extensions

Corrected and extended by Klaus Brockhaus, May 05 2006
Confirmed by N. J. A. Sloane, May 05 2006

A117230 Start with 1 and repeatedly reverse the digits and add 1 to get the next term.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10
Offset: 1

Views

Author

N. J. A. Sloane, following discussions with Luc Stevens, May 04 2006

Keywords

Crossrefs

Programs

  • Maple
    read transforms; t1:=[1]; for n from 1 to 80 do t1:=[op(t1),1+digrev(t1[n])]; od:
  • Mathematica
    Join[{1},LinearRecurrence[{0,0,0,0,0,0,0,0,1},{2,3,4,5,6,7,8,9,10},99]] (* Ray Chandler, Jul 18 2015 *)
  • PARI
    a(n)=if(n>1,(n-2)%9+2,1) \\ M. F. Hasler, May 22 2014

Formula

Has period 9.
G.f.: -x*(9*x^9 +9*x^8 +8*x^7 +7*x^6 +6*x^5 +5*x^4 +4*x^3 +3*x^2 +2*x +1) / ((x -1)*(x^2 +x +1)*(x^6 +x^3 +1)). - Colin Barker, May 23 2014

Extensions

Correction to the terms of the sequence (inserted missing term) Jeremy Gardiner, Jun 17 2010

A118533 Start with 1 and repeatedly reverse the digits and add 16 to get the next term.

Original entry on oeis.org

1, 17, 87, 94, 65, 72, 43, 50, 21, 28, 98, 105, 517, 731, 153, 367, 779, 993, 415, 530, 51, 31, 29, 108, 817, 734, 453, 370, 89, 114, 427, 740, 63, 52, 41, 30, 19, 107, 717, 733, 353, 369, 979, 995, 615, 532, 251, 168, 877, 794, 513, 331, 149, 957
Offset: 1

Views

Author

N. J. A. Sloane, May 06 2006

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Reverse[IntegerDigits[#]]]+16&,1,60] (* Harvey P. Dale, Jul 19 2011 *)

Formula

After 721 steps enters a cycle of length 90.

A117841 Start with 1 and repeatedly reverse the digits and add 10 to get the next term.

Original entry on oeis.org

1, 11, 21, 22, 32, 33, 43, 44, 54, 55, 65, 66, 76, 77, 87, 88, 98, 99, 109, 911, 129, 931, 149, 951, 169, 971, 189, 991, 209, 912, 229, 932, 249, 952, 269, 972, 289, 992, 309, 913, 329, 933, 349, 953, 369, 973, 389, 993, 409, 914, 429, 934, 449, 954, 469, 974, 489, 994, 509
Offset: 1

Views

Author

David Applegate, May 05 2006

Keywords

Comments

This sequence (unlike A117828, say) never cycles.
The operation can never generate a trailing zero and so is reversible. So it loops only if it returns to the start, which is impossible. - Martin Fuller, May 12 2006

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Reverse[IntegerDigits[#]]]+10&,1,60] (* Harvey P. Dale, May 19 2012 *)
    NestList[IntegerReverse[#]+10&,1,60] (* Harvey P. Dale, May 29 2025 *)

A118532 Start with 1 and repeatedly reverse the digits and add 15 to get the next term.

Original entry on oeis.org

1, 16, 76, 82, 43, 49, 109, 916, 634, 451, 169, 976, 694, 511, 130, 46, 79, 112, 226, 637, 751, 172, 286, 697, 811, 133, 346, 658, 871, 193, 406, 619, 931, 154, 466, 679, 991, 214, 427, 739, 952, 274, 487, 799, 1012, 2116, 6127, 7231, 1342, 2446
Offset: 1

Views

Author

N. J. A. Sloane, May 06 2006

Keywords

Comments

This sequence never cycles.
The plot (see the Noe link) shows 2774 terms of this sequence. It has a regular structure, which continues at higher decades. - T. D. Noe, May 10 2006

Crossrefs

Programs

  • Haskell
    a118532 n = a118532_list !! (n-1)
    a118532_list = iterate ((+ 15) . a004086) 1
    -- Reinhard Zumkeller, Jan 29 2014
  • PARI
    A118532(Nmax,Q=15,S=1)=vector(Nmax,i,if(i>1,S=A004086(S)+Q,S)) \\ - M. F. Hasler, May 06 2012
    

Formula

This sequence never cycles. After a while, the pattern of length changes settles into an increasing pattern: 10^(4m)+3, 10^(4m+1)+3, 10^(4m+2)+12, 10^(4m+3)+12, 10^(4(m+1))+3, ... The key is that every two steps adds 15 at each end, unless there is a carry across the middle or a trailing 0. This allows many steps to be carried out in a single operation. - Martin Fuller, May 12 2006
a(n+1) = A004086(a(n)) + 15. - Reinhard Zumkeller, Jan 29 2014

A118529 Start with 1 and repeatedly reverse the digits and add 12 to get the next term.

Original entry on oeis.org

1, 13, 43, 46, 76, 79, 109, 913, 331, 145, 553, 367, 775, 589, 997, 811, 130, 43, 46, 76, 79, 109, 913, 331, 145, 553, 367, 775, 589, 997, 811, 130, 43, 46, 76, 79, 109, 913, 331, 145, 553, 367, 775, 589, 997, 811, 130, 43, 46, 76, 79, 109, 913, 331
Offset: 1

Views

Author

N. J. A. Sloane, May 06 2006

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[IntegerReverse[#]+12&,1,60] (* Harvey P. Dale, Dec 16 2024 *)

Formula

After 2 steps enters a cycle of length 15.

A118535 Start with 1 and repeatedly reverse the digits and add 20 to get the next term.

Original entry on oeis.org

1, 21, 32, 43, 54, 65, 76, 87, 98, 109, 921, 149, 961, 189, 1001, 1021, 1221, 1241, 1441, 1461, 1661, 1681, 1881, 1901, 1111, 1131, 1331, 1351, 1551, 1571, 1771, 1791, 1991, 2011, 1122, 2231, 1342, 2451, 1562, 2671, 1782, 2891, 2002, 2022
Offset: 1

Views

Author

N. J. A. Sloane, May 07 2006

Keywords

Programs

  • Mathematica
    NestList[IntegerReverse[#]+20&,1,50] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 14 2020 *)

Formula

Never reaches a cycle (see A117816).

A118090 Start with 1 and repeatedly reverse the digits and add 44 to get the next term.

Original entry on oeis.org

1, 45, 98, 133, 375, 617, 760, 111, 155, 595, 639, 980, 133, 375, 617, 760, 111, 155, 595, 639, 980, 133, 375, 617, 760, 111, 155, 595, 639, 980, 133, 375, 617, 760, 111, 155, 595, 639, 980, 133, 375, 617, 760, 111, 155, 595, 639, 980, 133, 375, 617, 760
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 11 2006

Keywords

Comments

After 3 steps enters a cycle of length 9.

Crossrefs

Programs

  • Mathematica
    NestList[IntegerReverse[#]+44&,1,60] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 03 2021 *)

A118150 Start with 1 and repeatedly reverse the digits and add 53 to get the next term.

Original entry on oeis.org

1, 54, 98, 142, 294, 545, 598, 948, 902, 262, 315, 566, 718, 870, 131, 184, 534, 488, 937, 792, 350, 106, 654, 509, 958, 912, 272, 325, 576, 728, 880, 141, 194, 544, 498, 947, 802, 261, 215, 565, 618, 869, 1021, 1254, 4574, 4807, 7137, 7370, 790, 150, 104
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 14 2006

Keywords

Comments

After 49 steps enters a cycle of 54.

Crossrefs

Programs

  • Mathematica
    NestList[IntegerReverse[#]+53&,1,60] (* Harvey P. Dale, Sep 21 2023 *)

Extensions

Corrected by Harvey P. Dale, Apr 19 2014
Showing 1-10 of 72 results. Next