The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A237666 Number of partitions of n that include a pair of consecutive integers. 3
0, 0, 0, 1, 1, 3, 3, 7, 9, 15, 20, 32, 40, 61, 78, 112, 142, 199, 250, 341, 428, 568, 710, 930, 1151, 1486, 1835, 2334, 2868, 3615, 4413, 5513, 6706, 8298, 10052, 12359, 14895, 18195, 21857, 26526, 31747, 38337, 45702, 54923, 65272, 78062, 92481, 110168, 130089 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
FORMULA
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). - Vaclav Kotesovec, Jan 28 2022
Conjecture: for n > 0, a(n) = A000041(n) - A116931(n). - Vaclav Kotesovec, Jan 28 2022
EXAMPLE
The qualifying partitions of 8 are 521, 431, 332, 421, 3221, 32111, 22211, 221111, 2111111, so that a(8) = 9.
MAPLE
g:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i<1, 0, add(g(n-i*j, i-1), j=0..n/i)))
end:
b:= proc(n, i, l) option remember; `if`(n=0 or i<1, 0,
b(n, i-1, 0) +add(`if`(i+1=l, g(n-i*j, i-1),
b(n-i*j, i-1, i)), j=1..n/i))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..60); # Alois P. Heinz, Feb 14 2014
MATHEMATICA
Map[Length[Cases[Map[Differences[DeleteDuplicates[#]] &, IntegerPartitions[#]], {___, -1, ___}]] &, Range[50]] (* Peter J. C. Moses, Feb 09 2014 *)
g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Sum[g[n-i*j, i-1], {j, 0, n/i}]]]; b[n_, i_, l_] := b[n, i, l] = If[n==0 || i<1, 0, b[n, i-1, 0] + Sum[If[i+1 == l, g[n-i*j, i-1], b[n-i*j, i-1, i]], {j, 1, n/i}]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 01 2016, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A331788 A206433 A301589 * A285187 A034411 A258289
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 11 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 02:15 EDT 2024. Contains 372497 sequences. (Running on oeis4.)