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.

A372702 Number of compositions of n such that the set of parts is {1,2,3}.

This page as a plain text file.
%I A372702 #70 May 27 2024 16:04:32
%S A372702 6,12,32,72,152,311,625,1225,2378,4566,8700,16475,31052,58290,109079,
%T A372702 203584,379144,704821,1308268,2425259,4491074,8308879,15360082,
%U A372702 28376089,52391492,96683649,178344205,328854566,606190627,1117103729,2058129088,3791056189
%N A372702 Number of compositions of n such that the set of parts is {1,2,3}.
%H A372702 Alois P. Heinz, <a href="/A372702/b372702.txt">Table of n, a(n) for n = 6..3779</a>
%F A372702 G.f.: C({1,2,3},x) = (x^6/(-x^3 - x^2 - x + 1)) *
%F A372702  (1/((1 - x)*(-x^2 - x + 1)) +
%F A372702   1/((1 - x)*(-x^3 - x + 1)) +
%F A372702   1/((1 - x^2)*(-x^2 - x + 1)) +
%F A372702   1/((1 - x^2)*(-x^3 - x^2 + 1)) +
%F A372702   1/((1 - x^3)*(-x^3 - x + 1)) +
%F A372702   1/((1 - x^3)*(-x^3 - x^2 + 1))).
%F A372702 Where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)).
%p A372702 b:= proc(n, t) option remember; `if`(n=0, `if`(t=7, 1, 0),
%p A372702       add(b(n-j, Bits[Or](t, 2^(j-1))), j=1..min(n, 3)))
%p A372702     end:
%p A372702 a:= n-> b(n, 0):
%p A372702 seq(a(n), n=6..42);  # _Alois P. Heinz_, May 25 2024
%o A372702 (PARI)
%o A372702 C_x(s,N)={my(x='x+O('x^N), g=if(#s <1,1, sum(i=1,#s, C_x(setminus(s,[s[i]]),N) * x^(s[i]) )/(1-sum(i=1,#s, x^(s[i]))))); return(g)}
%o A372702 B_x(n) ={my(h=C_x([1,2,3],n)); Vec(h)}
%o A372702 B_x(40)
%Y A372702 Cf. A048793, A107429, A245738.
%Y A372702 Column k=3 of A373118.
%K A372702 nonn,easy
%O A372702 6,1
%A A372702 _John Tyler Rascoe_, May 25 2024