login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254045 a(1) = 0, for n > 1: a(n) = a(A253889(n)) + floor((n modulo 3)/2). 6

%I #11 Jan 26 2015 08:23:44

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

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

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

%N a(1) = 0, for n > 1: a(n) = a(A253889(n)) + floor((n modulo 3)/2).

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

%F a(1) = 0, for n > 1: a(n) = a(A253889(n)) + floor((n modulo 3)/2).

%F a(1) = 0, thereafter, if n = 3k+2, then a(3k+2) = 1 + a(k+1), otherwise a(n) = a(A253889(n)).

%F a(n) = A080791(A064216(n)). [Number of nonleading zeros in binary representation of terms of A064216.]

%F a(n) = A253894(n) - A254044(n).

%F Other identities and observations:

%F a(A007051(n)) = n for all n >= 0.

%F a(n) >= A253786(n) for all n >= 1.

%o (Scheme, three versions, first two using memoizing definec-macro)

%o (definec (A254045 n) (if (= 1 n) 0 (+ (A254045 (A253889 n)) (floor->exact (/ (modulo n 3) 2)))))

%o (definec (A254045 n) (cond ((= 1 n) 0) ((= 2 (modulo n 3)) (+ 1 (A254045 (/ (+ 1 n) 3)))) (else (A254045 (A253889 n)))))

%o (define (A254045 n) (A080791 (A064216 n)))

%Y Cf. A007051, A064216, A080791, A253786, A253889, A253894, A254044.

%K nonn

%O 1,5

%A _Antti Karttunen_, Jan 23 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)