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

A153130 Period 6: repeat [1, 2, 4, 8, 7, 5].

Original entry on oeis.org

1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5
Offset: 0

Views

Author

Paul Curtz, Dec 19 2008

Keywords

Comments

Digital root of 2^n.
A regular version of Pitoun's sequence: a(n) = A029898(n+1).
Also obtained from permutations of A141425, A020806, A070366, A153110, A153990, A154127, A154687, or A154815.
This sequence and its (again period 6) repeated differences produce the table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, -1, -2, -4, 1, 2, 4, -1, -2, ...
1, 2, -5, -1, -2, 5, 1, 2, -5, -1, -2, ...
1, -7, 4, -1, 7, -4, 1, -7, 4, -1, 7, ...
-8, 11, -5, 8,-11, 5, -8, 11, -5, 8,-11, ...
19,-16, 13,-19, 16,-13, 19,-16, 13,-19, 16, ...
-35, 29,-32, 35,-29, 32,-35, 29,-32, 35,-29, ...
64,-61, 67,-64, 61,-67, 64,-61, 67,-64, 61, ...
If each entry of this table is read modulo 9 we obtain the very regular table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
Also the decimal expansion of the constant 125/1001. - R. J. Mathar, Jan 23 2009
Digital root of the powers of any number congruent to 2 mod 9. - Alonso del Arte, Jan 26 2014

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. digital roots of powers of c mod 9: c = 4, A100402; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) + a(n+3) = 9 = A010734(n).
G.f.: (1+x+2x^2+5x^3)/((1-x)(1+x)(1-x+x^2)). - R. J. Mathar, Jan 23 2009
a(n) = A082365(n) mod 9. - Paul Curtz, Mar 31 2009
a(n) = -1/2*cos(Pi*n) - 3*cos(1/3*Pi*n) - 3^(1/2)*sin(1/3*Pi*n) + 9/2. - Leonid Bedratyuk, May 13 2012
a(n) = A010888(A004000(n+1)). - Ivan N. Ianakiev, Nov 27 2014
From Wesley Ivan Hurt, Apr 20 2015: (Start)
a(n) = a(n-6) for n>5.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (2+3*(n-1 mod 3))*(n mod 2) + (1+3*(-n mod 3))*(n-1 mod 2). (End)
a(n) = 2^n mod 9. - Nikita Sadkov, Oct 06 2018
From Stefano Spezia, Mar 20 2025: (Start)
E.g.f.: 4*cosh(x) - exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 5*sinh(x).
a(n) = A007953(2*a(n-1)) = A010888(2*a(n-1)). (End)

Extensions

Edited by R. J. Mathar, Apr 09 2009

A036839 RATS(n): Reverse Add Then Sort the digits.

Original entry on oeis.org

0, 2, 4, 6, 8, 1, 12, 14, 16, 18, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 22, 33, 44, 55, 66, 77, 88, 99, 11, 112, 33, 44, 55, 66, 77, 88, 99, 11, 112, 123, 44, 55, 66, 77, 88, 99, 11, 112, 123, 134, 55, 66, 77, 88, 99, 11, 112, 123, 134, 145, 66, 77
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2002

Keywords

Comments

a(n) = RATS(n), not RATS(a(n-1)).
Row 10 of A288535. - Andrey Zabolotskiy, Jun 14 2017

Examples

			1 -> 1 + 1 = 2, so a(1) = 2; 3 -> 3 + 3 = 6, so a(3) = 6.
		

Crossrefs

