OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
M. Archibald and A. Knopfmacher, The largest missing value in a composition of an integer, Discrete Math., 311 (2011), 723-731.
Alois P. Heinz, Plot of (a(n)-2^(n-2))/2^(n-2) for n = 60..1000
FORMULA
a(n) = 2^(n-1) - A107429(n) ~ 2^(n-2). - Alois P. Heinz, Dec 06 2014
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, t!, 0),
`if`(i<1 or n<i, 0, add(b(n-i*j, i-1, t+j)/j!, j=1..n/i)))
end:
a:= n-> 2^(n-1) -add(b(n, i, 0), i=1..n):
seq(a(n), n=1..40); # Alois P. Heinz, Dec 06 2014
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, t!, 0], If[i<1 || n<i, 0, Sum[ b[n-i*j, i-1, t+j]/j!, {j, 1, n/i}]]]; a[n_] := 2^(n-1)-Sum[b[n, i, 0], {i, 1, n} ]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 04 2011
EXTENSIONS
More terms from Alois P. Heinz, Dec 06 2014
STATUS
approved