A207361
Displacement under constant discrete unit surge.
Original entry on oeis.org
0, 1, 11, 53, 173, 448, 994, 1974, 3606, 6171, 10021, 15587, 23387, 34034, 48244, 66844, 90780, 121125, 159087, 206017, 263417, 332948, 416438, 515890, 633490, 771615, 932841, 1119951, 1335943, 1584038, 1867688
Offset: 0
s(4) = s(3) + v(4)*4 = 53 + 30*4 = 53 + 120 = 173;
s(5) = s(4) + v(5)*5 = 173 + 55*5 = 173 + 275 = 448;
s(6) = s(5) + v(6)*6 = 448 + 91*6 = 448 + 546 = 994;
s(7) = s(6) + v(7)*7 = 994 + 140*7 = 994 + 980 = 1974.
-
a:=n->sum(sum(i^2*j,j=i..n),i=0..n): seq(a(n),n=0..30); # Robert FERREOL, May 24 2022
-
a[0] = 0; a[n_] := a[n] = a[n-1] + n^2*(n+1)*(2*n+1)/6; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 22 2015 *)
-
A207361(n) := block(
n*(1+n)*(2+n)*(1+11*n+8*n^2)/120
)$ /* R. J. Mathar, Mar 08 2012 */
A292793
1/4 of the number of self-avoiding paths that are made of alternated vertical and horizontal n consecutive steps. (start point is different from end point.)
Original entry on oeis.org
1, 2, 4, 8, 16, 29, 54, 98, 176, 318, 572, 1026, 1826, 3255, 5794, 10233, 18172, 32012, 56488, 99469, 175034, 307479, 540068, 947235, 1659907, 2908958, 5095019, 8917677, 15598100, 27281252, 47718310, 83298748, 145405769, 253641303, 442352671, 770769569, 1343166519, 2339093953
Offset: 2
a(2) = 1;
E
|
*
|
S--*
a(3) = 2;
*--*--*--E E--*--*--*
| |
* *
| |
S--* S--*
a(4) = 4;
E E
| |
* *
| |
* *
| |
* *
| |
*--*--*--* *--*--*--* *--*--*--* *--*--*--*
| | | | | |
* * * * * *
| | | | | |
S--* S--* * * S--* S--*
| |
E E
-
def A292793(n)
ary = [1]
b_ary = [[[0, 0], [1, 0], [1, 1], [1, 2]]]
s = 4
(3..n).each{|i|
s += i
f_ary, b_ary = b_ary, []
if i % 2 == 1
f_ary.each{|a|
b = a.clone
x, y = *b[-1]
b += (1..i).map{|j| [x + j, y]}
b_ary << b if b.uniq.size == s
c = a.clone
x, y = *c[-1]
c += (1..i).map{|j| [x - j, y]}
b_ary << c if c.uniq.size == s
}
else
f_ary.each{|a|
b = a.clone
x, y = *b[-1]
b += (1..i).map{|j| [x, y + j]}
b_ary << b if b.uniq.size == s
c = a.clone
x, y = *c[-1]
c += (1..i).map{|j| [x, y - j]}
b_ary << c if c.uniq.size == s
}
end
ary << b_ary.size
}
ary
end
p A292793(16)
A101857
Number of possibly-self-intersecting walks that it is possible for an accelerating ant to produce with n steps (rotations & reflections not included). On step 1 the ant moves forward 1 unit, then turns left or right and proceeds 2 units, then turns left or right until at the end of its n-th step it arrives back at its starting place.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 16, 28, 0, 0, 0, 0, 0, 0, 1190, 2108, 0, 0, 0, 0, 0, 0
Offset: 1
a(7) = 1 because of the following solution:
655555XXX
6XXXX4XXX
6XXXX4XXX
6XXXX4XXX
6XXXX4333
6XXXXXXX2
777777712
where the ant starts at the "1" and moves right 1 space, up 2 spaces and so on...
Showing 1-3 of 3 results.
Comments