Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #30 Jan 22 2022 23:44:59
%S 1,1,2,1,1,2,3,1,1,1,2,1,2,3,4,1,1,1,1,2,1,1,2,1,2,3,1,2,3,4,5,1,1,1,
%T 1,1,2,1,1,1,2,1,1,2,1,2,3,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,6,1,1,1,1,1,
%U 1,2,1,1,1,1,2,1,1,1,2,1,1,2,1,2,3,1,1,1,2,1,1,2,1,2,3,1,1,2,1,2,3,1,2,3,4,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5
%N Reduced frequency counts for A004001: a(n) = A265332(n+1) - A036987(n).
%C Can be generated recursively by first setting R_1 = (1), after which each R_n is obtained by replacing in R_{n-1} each term k with terms 1 .. k, followed by final n. This sequence is then obtained by concatenating all levels R_1, R_2, ..., R_inf together. See page 230 in Kubo-Vakil paper (page 6 in PDF).
%C Deleting all 1's and decrementing the remaining terms by one gives the sequence back.
%C Comment from _N. J. A. Sloane_, Nov 05 2017: (Start)
%C The following simple Pascal-like triangle produces the same sequence. Construct a triangle T(n,k) of strings (with 0 <= k <= n), where T(0,0) = {1}, T(n,n) = {n+1}, and otherwise T(n,k) is the concatenation of T(n-1,k-1) and T(n-1,k). The first few rows of the triangle (where the strings T(n,k) are shown without spaces for legibility) are:
%C 1
%C 1,2
%C 1,12,3
%C 1,112,123,4
%C 1,1112,112123,1234,5
%C 1,11112,1112112123,1121231234,12345,6
%C ...
%C Now read the strings across the rows to get the sequence. T(n,k) has length binomial(n,k). (End)
%H Antti Karttunen, <a href="/A265754/b265754.txt">Table of n, a(n) for n = 1..8191</a>
%H T. Kubo and R. Vakil, <a href="http://dx.doi.org/10.1016/0012-365X(94)00303-Z">On Conway's recursive sequence</a>, Discr. Math. 152 (1996), 225-252.
%F a(n) = A265332(n+1) - A036987(n).
%F As a recurrence: If A036987(n) = 1 [when n is of the form 2^k -1], a(n) = A070939(n), else if a(n+1) = 1, a(n) = a(2^A000523(n) - A266349(n)), otherwise a(n) = a(n+1)-1.
%F Other identities. For all n >= 1:
%F a(n) = A266640(A054429(n)).
%F a(A000225(n)) = n.
%e Illustration of the sequence as a tree:
%e 1
%e / \
%e 1 2
%e / /|\
%e 1 1 2 3_________
%e / / /| | \ \ \
%e 1 1 1 2 1 2 3__ 4________
%e / / / /| | / \ |\ \ \ \ \ \ \
%e 1 1 1 1 2 1 1 2 1 2 3 1 2 3 4 5
%e etc.
%e Compare with the illustration in A265332.
%o (Scheme, two variants)
%o (define (A265754 n) (- (A265332 (+ 1 n)) (A036987 n)))
%o (definec (A265754 n) (cond ((= 1 (A036987 n)) (A070939 n)) ((> (A265754 (+ 1 n)) 1) (- (A265754 (+ 1 n)) 1)) (else (A265754 (- (A000079 (A000523 n)) (A266349 n))))))
%Y Cf. A004001, A036987, A054429, A070939, A265332, A266348, A266349.
%Y Cf. A000225 (positions of records, where n appears first time).
%Y Cf. A266640 (obtained from the mirror image of the same tree).
%Y See A293959 for another version.
%K nonn
%O 1,3
%A _Antti Karttunen_, Jan 10 2016