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.

A224957 Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) <= 2*p(j-1) and p(j-1) <= 2*p(j).

This page as a plain text file.
%I A224957 #26 May 24 2021 16:05:00
%S A224957 1,1,2,4,6,11,19,31,54,92,154,266,454,771,1319,2249,3834,6550,11176,
%T A224957 19069,32558,55567,94838,161891,276325,471659,805102,1374234,2345724,
%U A224957 4004031,6834605,11666260,19913668,33991462,58021534,99039592,169055094,288567886,492569833,840790082
%N A224957 Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) <= 2*p(j-1) and p(j-1) <= 2*p(j).
%H A224957 Alois P. Heinz, <a href="/A224957/b224957.txt">Table of n, a(n) for n = 0..4306</a>
%e A224957 There are a(6) = 19 such compositions of 6:
%e A224957 01:  [ 1 1 1 1 1 1 ]
%e A224957 02:  [ 1 1 1 1 2 ]
%e A224957 03:  [ 1 1 1 2 1 ]
%e A224957 04:  [ 1 1 2 1 1 ]
%e A224957 05:  [ 1 1 2 2 ]
%e A224957 06:  [ 1 2 1 1 1 ]
%e A224957 07:  [ 1 2 1 2 ]
%e A224957 08:  [ 1 2 2 1 ]
%e A224957 09:  [ 1 2 3 ]
%e A224957 10:  [ 2 1 1 1 1 ]
%e A224957 11:  [ 2 1 1 2 ]
%e A224957 12:  [ 2 1 2 1 ]
%e A224957 13:  [ 2 2 1 1 ]
%e A224957 14:  [ 2 2 2 ]
%e A224957 15:  [ 2 4 ]
%e A224957 16:  [ 3 2 1 ]
%e A224957 17:  [ 3 3 ]
%e A224957 18:  [ 4 2 ]
%e A224957 19:  [ 6 ]
%p A224957 b:= proc(n, i) option remember; `if`(n=0, 1, add(
%p A224957       b(n-j, j), j=`if`(i=0, 1..n, ceil(i/2)..min(n, 2*i))))
%p A224957     end:
%p A224957 a:= n-> b(n, 0):
%p A224957 seq(a(n), n=0..42);  # _Alois P. Heinz_, Mar 15 2021
%t A224957 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]<=2*#[[i-1]]&&#[[i-1]]<=2*#[[i]],{i,2,Length[#]}]&]],{n,15}] (* _Gus Wiseman_, Mar 12 2021 *)
%t A224957 b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, If[i == 0, Range[n], Range[Ceiling[i/2], Min[n, 2*i]]]}]];
%t A224957 a[n_] := b[n, 0];
%t A224957 a /@ Range[0, 42] (* _Jean-François Alcover_, May 24 2021, after _Alois P. Heinz_ *)
%Y A224957 The case of strict relations is A342330, with strict case A342341.
%Y A224957 The strict case is A342342.
%Y A224957 A000929 counts partitions with adjacent parts x >= 2y.
%Y A224957 A002843 counts compositions with adjacent parts x <= 2y.
%Y A224957 A045690 counts sets with maximum n with adjacent elements y < 2x.
%Y A224957 A154402 counts partitions with adjacent parts x = 2y.
%Y A224957 A274199 counts compositions with adjacent parts x < 2y.
%Y A224957 A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
%Y A224957 A342096 counts partitions without adjacent x >= 2y (strict: A342097).
%Y A224957 A342098 counts partitions with adjacent parts x > 2y.
%Y A224957 A342331 counts compositions with adjacent parts x = 2y or y = 2x.
%Y A224957 A342332 counts compositions with adjacent parts x > 2y or y > 2x.
%Y A224957 A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
%Y A224957 A342334 counts compositions with adjacent parts x >= 2y or y > 2x.
%Y A224957 A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
%Y A224957 A342336 counts compositions with adjacent parts x > 2y or y = 2x.
%Y A224957 A342337 counts partitions with adjacent parts x = y or x = 2y.
%Y A224957 A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
%Y A224957 A342340 counts compositions with adjacent x = y or x = 2y or y = 2x.
%Y A224957 Cf. A003114, A003242, A034296, A167606, A342191, A342339.
%K A224957 nonn
%O A224957 0,3
%A A224957 _Joerg Arndt_, Apr 21 2013
%E A224957 Name corrected by _Gus Wiseman_, Mar 11 2021