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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

1, 2, 4, 9, 22, 55, 136, 329, 778, 1803, 4108, 9229, 20494, 45071, 98320, 213009, 458770, 983059, 2097172, 4456469, 9437206, 19922967, 41943064, 88080409, 184549402, 385875995, 805306396, 1677721629, 3489660958, 7247757343, 15032385568, 31138512929, 64424509474
Offset: 0

Views

Author

Alois P. Heinz, Apr 10 2021

Keywords

Comments

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.
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

Crossrefs

Partial differences give A005183 (shifted).

Programs

  • Maple
    a:= n-> (n-2)*2^(n-1)+n+2:
    seq(a(n), n=0..35);

Formula

G.f.: -(x^3-5*x^2+4*x-1)/((2*x-1)^2*(x-1)^2).
Showing 1-1 of 1 results.