login
A335855
a(n) = a(a(n-1)) + a(floor(n/a(n-1))) with a(1) = a(2) = a(3) = a(4) = 2.
1
2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
OFFSET
1,1
MATHEMATICA
a[1] = a[2] = a[3] = a[4] = 2; a[n_] := a[n] = a[a[n-1]] + a[Floor[n / a[n-1]]]; Array[a, 100] (* Amiram Eldar, Jun 27 2020 *)
PROG
(PARI) a=vector(10^2); a[1]=a[2]=a[3]=a[4]=2; for(n=5, #a, a[n]=a[n\a[n-1]]+a[a[n-1]]); a
CROSSREFS
Sequence in context: A157901 A350697 A327441 * A297824 A281796 A072376
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jun 27 2020
STATUS
approved