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!)
A257248 a(1) = 0; and for n > 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)). 4
0, 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 0, 1, 2, 3, 3, 2, 2, 2, 1, 1, 3, 1, 2, 2, 3, 0, 1, 2, 3, 4, 4, 3, 3, 3, 2, 2, 3, 2, 2, 2, 4, 1, 1, 3, 2, 3, 1, 3, 4, 2, 2, 1, 2, 3, 3, 4, 0, 1, 2, 3, 4, 5, 5, 4, 4, 4, 3, 3, 4, 3, 3, 3, 4, 2, 2, 3, 3, 3, 2, 3, 5, 2, 2, 2, 2, 4, 4, 3, 1, 1, 3, 2, 4, 2, 3, 4, 5, 1, 3, 3, 3, 4, 2, 3, 2, 2, 1, 4, 4, 2, 5, 1, 3, 3, 2, 3, 4, 4, 5, 0, 1, 2, 3, 4, 5, 6, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
a(n) tells how many nonzero terms of A005187 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n and before 1 is reached. This count includes both n (in case it is a term of A005187) but excludes the 1 and 0 at the root. See also comments in A257249, A256478 and A256991.
LINKS
FORMULA
a(1) = 0; and for n > 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
a(n) = A080791(A233275(n)). [Number of nonleading zeros in the binary representation of A233275(n).]
Other identities. For all n >= 1:
a(n) = A256478(n)-1 = A000120(A233277(n))-1.
a(n) = A070939(n) - A257249(n).
PROG
(Scheme, alternative definitions, the first one utilizing memoizing definec-macro)
(definec (A257248 n) (if (= 1 n) 0 (+ (A079559 n) (A257248 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
(define (A257248 n) (- (A256478 n) 1))
CROSSREFS
One less than A256478.
Sequence in context: A318191 A208183 A214810 * A090737 A204016 A343334
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 19 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 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)