This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A238462 2-adic valuation of A052129. 4

%I

%S 0,0,1,2,6,12,25,50,103,206,413,826,1654,3308,6617,13234,26472,52944,

%T 105889,211778,423558,847116,1694233,3388466,6776935,13553870,

%U 27107741,54215482,108430966,216861932,433723865,867447730

%H Kenny Lau, <a href="/A238462/b238462.txt">Table of n, a(n) for n = 0..3323</a>

%F From _Ridouane Oudra_, Sep 03 2019: (Start)

%F a(n) = Sum_{i=1..n} 2^(n-i)*v_2(i), where v_2(i) = A007814(i).

%F More generally, the p-adic valuation of A052129 for any prime p is given by

%F v_p(A052129(n)) = Sum_{i=1..n} 2^(n-i)*v_p(i), where v_p(i) is the exponent of the highest power of p dividing i. (End)

%p with(padic): seq(add(2^(n-i)*ordp(i, 2), i=1..n), n=0..60); # _Ridouane Oudra_, Sep 03 2019

%t Map[IntegerExponent[#, 2] &, Nest[Append[#, Length[#]*#[[-1]]^2] &, {1}, 31]] (* or, per first formula, more efficiently, *)

%t Array[Sum[2^(# - i)*IntegerExponent[i, 2], {i, #}] &, 32, 0] (* _Michael De Vlieger_, Sep 29 2019 *)

%o (PARI)

%o A052129(n) = if( n<1, n==0, prod(k=0, n-1, (n - k)^2^k));

%o a(n) = valuation(A052129(n),2);

%o (Python)

%o n=4000; val=[0]*(n+1); exp=2

%o while exp <= n:

%o ....for j in range(exp,n+1,exp): val[j] += 1

%o ....exp *= 2

%o res = 0; i = 0

%o while len(str(res)) <= 1000: print(i,res); i += 1; res = res * 2 + val[i]

%o # _Kenny Lau_, Jun 09 2018

%K nonn

%O 0,4

%A _Joerg Arndt_, Feb 27 2014

%E Incorrect comment removed by _Michel Marcus_, Oct 06 2019

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.

Last modified December 7 18:12 EST 2019. Contains 329847 sequences. (Running on oeis4.)