login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of compositions a(1),...,a(k) of n, for some k, such that a(i+1) <= a(i) + 1 for 1 <= i < k and a(1) <= a(k) + 1.
2

%I #27 Dec 14 2024 05:26:39

%S 1,2,4,6,11,18,31,52,91,155,268,464,802,1390,2411,4178,7249,12578,

%T 21823,37870,65724,114061,197960,343578,596317,1034983,1796359,

%U 3117837,5411478,9392460,16302081,28294850,49110242,85238716,147945552,256783448,445689300

%N Number of compositions a(1),...,a(k) of n, for some k, such that a(i+1) <= a(i) + 1 for 1 <= i < k and a(1) <= a(k) + 1.

%D Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 381.

%H Alois P. Heinz, <a href="/A168445/b168445.txt">Table of n, a(n) for n = 1..400</a>

%F a(n) ~ c / r^n, where r = A347901 = 0.576148769142756602297868573719938782354724663118974... is the lowest root of the equation Sum_{k>=0} (-1)^k * r^(k^2) / QPochhammer(r, r, k) = 0 and c = 0.6149126319329581124890112676009720339906790088212712130894... - _Vaclav Kotesovec_, May 01 2014, updated Sep 09 2020

%p b:= proc(n,r,f) option remember; `if`(n=0, `if`(f-1<=r, 1, 0),

%p add(b(n-i, i, f), i=1..min(r+1, n)))

%p end:

%p a:= n-> add(b(n-i, i, i), i=1..n):

%p seq(a(n), n=1..40); # _Alois P. Heinz_, Dec 15 2009

%t b[n_, r_, f_] := b[n, r, f] = If[n == 0, If[f - 1 <= r, 1, 0], Sum[b[n - i, i, f], {i, 1, Min [r + 1, n]}]];

%t a[n_] := Sum[b[n - i, i, i], {i, 1, n}];

%t Array[a, 40] (* _Jean-François Alcover_, Nov 10 2020, after _Alois P. Heinz_ *)

%Y Cf. A003116, A005169.

%K nonn

%O 1,2

%A _Vladeta Jovovic_, Nov 25 2009

%E More terms from _Alois P. Heinz_, Dec 15 2009