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!)
A087836 a(n) = a(a(a(a(n-1)))) + a(n - a(n-1)) with a(1)=a(2)=1. 6
1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MAPLE
a:= proc(n) option remember; `if`(n<3, 1,
a(a(a(a(n-1)))) +a(n-a(n-1)))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 06 2017
MATHEMATICA
a[n_Integer?Positive] := a[n] =a[a[a[a[n-1]]]] + a[n - a[n-1]]; a[1] = a[2] = 1; Table[a[n], {n, 1, 256}]
PROG
(PARI) lista(nn) = {va = vector(nn); va[1] = 1; va[2] = 1; for (n=3, nn, va[n] = va[va[va[va[n-1]]]]+va[n-va[n-1]]; ); va; } \\ Michel Marcus, Aug 06 2017
CROSSREFS
Cf. A004001. Different from A087817.
Sequence in context: A107436 A002024 A123578 * A087845 A130146 A113764
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Oct 07 2003
EXTENSIONS
Corrected by Michel Marcus, Aug 06 2017
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 May 3 14:26 EDT 2024. Contains 372215 sequences. (Running on oeis4.)