login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.) 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
LINKS
EXAMPLE
a(2) = 1;
E
|
*
|
S--*
a(3) = 2;
*--*--*--E E--*--*--*
| |
* *
| |
S--* S--*
a(4) = 4;
E E
| |
* *
| |
* *
| |
* *
| |
*--*--*--* *--*--*--* *--*--*--* *--*--*--*
| | | | | |
* * * * * *
| | | | | |
S--* S--* * * S--* S--*
| |
E E
PROG
(Ruby)
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)
CROSSREFS
Cf. A101856.
Sequence in context: A085583 A160786 A054154 * A332835 A018469 A098904
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 23 2017
EXTENSIONS
a(25)-a(39) from Bert Dobbelaere, Sep 14 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 21 02:16 EDT 2024. Contains 374462 sequences. (Running on oeis4.)