OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
From Gus Wiseman, Sep 24 2019: (Start)
The a(1) = 1 through a(12) = 15 strict integer partitions whose average is an integer (A = 10, B = 11, C = 12):
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A) (B) (C)
(31) (42) (53) (432) (64) (75)
(51) (62) (531) (73) (84)
(321) (71) (621) (82) (93)
(91) (A2)
(B1)
(543)
(642)
(651)
(732)
(741)
(831)
(921)
(5421)
(6321)
(End)
MAPLE
a:= proc(m) option remember; local b; b:=
proc(n, i, t) option remember; `if`(i*(i+1)/2<n,
0, `if`(n=0, `if`(irem(m, t)=0, 1, 0),
b(n, i-1, t)+b(n-i, min(n-i, i-1), t+1)))
end: `if`(isprime(m), 1, b(m$2, 0))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 25 2019
MATHEMATICA
npdp[n_]:=Count[Select[IntegerPartitions[n], Length[#]==Length[ Union[ #]]&], _?(Divisible[n, Length[#]]&)]; Array[npdp, 70] (* Harvey P. Dale, Feb 12 2016 *)
a[m_] := a[m] = Module[{b}, b[n_, i_, t_] := b[n, i, t] = If[i(i+1)/2 < n, 0, If[n == 0, If[Mod[m, t] == 0, 1, 0], b[n, i - 1, t] + b[n - i, Min[n - i, i - 1], t + 1]]]; If[PrimeQ[m], 1, b[m, m, 0]]];
Array[a, 100] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Feb 01 2005
STATUS
approved