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.

A342337 Number of integer partitions of n with all adjacent parts (x, y) satisfying either x = y or x = 2y.

This page as a plain text file.
%I A342337 #20 Jun 03 2021 13:44:12
%S A342337 1,1,2,3,4,4,7,6,9,10,12,11,19,14,20,24,27,24,37,31,44,45,49,48,71,61,
%T A342337 72,80,92,84,118,102,128,132,144,151,191,166,197,211,244,226,287,263,
%U A342337 313,330,348,347,435,399,462,476,524,508,614,591,674,680,732,731,890,814,916,966,1042,1032,1188,1135,1280,1303
%N A342337 Number of integer partitions of n with all adjacent parts (x, y) satisfying either x = y or x = 2y.
%H A342337 Alois P. Heinz, <a href="/A342337/b342337.txt">Table of n, a(n) for n = 0..10000</a>
%e A342337 The a(1) = 1 through a(9) = 10 partitions:
%e A342337   1   2    3     4      5       6        7         8          9
%e A342337       11   21    22     221     33       421       44         63
%e A342337            111   211    2111    42       2221      422        333
%e A342337                  1111   11111   222      22111     2222       4221
%e A342337                                 2211     211111    4211       22221
%e A342337                                 21111    1111111   22211      42111
%e A342337                                 111111             221111     222111
%e A342337                                                    2111111    2211111
%e A342337                                                    11111111   21111111
%e A342337                                                               111111111
%p A342337 b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j),
%p A342337       j=`if`(i=0, 1..n, select(x-> x<=n, [i, 2*i]))))
%p A342337     end:
%p A342337 a:= n-> b(n, 0):
%p A342337 seq(a(n), n=0..80);  # _Alois P. Heinz_, May 24 2021
%t A342337 Table[Length[Select[IntegerPartitions[n],And@@Table[#[[i]]==#[[i-1]]||#[[i-1]]==2*#[[i]],{i,2,Length[#]}]&]],{n,0,30}]
%t A342337 (* Second program: *)
%t A342337 b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j],
%t A342337      {j, If[i == 0, Range[n], Select[{i, 2i}, # <= n&]]}]];
%t A342337 a[n_] := b[n, 0];
%t A342337 a /@ Range[0, 80] (* _Jean-François Alcover_, Jun 03 2021, after _Alois P. Heinz_ *)
%Y A342337 The first condition alone gives A000005 (for partitions).
%Y A342337 The second condition alone gives A154402 (for partitions).
%Y A342337 The Heinz numbers of these partitions are given by A342339.
%Y A342337 A000929 counts partitions with adjacent parts x >= 2y.
%Y A342337 A002843 counts compositions with adjacent parts x <= 2y.
%Y A342337 A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
%Y A342337 A274199 counts compositions with adjacent parts x < 2y.
%Y A342337 A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
%Y A342337 A342096 counts partitions without adjacent x >= 2y (strict: A342097).
%Y A342337 A342098 counts partitions with adjacent parts x > 2y.
%Y A342337 A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
%Y A342337 A342331 counts compositions with adjacent parts x = 2y or y = 2x.
%Y A342337 A342332 counts compositions with adjacent parts x > 2y or y > 2x.
%Y A342337 A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
%Y A342337 A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
%Y A342337 A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
%Y A342337 Cf. A003114, A003242, A034296, A167606, A342083, A342084, A342087, A342191, A342334, A342336, A342340.
%K A342337 nonn
%O A342337 0,3
%A A342337 _Gus Wiseman_, Mar 10 2021