OFFSET
1,7
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..96 from R. J. Mathar)
George E. Andrews, 4-Shadows in q-Series and the Kimberling Index, Preprint, May 15, 2016.
FORMULA
G.f.: (1/Product_{k>=1} (1-x^k)) * Sum_{k>=1} (-1)^k * (k-1) * ( x^(k*(3*k-1)/2) + x^(k*(3*k+1)/2) ). (See Andrews' preprint.) - Seiichi Manyama, May 20 2023
EXAMPLE
a(8) = 4 counts these partitions: 7+1, 6+2, 6+1+1, 5+2+1.
MAPLE
isA237833 := proc(p)
if abs(p[1]-p[-1]) > nops(p) then
return 1;
else
return 0;
end if;
end proc:
A237833 := proc(n)
local a, p;
a := 0 ;
p := combinat[firstpart](n) ;
while true do
a := a+isA237833(p) ;
if nops(p) = 1 then
break;
end if;
p := nextpart(p) ;
end do:
return a;
end proc:
seq(A237833(n), n=1..20) ; # R. J. Mathar, Nov 17 2017
MATHEMATICA
z = 60; q[n_] := q[n] = IntegerPartitions[n]; t[p_] := t[p] = Length[p];
Table[Count[q[n], p_ /; Max[p] - Min[p] < t[p]], {n, z}] (* A237830 *)
Table[Count[q[n], p_ /; Max[p] - Min[p] <= t[p]], {n, z}] (* A237831 *)
Table[Count[q[n], p_ /; Max[p] - Min[p] == t[p]], {n, z}] (* A237832 *)
Table[Count[q[n], p_ /; Max[p] - Min[p] > t[p]], {n, z}] (* A237833 *)
Table[Count[q[n], p_ /; Max[p] - Min[p] >= t[p]], {n, z}] (* A237834 *)
PROG
(PARI) my(N=50, x='x+O('x^N)); concat([0, 0, 0, 0], Vec(1/prod(k=1, N, 1-x^k)*sum(k=1, N, (-1)^k*(k-1)*(x^(k*(3*k-1)/2)+x^(k*(3*k+1)/2))))) \\ Seiichi Manyama, May 20 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 16 2014
STATUS
approved