[go: up one dir, main page]

login
A181765
Number of subsets of the interval [-n .. +n] with sums > 0.
5
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,2
COMMENTS
a(n) = A000302(n) - A047653(n) = (A004171(n) - A000980(n)) / 2.
LINKS
Ray Chandler, Table of n, a(n) for n = 0..1660 (terms < 10^1000)
EXAMPLE
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.
PROG
(Haskell)
import Data.List (subsequences)
a181765 n = length [xs | xs <- subsequences [-n..n], sum xs > 0]
-- Reinhard Zumkeller, Feb 22 2012, Nov 13 2010
CROSSREFS
Sequence in context: A212697 A111642 A145766 * A198150 A122676 A038175
KEYWORD
nonn
STATUS
approved