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-8 of 8 results.

A117827 A117830 sorted and duplicates removed.

Original entry on oeis.org

5, 6, 9, 10, 13, 17, 20, 28, 31, 35, 39, 42, 57, 61, 72, 75, 79, 83, 86, 97, 101, 105, 126, 141, 145, 181, 185, 221, 308, 323, 327, 363, 367, 403, 505, 509, 530, 545, 549, 585, 589, 625, 712, 727, 731, 767, 771, 807, 909, 913, 949, 953, 989, 993
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 06 2006

Keywords

Extensions

Edited by N. J. A. Sloane, May 05 2006

A117828 Start with 1 and repeatedly reverse the decimal digits and add 4 to get the next term.

Original entry on oeis.org

1, 5, 9, 13, 35, 57, 79, 101, 105, 505, 509, 909, 913, 323, 327, 727, 731, 141, 145, 545, 549, 949, 953, 363, 367, 767, 771, 181, 185, 585, 589, 989, 993, 403, 308, 807, 712, 221, 126, 625, 530, 39, 97, 83, 42, 28, 86, 72, 31, 17, 75, 61, 20, 6, 10, 5, 9, 13, 35, 57, 79, 101, 105, 505, 509, 909, 913, 323, 327, 727, 731
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 06 2006

Keywords

Crossrefs

Programs

  • Maple
    read transforms; t1:=[1]; for n from 1 to 80 do t1:=[op(t1),4+digrev(t1[n])]; od: # N. J. A. Sloane
  • Mathematica
    f[n_] := 4 + FromDigits@ Reverse@ IntegerDigits@n; NestList[ f@# &, 1, 57] (* and *)
    (* to view the cycle *) NestWhileList[ f@# &, 1, UnsameQ, All] (* Robert G. Wilson v, May 09 2006 *)
  • PARI
    a(n)=if(n>1, my(t=6); for(k=1,n%54, t=fromdigits(Vecrev(digits(t)))+4); t, 1) \\ Charles R Greathouse IV, Nov 07 2016

Formula

After one step enters a cycle of length 54: see A117827, A117830.

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

A118474 Where records occur in A117831.

Original entry on oeis.org

1, 3, 18, 29, 44, 104, 111, 297, 392, 479, 574, 1013, 1994, 10013, 10115, 10135, 10155, 10175, 10195, 11021, 30013, 49999, 59994, 100022, 199018, 239991, 389928, 429983, 979924, 1000013, 1001015, 1001035, 1001055, 1001075, 1001095, 1001195, 1001295
Offset: 1

Views

Author

N. J. A. Sloane, May 05 2006

Keywords

Comments

a(1) to a(13) enter the only cycle of length 54 (cf. A117830), a(14) to a(29) enter a cycle of length 90 (cf. A117807), a(30) to a(45) enter a cycle of length 1890.

Crossrefs

Extensions

a(8)-a(13) from N. J. A. Sloane, May 06 2006
a(14)-a(20) from Klaus Brockhaus, May 07 2006
a(21)-a(37) from Klaus Brockhaus, Aug 01 2006

A117807 Start with 1015 and repeatedly reverse the digits and add 4 to get the next term.

Original entry on oeis.org

1015, 5105, 5019, 9109, 9023, 3213, 3127, 7217, 7131, 1321, 1235, 5325, 5239, 9329, 9243, 3433, 3347, 7437, 7351, 1541, 1455, 5545, 5459, 9549, 9463, 3653, 3567, 7657, 7571, 1761, 1675, 5765, 5679, 9769, 9683, 3873, 3787, 7877, 7791, 1981, 1895, 5985, 5899, 9989, 9903, 3103, 3017, 7107, 7021, 1211, 1125, 5215, 5129, 9219, 9133, 3323, 3237, 7327, 7241, 1431, 1345, 5435, 5349, 9439, 9353, 3543, 3457, 7547, 7461, 1651, 1565, 5655, 5569, 9659, 9573, 3763, 3677, 7767, 7681, 1871, 1785, 5875, 5789, 9879, 9793, 3983, 3897, 7987, 7901, 1101
Offset: 1

Views

Author

Klaus Brockhaus, May 05 2006

Keywords

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Reverse[IntegerDigits[#]]]+4&,1015,90] (* Harvey P. Dale, Jul 18 2015 *)

Formula

Has period 90. A full period is shown.

A117829 Start with 3 and repeatedly reverse the digits and add 4 to get the next term.

Original entry on oeis.org

3, 7, 11, 15, 55, 59, 99, 103, 305, 507, 709, 911, 123, 325, 527, 729, 931, 143, 345, 547, 749, 951, 163, 365, 567, 769, 971, 183, 385, 587, 789, 991, 203, 306, 607, 710, 21, 16, 65, 60, 10, 5, 9, 13, 35, 57, 79, 101, 105, 505, 509, 909, 913, 323, 327, 727, 731, 141, 145
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 06 2006

Keywords

Crossrefs

Programs

  • Maple
    read transforms; t1:=[3]; for n from 1 to 80 do t1:=[op(t1),4+digrev(t1[n])]; od: # N. J. A. Sloane
  • Mathematica
    f[n_] := 4 + FromDigits@ Reverse@ IntegerDigits@n; NestList[ f@# &, 3, 58] (* James C. McMahon, Sep 24 2024 *)
    NestList[IntegerReverse[#]+4&,3,60] (* Harvey P. Dale, Feb 17 2025 *)

Formula

Has period 54: see A117827, A117830.

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 *)
Showing 1-8 of 8 results.