login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A317442
a(1) = a(2) = 1; for n >= 3, a(n) = a(t(n)) + a(n-t(n)) where t = A000195.
1
1, 1, 2, 3, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 32, 32, 33, 34, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 42, 43, 43, 44, 45, 46, 46, 47, 48, 49, 49, 50, 51, 52
OFFSET
1,3
COMMENTS
This sequence hits every positive integer.
FORMULA
a(n+1) - a(n) = 0 or 1 for all n >= 1.
MATHEMATICA
Nest[Function[{a, n}, Append[a, a[[Floor@ Log@ n]] + a[[n - Floor@ Log@ n]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, 74] (* Michael De Vlieger, Jul 30 2018 *)
PROG
(PARI) q=vector(100); for(n=1, 2, q[n]=1); for(n=3, #q, q[n]=q[floor(log(n))] + q[n-floor(log(n))]); q
CROSSREFS
Sequence in context: A327706 A121856 A332061 * A132172 A080680 A005376
KEYWORD
nonn
AUTHOR
Altug Alkan, Jul 28 2018
STATUS
approved