login
A266348
a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n).
3
1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 3, 4, 4, 4, 4, 1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15, 16, 16, 16, 17, 18, 19, 19, 20, 21, 21
OFFSET
1,5
COMMENTS
When the terms are arranged as successively larger batches of 2^n, the terms A(n,k), k = 1 .. 2^n, on row n give the cumulative number of 1's encountered since the beginning of the row n of similarly organized irregular table A265754, up to and including the k-th term on that row:
1;
1, 1;
1, 2, 2, 2;
1, 2, 3, 3, 4, 4, 4, 4;
1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8;
...
LINKS
FORMULA
a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n) = A004001(n+1) - 2^(A000523(n)-1).
MATHEMATICA
lim = 100; b[1] = 1; b[2] = 1; b[n_] := b[n] = b[b[n - 1]] + b[n - b[n - 1]]; s = CoefficientList[Series[1/(2 - 2 x) (2 x - x^2 + Sum[ 2^(k - 1) x^2^k, {k, Floor@ Log2@ lim}]), {x, 0, lim}], x]; {1}~Join~Table[b[n + 1] - s[[n + 1]], {n, 2, lim}] (* Michael De Vlieger, Jan 26 2016, after Robert G. Wilson v at A004001 *)
PROG
(Scheme) (define (A266348 n) (if (= 1 n) 1 (- (A004001 (+ 1 n)) (A072376 n))))
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Jan 22 2016
STATUS
approved