OFFSET
0,3
LINKS
Fausto A. C. Cariboni, Table of n, a(n) for n = 0..300 (terms 0..150 from Joerg Arndt and Alois P. Heinz)
EXAMPLE
The a(8) = 13 such partitions are:
01: [ 1 1 2 4 ]
02: [ 1 1 3 3 ]
03: [ 1 1 6 ]
04: [ 1 2 2 3 ]
05: [ 1 2 5 ]
06: [ 1 3 4 ]
07: [ 1 7 ]
08: [ 2 2 4 ]
09: [ 2 3 3 ]
10: [ 2 6 ]
11: [ 3 5 ]
12: [ 4 4 ]
13: [ 8 ]
Note that the fourth partition has the arithmetic progression 1,2,3, but not in equidistant positions.
MAPLE
b:= proc(n, i, l) local j;
for j from 2 to iquo(nops(l)+1, 2) do
if l[1]-l[j]=l[j]-l[2*j-1] then return 0 fi od;
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1, l)+
`if`(i>n, 0, b(n-i, i, [i, l[]]))))
end:
a:= n-> b(n, n, []):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, i_, l_] := b[n, i, l] = Module[{j}, For[ j = 2 , j <= Quotient[ Length[l] + 1, 2] , j++, If[ l[[1]] - l[[j]] == l[[j]] - l[[2*j - 1]] , Return[0]]]; If[n == 0, 1, If[i < 1, 0, b[n, i - 1, l] + If[i > n, 0, b[n - i, i, Prepend[l, i]]]]]];
a[n_] := b[n, n, {}];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 21 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Joerg Arndt and Alois P. Heinz, Mar 01 2014
STATUS
approved