OFFSET
1,3
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Sadek Bourbaki and Nevrine Benyahia Tani, Integer partitions into arithmetic progressions, Rostok. Math. Kolloq. 64 (2009), 11-16.
Sadek Bouroubi and Nesrine Benyahia Tani, Integer partitions into arithmetic progressions with an odd common difference, Integers 9(1) (2009), 77-81.
Graeme McRae, Counting arithmetic sequences whose sum is n.
Graeme McRae, Counting arithmetic sequences whose sum is n [Cached copy]
Augustine O. Munagi, Combinatorics of integer partitions in arithmetic progression, Integers 10(1) (2010), 73-82.
Augustine O. Munagi and Temba Shonhiwa, On the partitions of a number into arithmetic progressions, Journal of Integer Sequences 11 (2008), Article 08.5.4.
Wikipedia, Arithmetic progression.
FORMULA
From Petros Hadjicostas, Sep 29 2019: (Start)
G.f.: Sum_{k>=2} x^k/(1-x^(k*(k-1)/2))/(1-x^k). [Leroy Quet from A049988]
(End)
EXAMPLE
a(6) counts these 6 partitions of 6: [5,1], [4,2], [3,3], [3,2,1], [2,2,2], [1,1,1,1,1,1].
MATHEMATICA
(* Program 1 *)
Map[Length[Map[#[[2]] &, Select[Map[{Apply[SameQ, Differences[#]], #} &,
IntegerPartitions[#]], #[[1]] &]]] &, Range[40]] - 1
(* Peter J. C. Moses, Dec 24 2016 *)
(* Program 2 *)
enumerateArithmeticPartitions[n_] := Module[{allDivs, oddDivs},
{allDivs, oddDivs} = {#, Select[#, OddQ]} &[Divisors[n]]; Map[Reverse, Union[Flatten[Table[If[OddQ[cDiff], (Flatten[
Map[{If[(2 n - #) cDiff <= # (# - 2), {Table[(cDiff + # - 2 cDiff n/#)/2 +
cDiff term, {term, 0, 2 n/# - 1}]}, {}], If[# (# - 1) cDiff <= 2 (n - #),
{Table[(cDiff + 2 n/# - # cDiff)/2 + cDiff term, {term, 0, # - 1}]},
{}]} &, oddDivs], 2]), (Flatten[Map[If[(n - #) cDiff <= 2 # (# - 1),
{Table[(cDiff + 2 # - n cDiff/#)/2 + cDiff term, {term, 0, n/# - 1}]}, {}] &,
allDivs], 1])], {cDiff, 0, n - 2}], 1]]]];
Join[{0}, Map[Length[enumerateArithmeticPartitions[#]] - 1 &, Range[2, 300]]]
n = 12; enumerateArithmeticPartitions[12] (* shows the desired partition of n *)
(* Peter J. C. Moses, Dec 24 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved