login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
This sequence is unbounded (see also A356516).
LINKS
FORMULA
a(2*n) = a(n).
EXAMPLE
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.
PROG
(PARI) a(n) = { for (b=2, oo, if (n<b, return (n), n=sumdigits(n, b))) }
(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
CROSSREFS
Sequence in context: A265918 A207676 A161175 * A095955 A272772 A293431
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Aug 09 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 12:09 EDT 2024. Contains 371997 sequences. (Running on oeis4.)