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.

A383620 Number of weak compositions of n such that the set of adjacent differences is a subset of {-1,1}.

This page as a plain text file.
%I A383620 #9 May 04 2025 14:52:52
%S A383620 1,4,5,9,13,20,30,45,66,102,152,229,344,518,780,1180,1775,2676,4037,
%T A383620 6088,9182,13852,20891,31512,47536,71706,108166,163172,246140,371303,
%U A383620 560118,844943,1274606,1922767,2900522,4375493,6600511,9956990,15020307,22658428
%N A383620 Number of weak compositions of n such that the set of adjacent differences is a subset of {-1,1}.
%H A383620 Alois P. Heinz, <a href="/A383620/b383620.txt">Table of n, a(n) for n = 0..5598</a>
%e A383620 a(0) = 1: (0).
%e A383620 a(1) = 4: (0,1), (0,1,0), (1,0), (1).
%e A383620 ...
%e A383620 a(4) = 13: (0,1,0,1,0,1,0,1), (0,1,0,1,0,1,0,1,0), (1,0,1,0,1,0,1,0), (1,0,1,0,1,0,1), (0,1,0,1,2), (1,0,1,2), (2,1,0,1,0), (2,1,0,1), (0,1,2,1,0), (0,1,2,1), (1,2,1,0), (1,2,1), (4).
%o A383620 (PARI)
%o A383620 M(k) = matrix(k+1,k+1, i,j, if(i==j,1,if(i==j-1, -x^(i-1), if(i==j+1, -x^(i-1), 0))))
%o A383620 A_x(N) = {my(k=N+1,x='x+O('x^k)); Vec(vecsum(M(k)^(-1) * vector(k+1,i,x^(i-1))~))}
%o A383620 A_x(10)
%Y A383620 Cf. A007318, A173258, A214247, A214249, A227310.
%K A383620 nonn
%O A383620 0,2
%A A383620 _John Tyler Rascoe_, May 02 2025