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!)
A064381 Number of subsets of {2,...,n} such that the product of their elements is congruent to 0 (mod n+1). 1
0, 0, 0, 6, 0, 24, 32, 120, 0, 792, 0, 2016, 5760, 13056, 0, 55136, 0, 226944, 387072, 523776, 0, 4112000, 5767168, 8386560, 30408704, 58669056, 0, 259541376, 0, 1062731776, 1609039872, 2147450880, 7927234560, 17103136768, 0, 34359607296, 103054049280 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,4
COMMENTS
a(n-1) = 0 for prime n.
LINKS
EXAMPLE
a(5) = 6 because there are 6 subsets of {2,3,4,5} such that the product of their elements is congruent to 0 (mod 6): {3,4,5}, {2,3,4,5}, {3,4}, {2,3}, {2,3,4}, {2,3,5}.
MAPLE
a:= proc(n) option remember; local m, b; m, b:= n+1,
proc(n, p) option remember; `if`(p=0, 2^(n-1),
`if`(n<2, 0, b(n-1, p)+b(n-1, p*n mod m)))
end: forget(b): b(n, 1)
end:
seq(a(n), n=2..50); # Alois P. Heinz, May 26 2013, revised Apr 25 2022
MATHEMATICA
b[n_, p_, m_] := b[n, p, m] = If[p == 0, 2^(n-1),
If[n < 2, 0, b[n-1, p, m] + b[n-1, Mod[p*n , m], m]]];
a[n_] := b[n, 1, n+1];
Table[a[n], {n, 2, 50}] (* Jean-François Alcover, Apr 25 2022, after Alois P. Heinz *)
CROSSREFS
Cf. A000048.
Sequence in context: A082731 A272673 A167357 * A062254 A028849 A287470
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Sep 27 2001
EXTENSIONS
More terms from Naohiro Nomoto, Oct 01 2001
Extended beyond a(24) by Alois P. Heinz, May 26 2013
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 17 22:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)