cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A090752 Number of compositions (ordered partitions) of n whereby at most 1 increase is allowed and this increase must be by 1.

This page as a plain text file.
%I A090752 #11 Sep 23 2023 07:30:09
%S A090752 1,2,4,7,13,21,36,56,89,134,204,296,435,618,879,1223,1702,2323,3171,
%T A090752 4263,5720,7589,10043,13158,17202,22305,28839,37038,47437,60391,76686,
%U A090752 96872,122047,153081,191513,238625,296620,367379,453948,559112,687107
%N A090752 Number of compositions (ordered partitions) of n whereby at most 1 increase is allowed and this increase must be by 1.
%C A090752 The number of compositions of n in which exactly 1 increase is allowed and this increase must be by 1, is a(n)-A000041(n). - _Vladeta Jovovic_, Feb 09 2004
%e A090752 a(5)=13, as we have 5, 41, 32, 23, 311, 221, 212, 122, 2111, 1211, 1121, 1112 and 11111.
%o A090752 (PARI) Ta = matrix(70, 70, i, j, -1); Tn = Ta;
%o A090752 doAllowed(last, left) = local(c); c = Ta[last, left]; if (c == -1, c = 0; for (i = 1, min(last, left), c += b(i, left - i, 1)); c += b(last + 1, left - last - 1, 0); Ta[last, left] = c); c;
%o A090752 doNot(last, left) = local(c); c = Tn[last, left]; if (c == -1, c = 0; for (i = 1, min(last, left), c += b(i, left - i, 0)); Tn[last, left] = c); c;
%o A090752 b(last, left, allowed) = if (left == 0, return(1)); if (left < 0, return(0)); if (allowed, doAllowed(last, left), doNot(last, left));
%o A090752 a(n) = sum (i = 1, n, b(i, n - i, 1)); \\ _David Wasserman_, Feb 02 2006
%Y A090752 Cf. A034297, A003116, A000041.
%K A090752 nonn
%O A090752 1,2
%A A090752 _Jon Perry_, Feb 06 2004
%E A090752 More terms from _Vladeta Jovovic_, Feb 13 2004
%E A090752 More terms from _David Wasserman_, Feb 02 2006