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

A238019 The first position of the first cycle of sequence {b_k}={b_k}(n) in A237671.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 213, 237, 61, 1, 7534, 289, 328, 107, 1291, 787, 23669, 26237, 1001, 2563, 52781, 101705, 22344, 9952, 68955, 1169, 278, 225448, 187013, 140090, 2785328, 5754090, 622017, 531034, 422605, 857311, 502981, 468270, 855421, 38278372, 1552808
Offset: 2

Views

Author

Keywords

Comments

Is a(12) the last 1 in this sequence?

Crossrefs

A069638 "Sorted" sum of two previous terms, beginning with 0,1. "Sorted" means to sort the digits of the sum in ascending order.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 12, 25, 37, 26, 36, 26, 26, 25, 15, 4, 19, 23, 24, 47, 17, 46, 36, 28, 46, 47, 39, 68, 17, 58, 57, 115, 127, 224, 135, 359, 449, 88, 357, 445, 28, 347, 357, 47, 44, 19, 36, 55, 19, 47, 66, 113, 179, 229, 48, 277, 235, 125, 36, 116, 125, 124, 249, 337
Offset: 0

Views

Author

Gil Broussard, Jan 16 2004

Keywords

Comments

The maximum value in this sequence is 667. After the 75th term, the next 120 terms (a(76) - a(195)) repeat as a group infinitely.

Examples

			a(8)=12 because a(7)+a(6)=13+8=21 and the digits of 21 sorted in ascending order = 12.
Also a(17)=4 because a(16)+a(15)=15+25=40 and the digits of 40 sorted in ascending order = 04, or just 4;
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n, parse(cat(
          sort(convert(a(n-1)+a(n-2), base, 10))[])))
        end:
    seq(a(n), n=0..77);  # Alois P. Heinz, Aug 31 2022
  • Mathematica
    a[0]:=0
    a[1]:=1
    a[n_] := a[n]=FromDigits[Sort[IntegerDigits[a[n-1]+a[n-2]]]] (* Peter J. C. Moses, Feb 08 2014 *)
    nxt[{a_,b_}]:={b,FromDigits[Sort[IntegerDigits[a+b]]]}; NestList[nxt,{0,1},70][[All,1]] (* Harvey P. Dale, Jul 27 2020 *)
  • Python
    a, terms = [0, 1], 66
    [a.append(int("".join(sorted(str(a[-2]+a[-1]))))) for n in range(2, terms)]
    print(a) # Michael S. Branicky, Aug 31 2022

Formula

a(n) = SORT[a(n-1) + a(n-2)].

A288536 The eventual period of the RATS sequence in base n starting from 1; 0 is for infinity.

Original entry on oeis.org

1, 3, 2, 2, 8, 4, 3, 2, 0, 28, 90, 8, 72, 3, 4, 2, 64, 0, 18, 4, 18, 20, 396, 8, 160, 120, 18, 6, 28, 4, 5, 2, 210, 384, 240, 0, 648, 1242, 240, 4, 660, 18, 798, 380, 852, 1298, 1771, 8, 0, 160, 16, 372, 520, 1404, 1740, 6, 36, 2072, 1856, 380, 300, 215, 6, 2, 3384, 50, 2310, 3784, 2904
Offset: 2

Views

Author

Andrey Zabolotskiy, Jun 11 2017

Keywords

Comments

Eventual period of 1 under the mapping x->A288535(n,x), or 0 if there is a divergence and thus no eventual period.
Column 1 of A288537.
In Thiel's terms, the zeroes a(10), a(19), and a(37) correspond to quasiperiodic divergent RATS sequences with quasiperiod 2, while a(50)=0 corresponds to a sequence with quasiperiod 3.

Examples

			In base 3, the RATS mapping acts as 1 -> 2 -> 4 (11 in base 3) -> 8 (22 in base 3) -> 13 (112 in base 3) -> 4, which has already been seen 3 steps ago, so a(3)=3.
		

Crossrefs

Showing 1-3 of 3 results.