[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A276903 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of positive walks with n steps {-2,-1,0,1,2} starting at the origin, ending at altitude 2, and staying strictly above the x-axis.
(history; published version)
#22 by Alois P. Heinz at Tue Oct 11 08:42:00 EDT 2016
STATUS

editing

approved

#21 by Alois P. Heinz at Tue Oct 11 08:41:55 EDT 2016
LINKS

Alois P. Heinz, <a href="/A276903/b276903.txt">Table of n, a(n) for n = 0..1437</a>

#20 by Alois P. Heinz at Tue Oct 11 08:38:56 EDT 2016
DATA

0, 1, 2, 7, 25, 96, 382, 1567, 6575, 28096, 121847, 534953, 2373032, 10619922, 47890013, 217395690, 992640367, 4555957948, 21007405327, 97266928685, 452046424465, 2108022305795, 9860773604035, 46256877824220, 217555982625385, 1025667805621986, 4846240583558277

KEYWORD

nonn,more,walk,changed

STATUS

proposed

editing

#19 by Davin Park at Mon Oct 10 21:13:17 EDT 2016
STATUS

editing

proposed

#18 by Davin Park at Mon Oct 10 21:11:20 EDT 2016
MATHEMATICA

A276903[n_] := (Do[walks[m, k, 2], {m, n}, {k, 2 m}]; walks[n, 2, 2]; ) (* Davin Park, Oct 10 2016 *)

STATUS

proposed

editing

#17 by Davin Park at Mon Oct 10 19:19:40 EDT 2016
STATUS

editing

proposed

#16 by Davin Park at Mon Oct 10 19:19:33 EDT 2016
MATHEMATICA

dpwalks[n_, k_, h_] = 0;

dpwalks[1, k_, h_] := Boole[0 < k <= h];

dpwalks[n_, k_, h_] /; n >= 2 && k > 0 := dpwalks[n, k, h] = Sum[dpwalks[n - 1, k + x, h], {x, -h, h}];

(* walks represents the number of positive walks with n steps {-h, -h+1, ... , h} that end at altitude k *)

A276903[n_] := dpwalks[n, 2, 2]; (* Davin Park, Oct 10 2016 *)

#15 by Alonso del Arte at Mon Oct 10 15:41:27 EDT 2016
STATUS

proposed

editing

#14 by Davin Park at Mon Oct 10 15:32:37 EDT 2016
STATUS

editing

proposed

Discussion
Mon Oct 10
15:41
Alonso del Arte: What's "dp"? Different parks? Deviation parameters? It needs a more meaningful name so that it's easier to understand how this 3-parameter function can be used in other contexts.
#13 by Davin Park at Mon Oct 10 15:30:23 EDT 2016
MATHEMATICA

dp[n_, k_, h_] = 0;

dp[1, k_, h_] := Boole[0 < k <= h];

dp[n_, k_, h_] /; n >= 2 && k > 0 := dp[n, k, h] = Sum[dp[n - 1, k + x, h], {x, -h, h}];

A276903[n_] := dp[n, 2, 2]; (* Davin Park, Oct 10 2016 *)

STATUS

approved

editing