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

%I #20 Apr 25 2022 09:58:04

%S 0,0,0,6,0,24,32,120,0,792,0,2016,5760,13056,0,55136,0,226944,387072,

%T 523776,0,4112000,5767168,8386560,30408704,58669056,0,259541376,0,

%U 1062731776,1609039872,2147450880,7927234560,17103136768,0,34359607296,103054049280

%N Number of subsets of {2,...,n} such that the product of their elements is congruent to 0 (mod n+1).

%C a(n-1) = 0 for prime n.

%H Alois P. Heinz, <a href="/A064381/b064381.txt">Table of n, a(n) for n = 2..1000</a>

%e 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}.

%p a:= proc(n) option remember; local m, b; m, b:= n+1,

%p proc(n, p) option remember; `if`(p=0, 2^(n-1),

%p `if`(n<2, 0, b(n-1, p)+b(n-1, p*n mod m)))

%p end: forget(b): b(n, 1)

%p end:

%p seq(a(n), n=2..50); # _Alois P. Heinz_, May 26 2013, revised Apr 25 2022

%t b[n_, p_, m_] := b[n, p, m] = If[p == 0, 2^(n-1),

%t If[n < 2, 0, b[n-1, p, m] + b[n-1, Mod[p*n , m], m]]];

%t a[n_] := b[n, 1, n+1];

%t Table[a[n], {n, 2, 50}] (* _Jean-François Alcover_, Apr 25 2022, after _Alois P. Heinz_ *)

%Y Cf. A000048.

%K nonn

%O 2,4

%A _Vladeta Jovovic_, Sep 27 2001

%E More terms from _Naohiro Nomoto_, Oct 01 2001

%E Extended beyond a(24) by _Alois P. Heinz_, May 26 2013

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 30 20:43 EDT 2024. Contains 372141 sequences. (Running on oeis4.)