OFFSET
1,4
COMMENTS
LINKS
Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=3, we see that for i=1 and 2, a(i)+i = 1 and 3, of which only 1 is < n=3, so that a(3)=1.
For n=5, i=1..4 have a(i)+i = 1,3,4,7 and the largest < n=5 is 4 so that a(5)=4.
PROG
(PARI) lista(nn) = my(va = vector(nn)); va[1] = 0; for (n=2, nn, va[n] = vecmax(select(x->(x<n), vector(n-1, i, va[i]+i))); ); va; \\ Michel Marcus, Jan 31 2023
(PARI) { my (v = 0, m = 0); for (n = 1, 79, if (bittest(m, n-1), v = n-1); print1 (v", "); m = bitor(m, 2^(v+n))) } \\ Rémy Sigrist, Feb 08 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Jan 13 2023
STATUS
approved