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
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
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
Sequence in context: A029394 A357914 A035467 * A024996 A187596 A263863
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 15:00 EDT 2024. Contains 371989 sequences. (Running on oeis4.)