OFFSET
2,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..175
FORMULA
See Maple program.
a(n) ~ (n-1)! * (log(n) + 3/2 + gamma)/4, where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Apr 27 2015
EXAMPLE
a(4) = 7: .1.2. .1-2. .1.2. o1.2. .1.2o .1-2. .1.2.
. .|.|. ..... ..X.. ../|. .|\.. ..\|. .|\..
. .3.4. .3-4. .3.4. .3-4. .3-4. o3.4. .3-4o
MAPLE
a:= proc(n) option remember; `if`(n<7, [0, 0, 1, 3, 7, 25, 127][n+1],
((2*n^3-21*n^2+65*n-58)*a(n-1)
-(n^4-13*n^3+60*n^2-116*n+80)*a(n-2))/((n-3)*(n-6)))
end:
seq(a(n), n=2..30);
MATHEMATICA
Join[{1, 3, 7, 25, 127}, RecurrenceTable[{a[n] == ((2*n^3 - 21*n^2 + 65*n - 58)*a[n-1] - (n^4 - 13*n^3 + 60*n^2 - 116*n + 80)*a[n-2])/((n-3)*(n- 6)), a[7] == 777, a[8] == 5547}, a, {n, 7, 20}]] (* G. C. Greubel, Aug 30 2018 *)
PROG
(PARI) m=30; v=concat([1, 3, 7, 25, 127, 777, 5547], vector(m-6)); for(n=7, m, v[n] = ((2*n^3-21*n^2+65*n-58)*v[n-1]-(n^4-13*n^3+60*n^2-116*n +80)*v[n-2] )/((n-3)*(n-6))); v \\ G. C. Greubel, Aug 30 2018
(Magma) I:=[1, 3, 7, 25, 127, 777, 5547]; [n le 7 select I[n] else ((2*n^3 - 21*n^2 + 65*n - 58)*Self(n-1) - (n^4 - 13*n^3 + 60*n^2 - 116*n + 80)*Self(n-2))/((n-3)*(n- 6)): n in [1..30]]; // G. C. Greubel, Aug 30 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 23 2012
STATUS
approved