OFFSET
0,2
LINKS
Andrew Woods, Table of n, a(n) for n = 0..100
Index entries for linear recurrences with constant coefficients, signature (4,19,1,-26,1,6).
FORMULA
Recurrence: a(n) = 4*a(n-1)+19*a(n-2)+a(n-3)-26*a(n-4)+a(n-5)+6*a(n-6) for n>5, a(0)=1, a(1)=3, a(2)=26, a(3)=163, a(4)=1125, a(5)=7546.
G.f.: (1-x-5*x^2+x^3+2*x^4)/(1-4*x-19*x^2-x^3+26*x^4-x^5-6*x^6).
MATHEMATICA
LinearRecurrence[{4, 19, 1, -26, 1, 6}, {1, 3, 26, 163, 1125, 7546}, 21] (* T. D. Noe, Jun 04 2013 *)
PROG
(Python)
# Depth-first search on 3 rows and n columns
# Produces "count" and the list "result[]"
# Omit the 2nd-last line if memory runs low
n=5; rows=3
count=0; result=[]
def f(b, row=0, col=-1):
global count
for i in range(row, len(b)):
for j in range((col+1 if i==row else 0), len(b[0])):
if b[i][j]==' ':
if i<len(b)-1:
if b[i+1][j]==' ':
f(b[:i]+[b[i][:j]+'^'+b[i][j+1:], b[i+1][:j]+'V'+b[i+1][j+1:]]+b[i+2:], i, j)
if j<len(b[0])-1:
if b[i][j+1]==' ' and b[i+1][j:j+2]==' ':
f(b[:i]+[b[i][:j]+'/\\'+b[i][j+2:], b[i+1][:j]+'\\/'+b[i+1][j+2:]]+b[i+2:], i, j)
if j<len(b[0])-1:
if b[i][j+1]==' ':
f(b[:i]+[b[i][:j]+'<>'+b[i][j+2:]]+b[i+1:], i, j)
count+=1
result.append(b) # omit this line
f([' '*n]*rows); print(count)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Woods, Jun 04 2013
STATUS
approved