login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261982 Number of compositions of n with some part repeated. 8
0, 0, 1, 1, 5, 11, 21, 51, 109, 229, 455, 959, 1947, 3963, 7999, 16033, 32333, 64919, 130221, 260967, 522733, 1045825, 2093855, 4189547, 8382315, 16768455, 33543127, 67093261, 134193413, 268404995, 536829045, 1073686083, 2147408773, 4294869253, 8589803783 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..3322

FORMULA

a(n) = A011782(n) - A032020(n).

G.f.: (1 - x) / (1 - 2*x) - Sum_{k>=0} k! * x^(k*(k + 1)/2) / Product_{j=1..k} (1 - x^j). - Ilya Gutkovskiy, Jan 30 2020

EXAMPLE

a(2) = 1: 11.

a(3) = 1: 111.

a(4) = 5: 22, 211, 121, 112, 1111.

MAPLE

b:= proc(n, k) option remember; `if`(k<0 or n<0, 0,

      `if`(k=0, `if`(n=0, 1, 0), b(n-k, k) +k*b(n-k, k-1)))

    end:

a:= n-> ceil(2^(n-1))-add(b(n, k), k=0..floor((sqrt(8*n+1)-1)/2)):

seq(a(n), n=0..40);

MATHEMATICA

b[n_, k_] := b[n, k] = If[k<0 || n<0, 0, If[k==0, If[n==0, 1, 0], b[n-k, k] + k*b[n-k, k-1]]]; a[n_] := Ceiling[2^(n-1)]-Sum[b[n, k], {k, 0, Floor[ (Sqrt[8n+1]-1)/2]}]; Table[a[n], {n, 0, 40}] (* Jean-Fran├žois Alcover, Feb 08 2017, translated from Maple *)

CROSSREFS

Row sums of A261981 and of A262191.

Cf. A011782, A032020, A047967 (the same for partitions), A262047.

Sequence in context: A131898 A168642 A234597 * A296033 A296968 A184552

Adjacent sequences:  A261979 A261980 A261981 * A261983 A261984 A261985

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Sep 07 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 25 20:58 EDT 2020. Contains 334597 sequences. (Running on oeis4.)