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.

A181765 Number of subsets of the interval [-n .. +n] with sums > 0.

Original entry on oeis.org

0, 2, 12, 54, 230, 948, 3860, 15624, 63014, 253588, 1019072, 4091174, 16412668, 65808044, 263755984, 1056789662, 4233176854, 16953418148, 67885557896, 271793651816, 1088059997732, 4355377285932, 17432688395816, 69770793302408, 279227252601884
Offset: 0

Views

Author

Keywords

Comments

a(n) = A000302(n) - A047653(n) = (A004171(n) - A000980(n)) / 2.

Examples

			a(1) = #{{0,1}, {1}} = 2;
a(2) = #{{-2,0,1,2}, {-2,1,2}, {-1,0,1,2}, {-1,0,2}, {-1,1,2}, {-1,2}, {0,1}, {0,1,2}, {0,2}, {1}, {1,2}, {2}} = 12.
		

Programs

  • Haskell
    import Data.List (subsequences)
    a181765 n = length [xs | xs <- subsequences [-n..n], sum xs > 0]
    -- Reinhard Zumkeller, Feb 22 2012, Nov 13 2010