[go: up one dir, main page]

login
A376549
The nested recursive P312 function, a(n) = 3 + a(n-a(n-2))) for n>=1, a(n) = 1 for n<1.
1
1, 4, 7, 4, 4, 7, 10, 4, 4, 10, 13, 7, 4, 13, 16, 10, 4, 7, 19, 7, 7, 19, 13, 7, 10, 22, 7, 10, 22, 10, 7, 22, 25, 10, 13, 25, 10, 7, 25, 28, 13, 16, 13, 13, 25, 28, 22, 10, 10, 31, 16, 10, 13, 16, 19, 31, 10, 10, 13, 34, 13, 13, 34, 19, 10, 25, 13, 16, 34, 19
OFFSET
0,2
LINKS
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
Sequence in context: A005472 A111522 A342203 * A019735 A202501 A358189
KEYWORD
nonn
AUTHOR
Ed Pegg Jr, Sep 27 2024
STATUS
approved