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.
%I A143454 #59 Jan 03 2023 07:21:53 %S A143454 1,4,7,10,13,25,46,76,115,190,328,556,901,1471,2455,4123,6826,11239, %T A143454 18604,30973,51451,85168,140980,233899,388252,643756,1066696,1768393, %U A143454 2933149,4864417,8064505,13369684,22169131,36762382,60955897,101064949,167572342 %N A143454 Expansion of 1/(x^k*(1 - x - 3*x^(k+1))) for k=3. %C A143454 a(n) is also the number of length n quaternary words with at least 3 0-digits between any other digits. %C A143454 The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 7, 4*a(n-7) equals the number of 4-colored compositions of n with all parts >= 4, such that no adjacent parts have the same color. - _Milan Janjic_, Nov 27 2011 %H A143454 Vincenzo Librandi, <a href="/A143454/b143454.txt">Table of n, a(n) for n = 0..1000</a> %H A143454 D. Birmajer, J. B. Gil, and M. D. Weiner, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Gil/gil6.html">On the Enumeration of Restricted Words over a Finite Alphabet</a>, J. Int. Seq. 19 (2016) # 16.1.3, Example 9. %H A143454 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,3). %F A143454 G.f.: (1 + 3*x + 3*x^2 + 3*x^3) / (1 - x - 3*x^4). - _R. J. Mathar_, Aug 04 2019 %F A143454 a(n) = Sum_{j=0..(n+3)/3} 3^j*C(n-3*j+3,j). - _Vladimir Kruchinin_, May 24 2011 %p A143454 a:= proc(k::nonnegint) local n,i,j; if k=0 then unapply(4^n,n) else unapply((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(3): seq(a(n), n=0..50); %t A143454 a[n_]:= Sum[3^j*Binomial[n-3*j+3, j], {j, 0, (n+3)/3}]; Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Feb 04 2014, after _Vladimir Kruchinin_ *) %t A143454 LinearRecurrence[{1,0,0,3}, {1,4,7,10}, 41] (* _G. C. Greubel_, May 08 2021 *) %o A143454 (Maxima) a(n):= sum(3^j*binomial(n-3*j+3,j), j,0,(n+3)/3); /* _Vladimir Kruchinin_, May 24 2011 */ %o A143454 (PARI) Vec(1/(x^3*(1-x-3*x^4))+O(x^99)) \\ _Charles R Greathouse IV_, Sep 26 2012 %o A143454 (PARI) my(p=Mod('x,'x^4-'x^3-3)); a(n) = vecsum(Vec(lift(p^(n+3)))); \\ _Kevin Ryde_, May 11 2021 %o A143454 (Magma) [n le 4 select 3*n-2 else Self(n-1) +3*Self(n-4): n in [1..51]]; // _G. C. Greubel_, May 08 2021 %o A143454 (Sage) %o A143454 def a(n): return 3*n+1 if (n<4) else a(n-1) + 3*a(n-4) %o A143454 [a(n) for n in (0..40)] # _G. C. Greubel_, May 08 2021 %Y A143454 3rd column of A143461. %K A143454 nonn,easy %O A143454 0,2 %A A143454 _Alois P. Heinz_, Aug 16 2008