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.

A343291 a(n) = (n-2)*2^(n-1) + n + 2.

This page as a plain text file.
%I A343291 #22 May 05 2025 16:35:08
%S A343291 1,2,4,9,22,55,136,329,778,1803,4108,9229,20494,45071,98320,213009,
%T A343291 458770,983059,2097172,4456469,9437206,19922967,41943064,88080409,
%U A343291 184549402,385875995,805306396,1677721629,3489660958,7247757343,15032385568,31138512929,64424509474
%N A343291 a(n) = (n-2)*2^(n-1) + n + 2.
%C A343291 a(n) is the cardinality of set s(n), where s(0) = {0} and s(n+1) = s(n) union {(i+j+1)/2 : i,j in s(n)}. s(4) = {0, 1/2, 3/4, 7/8, 15/16, 1, 17/16, 9/8, 19/16, 5/4, 21/16, 11/8, 23/16, 3/2, 25/16, 13/8, 27/16, 7/4, 29/16, 15/8, 31/16, 2} has cardinality a(4) = 22.
%C A343291 Total number of 0-bits in all numbers <= 2^n and for n >= 1 the total number of bits in all numbers <= 2^(n-1); similar to A048495. - _Ruud H.G. van Tol_, Apr 28 2025
%H A343291 Alois P. Heinz, <a href="/A343291/b343291.txt">Table of n, a(n) for n = 0..1000</a>
%H A343291 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6,-13,12,-4).
%F A343291 G.f.: -(x^3-5*x^2+4*x-1)/((2*x-1)^2*(x-1)^2).
%p A343291 a:= n-> (n-2)*2^(n-1)+n+2:
%p A343291 seq(a(n), n=0..35);
%Y A343291 Partial differences give A005183 (shifted).
%Y A343291 Cf. A048495, A343264.
%K A343291 nonn,easy
%O A343291 0,2
%A A343291 _Alois P. Heinz_, Apr 10 2021