login
a(n) = A000120(A267111(n)).
5

%I #7 Jan 17 2016 20:26:07

%S 1,1,2,1,2,3,2,1,2,3,4,2,3,3,2,1,2,3,4,5,2,3,4,3,4,4,2,3,3,3,2,1,2,3,

%T 4,5,6,2,3,4,5,3,4,5,4,5,5,2,3,4,3,4,4,3,4,4,4,2,3,3,3,3,2,1,2,3,4,5,

%U 6,7,2,3,4,5,6,3,4,5,6,4,5,6,5,6,6,2,3,4,5,3,4,5,4,5,5,3,4,5,4,5,5,4,5,5,5,2,3,4,3,4,4,3,4,4,4,3,4,4,4,4

%N a(n) = A000120(A267111(n)).

%H Antti Karttunen, <a href="/A267108/b267108.txt">Table of n, a(n) for n = 1..8192</a>

%F a(1) = 1; for n > 1, if A265332(n) = 1 [when n is one of the terms of A088359], a(n) = 1 + a(A004001(n)-1), otherwise a(n) = a(n-A004001(n)).

%F a(n) = A000120(A267111(n)).

%F Other identities. For all n >= 1:

%F a(n) = A070939(n) - A267109(n).

%o (Scheme, with memoization-macro definec)

%o (definec (A267108 n) (cond ((<= n 1) n) ((= 1 (A265332 n)) (+ 1 (A267108 (- (A004001 n) 1)))) (else (A267108 (- n (A004001 n))))))

%Y Cf. A000120, A004001, A070939, A088359, A265332, A267109, A267110, A267111.

%K nonn

%O 1,3

%A _Antti Karttunen_, Jan 16 2016