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!)
A289249 Number of compositions of n if only the order of parts 1 and 2 matters. 0
1, 1, 2, 4, 7, 12, 21, 35, 59, 98, 162, 266, 437, 713, 1163, 1893, 3077, 4995, 8105, 13139, 21293, 34492, 55858, 90438, 146406, 236974, 383538, 620703, 1004471, 1625447, 2630249, 4256087, 6886804, 11143447, 18030911, 29175137, 47206975, 76383199, 123591458 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
If only the order of parts 1 and 2 matters, then the remaining parts can be frozen "[]" in a partition subsequence; e.g., a(15) would count the sequence 5,4,3,2,1 twice: [5,4,3]2,1 and [5,4,3]1,2. (Also see example.)
LINKS
FORMULA
a(n) = A000041(n) + A275388(n-2), the sum of the n-th partition number and the (n-2)th convolution of partition numbers with Fibonacci numbers. E.g., a(8) = 59 = A000041(8) + A275388(6) = 22 + 37 = 59.
a(n) = A275388(n+1) - A275388(n) - A275388(n-1) + A275388(n-2).
G.f.: (1/x)*(1-x)*(1-x^2)*(g.f. of A275388) =(1/x)*(1-x)*(1-x^2)*Sum_{k=1..n} A000045(k)*A000041(n-k).
EXAMPLE
For n=6, the 21 sequences counted are [6]; [5],1; [4],2; [3,3], [4],1,1; [3],2,1; [3],1,2; 2,2,2; [3],1,1,1; 2,2,1,1; 2,1,2,1; 1,2,2,1; 1,2,1,2; 1,1,2,2; 2,1,1,2; 2,1,1,1,1; 1,2,1,1,1; 1,1,2,1,1; 1,1,1,2,1; 1,1,1,1,2; and 1,1,1,1,1,1.
MATHEMATICA
Table[PartitionsP[n] + Sum[Fibonacci[k] PartitionsP[n - 2 - k], {k, n - 2}], {n, 0, 50}] (* Indranil Ghosh, Jun 29 2017 *)
PROG
(PARI) a275388(n)=sum(k=1, n, fibonacci(k)*numbpart(n - k));
a(n)=numbpart(n)+a275388(n - 2); \\ Indranil Ghosh, Jun 29 2017
(Python)
from sympy import fibonacci, npartitions
def a(n): return npartitions(n) + sum([fibonacci(k)*npartitions(n - 2 - k) for k in range(1, n - 1)])
print([a(n) for n in range(51)]) # Indranil Ghosh, Jun 29 2017
CROSSREFS
Sequence in context: A301762 A003293 A192759 * A094974 A306306 A357947
KEYWORD
nonn
AUTHOR
Gregory L. Simay, Jun 29 2017
EXTENSIONS
More terms from Indranil Ghosh, Jun 29 2017
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 June 3 20:36 EDT 2024. Contains 373088 sequences. (Running on oeis4.)