OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
S. Wolfram, Nestedly Recursive Functions, 2024.
FORMULA
a(n) mod 3 = 1.
MAPLE
a:= proc(n) option remember; `if`(n<1, 1, 3 + a(n-a(n-2))) end:
seq(a(n), n=0..75); # Alois P. Heinz, Sep 28 2024
MATHEMATICA
ResourceFunction["RecursiveFunction"][f[n]->3+f[n-f[n-2]], {n <= 0 -> 1}][Range[50]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ed Pegg Jr, Sep 27 2024
STATUS
approved