login
a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n).
3

%I #12 Jan 30 2016 03:08:48

%S 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,

%T 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,

%U 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

%N a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n).

%C 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:

%C 1;

%C 1, 1;

%C 1, 2, 2, 2;

%C 1, 2, 3, 3, 4, 4, 4, 4;

%C 1, 2, 3, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8;

%C ...

%H Antti Karttunen, <a href="/A266348/b266348.txt">Table of n, a(n) for n = 1..8191</a>

%F a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n) = A004001(n+1) - 2^(A000523(n)-1).

%t 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 *)

%o (Scheme) (define (A266348 n) (if (= 1 n) 1 (- (A004001 (+ 1 n)) (A072376 n))))

%Y Cf. A000523, A004001, A072376, A265754.

%K nonn,tabf

%O 1,5

%A _Antti Karttunen_, Jan 22 2016