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

A356386 a(n) is the number of occurrences of n in A356384.

Original entry on oeis.org

1, 1, 2, 4, 4, 8, 0, 20, 8, 10, 6, 8, 12, 0, 48, 0, 30, 4, 30, 26, 18, 8, 4, 46, 0, 78, 0, 42, 38, 0, 36, 28, 52, 0, 60, 36, 0, 76, 24, 26, 8, 122, 0, 84, 24, 34, 42, 0, 64, 34, 86, 0, 108, 64, 40, 64, 46, 0, 98, 68, 0, 176, 20, 40, 134, 0, 42, 66, 124, 0, 114
Offset: 1

Views

Author

Rémy Sigrist, Aug 05 2022

Keywords

Comments

Positive terms correspond to the RUNS transform of A356384.

Examples

			A356384 begins 1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 8, ...
So a(1) = 1,
   a(2) = 1,
   a(3) = 2,
   a(4) = 4,
   a(5) = 4,
   a(6) = 8,
   a(7) = 0.
		

Crossrefs

Cf. A356384.

Programs

  • C
    See Links section.

A356515 For any n >= 0, let x_n(1) = n, and for any b > 1, x_n(b) is the sum of digits of x_n(b-1) in base b; x_n is eventually constant, with value a(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 3, 2, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 3, 2, 1, 1, 2, 1, 2, 2
Offset: 0

Views

Author

Rémy Sigrist, Aug 09 2022

Keywords

Comments

This sequence is unbounded (see also A356516).

Examples

			For n = 87:
- we have:
     b    x_87(b)  x_87(b) in base b+1
     ---  -------  -------------------
       1       87            "1010111"
       2        5                 "12"
     >=3        3                  "3"
- so a(87) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = { for (b=2, oo, if (n
    				
  • Python
    from sympy.ntheory import digits
    def a(n):
        xn, b = n, 2
        while xn >= b: xn = sum(digits(xn, b)[1:]); b += 1
        return xn
    print([a(n) for n in range(105)]) # Michael S. Branicky, Aug 10 2022

Formula

a(2*n) = a(n).
Showing 1-2 of 2 results.