login
a(0)=0, for n >= 1, a(2n) = a(n)+1, a(4n-1) = a(n)+1, a(4n+1) = a(n)+1.
4

%I #11 Oct 30 2016 13:42:40

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

%T 5,4,5,4,4,4,5,4,4,4,5,4,5,5,6,5,5,4,5,4,5,5,6,5,5,5,6,5,6,6,7,6,6,5,

%U 6,5,5,5,6,5,5,4,5,4,5,5,6,5,5,4,5,4,5,5,6,5,5,5,6,5,6,6,7,6,6,5,6,5,5,5,6,5,5,5,6,5,6,6,7,6,6,5,6,5,6,6,7

%N a(0)=0, for n >= 1, a(2n) = a(n)+1, a(4n-1) = a(n)+1, a(4n+1) = a(n)+1.

%C a(n) gives the index of the greatest prime dividing A260443(n).

%C Each n >= 1 occurs for the first time at 2^(n-1), which are also the positions of records.

%C For n >= 1, a(n) = number of terms in row n of A125184.

%F a(0)=0, for n >= 1, a(2n) = a(n)+1, a(4n-1) = a(n)+1, a(4n+1) = a(n)+1.

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

%F a(n) = A061395(A260443(n)).

%F a(2n+1) = max(a(n),a(n+1)).

%F For n >= 1, a(n) = 1+A057526(n).

%o (Scheme)

%o (define (A277329 n) (if (zero? n) n (+ 1 (A057526 n)))) ;; Code for A057526 given in that entry.

%o ;; Standalone recurrence:

%o (definec (A277329 n) (cond ((zero? n) n) ((even? n) (+ 1 (A277329 (/ n 2)))) ((= 3 (modulo n 4)) (+ 1 (A277329 (/ (+ 1 n) 4)))) (else (+ 1 (A277329 (/ (+ -1 n) 4))))))

%Y One more than A057526.

%Y Cf. A061395, A125184, A260443.

%K nonn

%O 0,3

%A _Antti Karttunen_, Oct 27 2016