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!)
A059126 A hierarchical sequence (W2{2} according to the description in the attached file - see link). 41
1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1, 7, 8, 7, 1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1, 9, 10, 9, 1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1, 7, 8, 7, 1, 2, 1, 3, 4, 3, 1, 2, 1, 5, 6, 5, 1, 2, 1, 3, 4, 3, 1, 2, 1, 11, 12, 11, 1, 2, 1, 3, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(3n+1) = 2*A001511(1+n), a(3n) = a(3n+2) = a(3n+1) - 1. - Antti Karttunen, May 28 2017
MATHEMATICA
Array[IntegerExponent[2 #, 2] /. k_ :> ({# - 1, #, # - 1} &[2 k]) &, 36] // Flatten (* Michael De Vlieger, Nov 02 2018 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A059126 n) (cond ((zero? (modulo n 3)) (- (A059126 (+ 1 n)) 1)) ((= 1 (modulo n 3)) (* 2 (A001511 (/ (+ 2 n) 3)))) (else (- (A059126 (+ -1 n)) 1))))
;; Antti Karttunen, May 28 2017
CROSSREFS
Sequence in context: A281715 A076632 A105646 * A059128 A356248 A050273
KEYWORD
easy,nonn
AUTHOR
Jonas Wallgren, Jan 19 2001
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 March 19 03:33 EDT 2024. Contains 370952 sequences. (Running on oeis4.)