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.

A237575 Fibonacci-like numbers with nonincreasing positive digits. Let a** denote the number that is obtained from a if its digits are written in nonincreasing order. Let a<+>b = (a + b)**. a(0)=0, a(1)=1, for n>=2, a(n) = a(n-1) <+> a(n-2).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 31, 93, 421, 541, 962, 5310, 7622, 93221, 843100, 963321, 8642110, 9654310, 98642210, 986522100, 8654311100, 9864332000, 88654311100, 98865431100, 987754221100, 9866652211000, 86544432110000, 98644321110000, 888755322110000
Offset: 0

Views

Author

Vladimir Shevelev, Feb 09 2014

Keywords

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..30);  # Alois P. Heinz, Aug 31 2022
  • Mathematica
    a[0]:=0;a[1]:=1;a[n_]:=a[n]=FromDigits[Reverse[Sort[IntegerDigits[a[n-1]+a[n-2]]]]];Map[a,Range[0,20]] (* Peter J. C. Moses, Feb 09 2014 *)

Extensions

Correction and extension by Peter J. C. Moses

A237671 Let m_n denote the number which is obtained from n-base representation of m if its digits are written in nondecreasing order; then a(n) is the smallest period of the sequence which is defined by the recurrence b(0)=0, b(1)=1, b(k)=(b(k-1) + b(k-2))_n, for k>=2, or a(n)=0, if there is no such period.

Original entry on oeis.org

1, 3, 16, 6, 20, 24, 16, 36, 120, 300, 20, 288, 28, 192, 200, 552, 180, 192, 180, 1380, 224, 60, 1728, 912, 3800, 756, 576, 1776, 4102, 15480, 3540, 1344, 10800, 14328, 800, 2304, 1520, 1890, 1232, 11280, 9040, 31152, 49544, 3660, 6360, 3696, 13248, 21408
Offset: 2

Views

Author

Keywords

Comments

We conjecture that the sequence b is always eventually periodic, and so a(n)>0.

Examples

			For n=5, b-sequence begins 0,1,1,2,3,1,4,1,1,2,... It has period {1,1,2,3,1,4} of length 6. So a(5)=6.
a(10) = 120, because the eventual period of A069638 is 120.
		

Crossrefs

Programs

  • Python
    import sympy,functools
    def digits2int(x,b):
      return functools.reduce(lambda n,d:b*n+d,x,0)
    def A237671(n):
      return next(sympy.cycle_length(lambda x:(x[1],digits2int(sorted(sympy.ntheory.factor_.digits(sum(x),n)[1:]),n)),(0,1)))[0] # Pontus von Brömssen, Aug 28 2020

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

Showing 1-3 of 3 results.