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!)
A186034 2-adic valuation of the n-th Motzkin number. 2
0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
E. Rowland and R. Yassawi, Automatic congruences for diagonals of rational functions, arXiv preprint arXiv:1310.8635 [math.NT], 2013-2014.
FORMULA
a(n) = log_2(A001006(n)/numerator(A001006(n)/2^n)).
(-1)^a(n) = A186035(n).
a(n) = A007814(A001006(n)). - Antti Karttunen, Aug 12 2017
MAPLE
A186034 := proc(n)
local m, ml ;
m := A001006(n) ;
ml := %/2^n ;
m/numer(ml) ;
ilog2(%) ;
end proc:
seq(A186034(n), n=0..80) ; # R. J. Mathar, Feb 13 2015
MATHEMATICA
IntegerExponent[RecurrenceTable[(n + 4) M[n + 2] - (2 n + 5) M[n + 1] - 3 (n + 1) M[n] == 0 && M[0] == M[1] == 1, M[n], {n, 0, 127}], 2] (* Eric Rowland, May 06 2013 *)
PROG
(Python)
from itertools import count, islice
def A186034_gen(): # generator of terms
a, b = 1, 1
yield from (0, 0)
for n in count(2):
a, b = b, (b*(2*n+1)+a*3*(n-1))//(n+2)
yield (~b&b-1).bit_length()
A186034_list = list(islice(A186034_gen(), 30)) # Chai Wah Wu, Jul 08 2022
CROSSREFS
Sequence in context: A103270 A087780 A082523 * A280843 A221146 A083935
KEYWORD
nonn
AUTHOR
Paul Barry, Feb 11 2011
EXTENSIONS
Definition edited by Eric Rowland, May 06 2013
More terms from Antti Karttunen, Aug 12 2017
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 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)