cp's OEIS Frontend

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.

A268235 a(n) = Sum_{k=1..n} floor(n/k)*2^(k-1).

This page as a plain text file.
%I A268235 #34 Jun 28 2024 05:04:43
%S A268235 1,4,9,20,37,76,141,280,541,1072,2097,4192,8289,16548,32953,65860,
%T A268235 131397,262764,524909,1049736,2098381,4196560,8390865,16781696,
%U A268235 33558929,67117460,134226585,268452580,536888037,1073775900,2147517725,4295034280,8590002605,17180002736,34359872001,68719743792
%N A268235 a(n) = Sum_{k=1..n} floor(n/k)*2^(k-1).
%C A268235 This is the "floor transform" of the powers of 2.
%H A268235 Matthew House, <a href="/A268235/b268235.txt">Table of n, a(n) for n = 1..3305</a>
%F A268235 a(n) ~ 2^n. - _Vaclav Kotesovec_, May 28 2021
%F A268235 From _Seiichi Manyama_, May 29 2021: (Start)
%F A268235 a(n) = Sum_{k=1..n} Sum_{d|k} 2^(d-1).
%F A268235 G.f.: (1/(1 - x)) * Sum_{k>=1} x^k/(1 - 2*x^k).
%F A268235 G.f.: (1/(1 - x)) * Sum_{k>=1} 2^(k-1) * x^k/(1 - x^k). (End)
%F A268235 a(n) = Sum_{k=1..n} (2^floor(n/k) - 1). - _Ridouane Oudra_, Feb 03 2023
%p A268235 # floor transform of a sequence
%p A268235 ft:=proc(a) local b,n,j,k; b:=[];
%p A268235 for n from 1 to nops(a) do j:=add(a[k]*floor(n/k),k=1..n); b:=[op(b),j]; od;
%p A268235 b; end:
%p A268235 ft([seq(2^i,i=0..50)]);
%t A268235 Table[Sum[Floor[n/k] 2^(k - 1), {k, n}], {n, 36}] (* _Michael De Vlieger_, Feb 12 2017 *)
%o A268235 (PARI) a(n) = sum(k=1, n, (n\k)*2^(k-1)); \\ _Michel Marcus_, Feb 11 2017
%o A268235 (PARI) a(n) = sum(k=1, n, sumdiv(k, d, 2^(d-1))); \\ _Seiichi Manyama_, May 29 2021
%o A268235 (PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-2*x^k))/(1-x)) \\ _Seiichi Manyama_, May 29 2021
%o A268235 (PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, 2^(k-1)*x^k/(1-x^k))/(1-x)) \\ _Seiichi Manyama_, May 29 2021
%o A268235 (Magma)
%o A268235 A268235:= func< n | (&+[Floor(n/j)*2^(j-1): j in [1..n]]) >;
%o A268235 [A268235(n): n in [1..40]]; // _G. C. Greubel_, Jun 27 2024
%o A268235 (SageMath)
%o A268235 def A268235(n): return sum((n//j)*2^(j-1) for j in range(1,n+1))
%o A268235 [A268235(n) for n in range(1,41)] # _G. C. Greubel_, Jun 27 2024
%Y A268235 First differences give A034729.
%Y A268235 Cf. A000079.
%Y A268235 Sums of the form Sum_{k=1..n} q^(k-1)*floor(n/k): A344820 (q=-n), A344819 (q=-4), A344818 (q=-3), A344817 (q=-2), A059851 (q=-1), A006218 (q=1), this sequence (q=2), A344814 (q=3), A344815 (q=4), A344816 (q=5), A332533 (q=n).
%K A268235 nonn
%O A268235 1,2
%A A268235 _Benoit Cloitre_ and _N. J. A. Sloane_, Feb 05 2016
%E A268235 Definition corrected by _Matthew House_, Feb 11 2017