This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A130252 #18 Apr 17 2025 23:20:41 %S A130252 0,1,4,7,11,15,20,25,30,35,40,45,51,57,63,69,75,81,87,93,99,105,112, %T A130252 119,126,133,140,147,154,161,168,175,182,189,196,203,210,217,224,231, %U A130252 238,245,252,259,267,275,283,291,299,307,315,323,331,339,347,355,363,371 %N A130252 Partial sums of A130250. %C A130252 If the initial zero is omitted, partial sums of A130253. %H A130252 G. C. Greubel, <a href="/A130252/b130252.txt">Table of n, a(n) for n = 0..5000</a> %F A130252 a(n) = Sum_{k=0..n} A130250(k). %F A130252 a(n) = n*ceiling(log_2(3n-1)) - (1/2)*( A001045(ceiling(log_2(3n-1)) +1) - 1 ). %F A130252 G.f.: (1/(1-x)^2)*Sum_{k>=0} x^A001045(k). %t A130252 A001045[n_]:= (2^n - (-1)^n)/3; %t A130252 A130252[n_]:= If[n==0, 0, (2*n*Ceiling[Log[2,3*n-1]] - A001045[Ceiling[Log[2,3*n-1]]+1] +1)/2]; %t A130252 Table[A130252[n], {n,0,70}] (* _G. C. Greubel_, Mar 18 2023 *) %o A130252 (Magma) %o A130252 A001045:= func< n | (2^n - (-1)^n)/3 >; %o A130252 A130252:= func< n | n eq 0 select 0 else (2*n*Ceiling(Log(2, 3*n-1)) - A001045(Ceiling(Log(2,3*n-1)) +1) +1)/2 >; %o A130252 [A130252(n): n in [0..70]]; // _G. C. Greubel_, Mar 18 2023 %o A130252 (SageMath) %o A130252 def A001045(n): return (2^n - (-1)^n)/3 %o A130252 def A130252(n): return 0 if (n==0) else (2*n*ceil(log(3*n-1,2)) - A001045(ceil(log(3*n-1,2)) +1) +1)/2 %o A130252 [A130252(n) for n in range(71)] # _G. C. Greubel_, Mar 18 2023 %o A130252 (Python) %o A130252 def A130252(n): return n*(m:=(3*n-1).bit_length())-(((1<<m+1)|1)//3-1>>1) # _Chai Wah Wu_, Apr 17 2025 %Y A130252 Cf. A130249, A130251, A130253, A130252, A130234, A130236, A130242, A130244. %Y A130252 Cf. A001045, A105348. %K A130252 nonn %O A130252 0,3 %A A130252 _Hieronymus Fischer_, May 20 2007