The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A358431 a(0) = 1; a(n+1) = 1 if a(n) > n, otherwise a(n+1) = a(n) + a(a(n)). 0
1, 1, 2, 4, 1, 2, 4, 5, 7, 12, 1, 2, 4, 5, 7, 12, 16, 32, 1, 2, 4, 5, 7, 12, 16, 32, 1, 2, 4, 5, 7, 12, 16, 32, 48, 1, 2, 4, 5, 7, 12, 16, 32, 48, 1, 2, 4, 5, 7, 12, 16, 32, 48, 55, 1, 2, 4, 5, 7, 12, 16, 32, 48, 55, 57, 62, 110, 1, 2, 4, 5, 7, 12, 16, 32, 48, 55, 57, 62, 110 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
a[0] = 1; a[n_] := a[n] = If[a[n - 1] > n - 1, 1, a[n - 1] + a[a[n - 1]]]; Array[a, 80, 0] (* Amiram Eldar, Dec 06 2022 *)
PROG
(Python)
from functools import cache
@cache
def a(n): return 1 if n==0 else (1 if a(n-1) > n-1 else a(n-1) + a(a(n-1)))
print([a(n) for n in range(76)]) # Michael S. Branicky, Nov 15 2022
CROSSREFS
Cf. A062039.
Sequence in context: A069705 A106645 A115314 * A062039 A352866 A352883
KEYWORD
nonn
AUTHOR
Aidan Clarke, Nov 15 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 June 1 14:30 EDT 2024. Contains 373025 sequences. (Running on oeis4.)