Programs

  • Haskell
    a036839 = a004185 . a056964  -- Reinhard Zumkeller, Mar 14 2012
    
  • Maple
    read transforms; RATS := n -> digsort(n + digrev(n));
  • Mathematica
    FromDigits[Sort[IntegerDigits[#+FromDigits[Reverse [IntegerDigits[#]]]]]] & /@Range[0,80]  (* Harvey P. Dale, Mar 26 2011 *)
  • Python
    def A036839(n):
        x = str(n+int(str(n)[::-1]))
        return int("".join(sorted(x))) # Indranil Ghosh, Jan 28 2017

Formula

Form m by Reversing the digits of n, Add m to n Then Sort the digits of the sum into increasing order to get a(n).
a(n) = A004185(A056964(n)). [Reinhard Zumkeller, Mar 14 2012]

A057615 ATS: Add Then Sort (i.e., double previous term and then sort digits).

Original entry on oeis.org

1, 2, 4, 8, 16, 23, 46, 29, 58, 116, 223, 446, 289, 578, 1156, 1223, 2446, 2489, 4789, 5789, 11578, 12356, 12247, 24449, 48889, 77789, 155578, 111356, 122227, 244445, 48889, 77789, 155578, 111356, 122227, 244445, 48889, 77789, 155578, 111356
Offset: 1

Views

Author

Henry Bottomley, Oct 09 2000

Keywords

Comments

Starting from a(1)=1 sequence cycles starting from a(25) = 48889, 77789, 155578, 111356, 122227, 244445, 48889, ... etc.

Examples

			a(8)=29 since a(7)=46, 46 + 46 = 92 and 92 sorted is 29.
		

Crossrefs

Cf. A033861 for STA, A004000 for RATS.
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

  • Mathematica
    NestList[FromDigits[Sort[IntegerDigits[2#]]]&,1,40] (* Harvey P. Dale, Oct 03 2011 *)
  • Python
    from itertools import accumulate
    def ats(anm1, _): return int("".join(sorted(str(2*anm1))))
    print(list(accumulate([1]*40, ats))) # Michael S. Branicky, Jul 17 2021

Formula

G.f.: x*(-219996*x^29 - 109980*x^28 - 99000*x^27 - 144000*x^26 - 72000*x^25 - 44100*x^24 - 21960*x^23 - 9801*x^22 - 11133*x^21 - 10422*x^20 - 5211*x^19 - 4500*x^18 - 2043*x^17 - 2223*x^16 - 1107*x^15 - 1098*x^14 - 549*x^13 - 243*x^12 - 423*x^11 - 207*x^10 - 108*x^9 - 54*x^8 - 27*x^7 - 45*x^6 - 23*x^5 - 16*x^4 - 8*x^3 - 4*x^2 - 2*x - 1)/(x^6 - 1). - Chai Wah Wu, Nov 20 2018

A066711 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 9.

Original entry on oeis.org

9, 18, 99, 189, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117, 288, 117
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2002

Keywords

Comments

a(1) = A114612(1) = 9; A114611(3) = 2. - Reinhard Zumkeller, Mar 14 2012

Examples

			668 -> 668 + 866 = 1534 -> 1345.
		

Crossrefs

Programs

  • Haskell
    a066711_list = iterate a036839 9  -- Reinhard Zumkeller, Mar 14 2012
    
  • Mathematica
    NestList[ FromDigits[ Sort[ IntegerDigits[# + FromDigits[ Reverse[ IntegerDigits[#]]]]]] &, 9, 48] (* Jayanta Basu, Aug 13 2013 *)
    Join[{9, 18, 99, 189},LinearRecurrence[{0, 1},{117, 288},45]] (* Ray Chandler, Aug 25 2015 *)
  • Python
    from itertools import accumulate
    def rats(anm1, _):
        return int("".join(sorted(str(anm1 + int(str(anm1)[::-1])))))
    print(list(accumulate([9]*49, rats))) # Michael S. Branicky, Sep 18 2021

Formula

Let a(n) = k, form m by Reversing the digits of k, Add m to k Then Sort the digits of the sum into increasing order to get a(n+1).
Periodic with period 2.
a(n+1) = A036839(a(n)). - Reinhard Zumkeller, Mar 14 2012
G.f.: x*(-99*x^5 - 18*x^4 - 171*x^3 - 90*x^2 - 18*x - 9)/(x^2 - 1). - Chai Wah Wu, Feb 07 2020

A066710 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 3.

Original entry on oeis.org

3, 6, 12, 33, 66, 123, 444, 888, 1677, 3489, 12333, 44556, 111, 222, 444, 888, 1677, 3489, 12333, 44556, 111, 222, 444, 888, 1677, 3489, 12333, 44556, 111, 222, 444, 888, 1677, 3489, 12333, 44556, 111, 222, 444, 888, 1677, 3489, 12333
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2002

Keywords

Comments

a(1) = A114614(1) = 3; A114611(3) = 8. [Reinhard Zumkeller, Mar 14 2012]

Examples

			668 -> 668 + 866 = 1534 -> 1345.
		

Crossrefs

Programs

  • Haskell
    a066710_list = iterate a036839 3  -- Reinhard Zumkeller, Mar 14 2012
  • Mathematica
    f[k_] := Module[{m = FromDigits[Reverse[IntegerDigits[k]]]}, FromDigits[ Sort[ IntegerDigits[k + m]]]]; NestList[f, 3, 50] (* Harvey P. Dale, Jan 18 2011 *)

Formula

Let a(n) = k, form m by Reversing the digits of k, Add m to k Then Sort the digits of the sum into increasing order to get a(n+1).
Periodic with period 8.
a(n+1) = A036839(a(n)). [Reinhard Zumkeller, Mar 14 2012]
From Chai Wah Wu, Feb 07 2020: (Start)
a(n) = a(n-8) for n > 14.
G.f.: x*(-99*x^13 - 45*x^12 - 44523*x^11 - 12321*x^10 - 3483*x^9 - 1674*x^8 - 888*x^7 - 444*x^6 - 123*x^5 - 66*x^4 - 33*x^3 - 12*x^2 - 6*x - 3)/(x^8 - 1). (End)

A161593 Lengths of new periods in the RATS sequence (0 replacing infinity).

Original entry on oeis.org

0, 8, 2, 18, 2, 2, 2, 14, 2, 3, 2, 2, 2, 6
Offset: 1

Views

Author

J. H. Conway and Tanya Khovanova, Jun 14 2009

Keywords

Comments

The values A114611(j) for those starting values j of the RATS mapping x->A036839(x) which end in cycles that cannot be reached starting from any smaller j.
Every integer > 1 appears in this sequence. - Andrey Zabolotskiy, Jun 11 2017
For other terms see Branicky link. - Michael S. Branicky, Dec 30 2022

Examples

			a(1)=A114611(0). a(2)=A114611(j=3)=8 with a cycle of length 8 shown in A066710.
A114611(j=6)=8 does not contribute because the cycle is the same as reached from j=3.
a(3)=A114611(9)=2 with a new cycle of length 2 shown in A066711.
A114611(j=12)=8 does not contribute because the cycle is the same as reached from j=3.
A114611(j=15)=8 does not contribute because 15->66->123 is the cycle as reached from j=3.
A114611(j=18)=2 does not contribute because the cycle is the same as reached from j=9.
A114611(j=21)=8 does not contribute because 21->33->66 reaches the same cycle as started from j=3.
a(4)=A114611(j=29)=18.
		

Crossrefs

Extensions

Comment and examples added by R. J. Mathar, Jul 07 2009
a(9)-a(14) from Michael S. Branicky, Dec 30 2022

A209878 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 20169.

Original entry on oeis.org

20169, 111267, 337788, 1122255, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666, 1111113, 2222244, 4446666
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 14 2012

Keywords

Comments

A114613(1) = 20169 is the smallest starting number for a RATS trajectory leading to a cycle of length 3: A114611(20169) = 3;
a(n + 3) = a(n) for n > 4.

Crossrefs

Programs

  • Haskell
    a209878 n = a209878_list !! (n-1)
    a209878_list = iterate a036839 20169
  • Mathematica
    Join[{20169, 111267, 337788, 1122255},LinearRecurrence[{0, 0, 1},{4446666, 1111113, 2222244},25]] (* Ray Chandler, Aug 25 2015 *)

Formula

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

A209879 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 6999.

Original entry on oeis.org

6999, 15699, 11355, 66666, 123333, 445566, 111111, 222222, 444444, 888888, 1677777, 3455589, 11112333, 33444444, 77778888, 156666666, 123333378, 666669999, 1356666666, 123333789, 11111667, 22777788, 11115555, 66666666, 123333333, 445566666, 111122223
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 14 2012

Keywords

Comments

A114615(1) = 6999 is the smallest starting number for a RATS trajectory leading to a cycle of length 14: A114611(6999) = 14;
a(n + 14) = a(n) for n > 25.

Crossrefs

Programs

  • Haskell
    a209879 n = a209879_list !! (n-1)
    a209879_list = iterate a036839 6999
  • Mathematica
    rats[n_]:=Module[{idnr=FromDigits[Reverse[IntegerDigits[n]]]}, FromDigits[ Sort[ IntegerDigits[idnr+n]]]]; NestList[rats,6999,30] (* Harvey P. Dale, May 29 2014 *)

Formula

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

A209880 RATS: Reverse Add Then Sort the digits applied to previous term, starting with 29.

Original entry on oeis.org

29, 112, 233, 556, 1112, 2233, 5555, 1111, 2222, 4444, 8888, 16777, 34589, 112333, 444455, 889999, 1788899, 1177777, 4558889, 13444447, 77888888, 156667777, 233444489, 1112278888, 11999, 11119, 1223, 4444, 8888, 16777, 34589, 112333, 444455, 889999, 1788899
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 14 2012

Keywords

Comments

A114616(1) = 29 is the smallest starting number for a RATS trajectory leading to a cycle of length 18: A114611(29) = 18;
a(n + 18) = a(n) for n > 9.

Crossrefs

Programs

  • Haskell
    a209880 n = a209880_list !! (n-1)
    a209880_list = iterate a036839 29
  • Mathematica
    NestList[FromDigits[Sort[IntegerDigits[#+IntegerReverse[#]]]]&,29,40] (* or *) PadRight[{29,112,233,556,1112,2233,5555,1111,2222},50,{4558889,13444447,77888888,156667777,233444489,1112278888,11999,11119,1223,4444,8888,16777,34589,112333,444455,889999,1788899,1177777}] (* Harvey P. Dale, Sep 17 2018 *)

Formula

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

A161596 Numbers in cycles of RATS sequences.

Original entry on oeis.org

78, 111, 117, 156, 222, 288, 444, 888, 1223, 1677, 3489, 4444, 8888, 11119, 11127, 11667, 11999, 12333, 16777, 23388, 27888, 34589, 44556, 111177, 112333, 228888, 444455, 889999, 1111113, 1177777, 1788899, 2222244, 4446666, 4558889, 11144445, 13444447, 55556688
Offset: 1

Views

Author

J. H. Conway and Tanya Khovanova, Jun 14 2009

Keywords

Comments

The set of all numbers in any cycle of RATS sequences, sorted into natural order.
This implies that for any value a(j) in this sequence, A036839(a(j)) is again member of the sequence.
See Branicky link for larger terms. - Michael S. Branicky, Dec 30 2022

Examples

			The numbers 111, 222, 444, 888, 1677, 3489, 12333 and 44556 are in the sequence because they are in the cycle shown in A066710. The numbers 117 and 288 are in the cycle demonstrated in A066711.
The numbers 4444, 8888, 16777, 34589, 112333, 444455, ..., 1112278888, 11999, 1119, 1223 are in the cycle started at A161590(4). The numbers 11127 and 23388 are in the cycle started at A161590(7).
		

Crossrefs

Extensions

Descriptive comment and examples added by R. J. Mathar, Jul 08 2009
a(20) and beyond from Michael S. Branicky, Dec 30 2022
Showing 1-10 of 18 results. Next