login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334125 Number of subsets of {1, 3, ..., 2*n-1} which sum to 0 modulo 2*n-1. 1
2, 2, 2, 2, 4, 6, 10, 18, 30, 54, 98, 178, 328, 608, 1130, 2114, 3974, 7490, 14170, 26890, 51150, 97542, 186420, 356962, 684784, 1315870, 2532410, 4880646, 9418806, 18199014, 35204650, 68174116, 132152842, 256415958, 497967282, 967879954, 1882725390, 3665038872 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
If 2*k - 1 is a prime, then a(k) = (2^k - 2*(-1)^floor(k/2))/(2*k - 1).
Conjecture: a(n) = 2*abs(A178738(n)).
EXAMPLE
a(5) = 4 because there are 4 subsets of {1, 3, 5, 7, 9} which sum to 0 modulo 9: {}, {9}, {1, 3, 5}, {1, 3, 5, 9}.
MAPLE
f:= proc(n) local V, k;
V:= Vector(2*n-1);
V[2*n-1]:= 1;
for k from 1 to 2*n-1 by 2 do
V:= V + V[[$(k+1)..(2*n-1), $1..k]]
od;
V[2*n-1]
end proc:
map(f, [$1..40]); # Robert Israel, May 12 2020
PROG
(PARI) a(n) = {my(v=Vec(prod(i=1, n, x^(2*i-1)+1))); sum(i=0, n^2\(2*n-1), v[n^2+1-i*(2*n-1)]); }
CROSSREFS
Sequence in context: A032600 A103260 A060824 * A364811 A244459 A064849
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Apr 30 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 10:00 EDT 2024. Contains 371935 sequences. (Running on oeis4.)