A266348 a(1) = 1; for n > 1, a(n) = A004001(n+1) - A072376(n).
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
Links
- Antti Karttunen, Table of n, a(n) for n = 1..8191
Programs
-
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 *)
-
Scheme
(define (A266348 n) (if (= 1 n) 1 (- (A004001 (+ 1 n)) (A072376 n))))
Comments