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.

A190525 Number of n-step one-sided prudent walks, avoiding exactly two consecutive west steps (can have three or more west steps).

This page as a plain text file.
%I A190525 #37 Jan 21 2022 14:36:54
%S A190525 1,3,6,15,34,80,185,431,1001,2328,5411,12580,29244,67985,158045,
%T A190525 367411,854126,1985603,4615966,10730820,24946129,57992715,134816705,
%U A190525 313410816,728591751,1693770328,3937538296,9153665985,21279691689,49469281395
%N A190525 Number of n-step one-sided prudent walks, avoiding exactly two consecutive west steps (can have three or more west steps).
%C A190525 The Ze2 sums, see A180662 for the definition of these sums, of the 'Races with Ties' triangle A035317 leads to this sequence with a(-1) = 1; the recurrence relation confirms this value. - _Johannes W. Meijer_, Jul 20 2011
%C A190525 Number of tilings of a 5 X 3n rectangle with 5 X 1 pentominoes. - _M. Poyraz Torcuk_, Dec 25 2021
%H A190525 G. C. Greubel, <a href="/A190525/b190525.txt">Table of n, a(n) for n = 0..1000</a>
%H A190525 S. Gao and H. Niederhausen, <a href="http://math.fau.edu/Niederhausen/HTML/Papers/Sequences%20Arising%20From%20Prudent%20Self-Avoiding%20Walks-February%2001-2010.pdf">Sequences Arising From Prudent Self-Avoiding Walks</a>, 2010.
%H A190525 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-1,1).
%F A190525 G.f.: (1+x-x^2+x^3)/(1-2*x-x^2+x^3-x^4).
%F A190525 From _Johannes W. Meijer_, Jul 20 2011: (Start)
%F A190525 a(n) = 2*a(n-1) + a(n-2) - a(n-3) + a(n-4) with a(0) = 1, a(1) = 3, a(2) = 6 and a(3) = 15.
%F A190525 a(n) = (9*A095263(n+1) - 8*A095263(n) + 5*A095263(n-1) - 2*(-1)^n)/7. (End)
%e A190525 a(2) = 6 since there are 6 such walks: NN, NW, WN, EE, EN, NE.
%p A190525 A190525 := proc(n) option remember: if n=0 then 1 elif n=1 then 3 elif n=2 then 6 elif n=3 then 15 else 2*procname(n-1) + procname(n-2) - procname(n-3) + procname(n-4) fi: end: seq(A190525(n), n=0..29); # _Johannes W. Meijer_, Jul 20 2011
%t A190525 LinearRecurrence[{2,1,-1,1}, {1,3,6,15}, 40] (* _G. C. Greubel_, Apr 17 2021 *)
%o A190525 (Magma) I:=[1,3,6,15]; [n le 4 select I[n] else 2*Self(n-1) +Self(n-2) -Self(n-3) +Self(n-4): n in [1..40]]; // _G. C. Greubel_, Apr 17 2021
%o A190525 (Sage)
%o A190525 def A190525_list(prec):
%o A190525     P.<x> = PowerSeriesRing(ZZ, prec)
%o A190525     return P( (1+x-x^2+x^3)/(1-2*x-x^2+x^3-x^4) ).list()
%o A190525 A190525_list(40) # _G. C. Greubel_, Apr 17 2021
%K A190525 nonn,walk,easy
%O A190525 0,2
%A A190525 _Shanzhen Gao_, May 11 2011