login
This site is supported by donations 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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..8192

FORMULA

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

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

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

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

Other identities and observations:

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

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

PROG

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

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

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

(define (A254045 n) (A080791 (A064216 n)))

CROSSREFS

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

Sequence in context: A235330 A029394 A035467 * A024996 A187596 A263863

Adjacent sequences:  A254042 A254043 A254044 * A254046 A254047 A254048

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jan 23 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 21 09:14 EST 2019. Contains 329362 sequences. (Running on oeis4.)