OFFSET
1,3
COMMENTS
Each phone booth has two adjacent ones, each of which may or may not be occupied. So, available phone booths may have from 0 to 2 adjacent ones that are occupied. Each time we pick a phone booth with the smallest number of those (0 is top priority, then 1, then 2).
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..100
FORMULA
a(n) = A192009(n) / n.
For n > 1, a(n) = Sum (m+k-1)!*binomial(m+k,m)*2^k*k!*(m+k)!, where the sum is taken over nonnegative m,k such that 2*m+3*k = n.
MATHEMATICA
r[n_] := {ToRules[Reduce[m >= 0 && k >= 0 && 2 m + 3 k == n, {m, k}, Integers]]}; f[{m_, k_}] := (m + k - 1)!*Binomial[m + k, m]*2^k*k!*(m + k)!; a[n_] := Total[f /@ ({m, k} /. r[n])]; a[1] = 1; Array[a, 26] (* Jean-François Alcover, Sep 13 2016 *)
PROG
(PARI) { A276657(n) = my(r, k); if(n==1, return(1)); r=0; forstep(m=lift(Mod(n, 3)/2), n\2, 3, k=(n-2*m)\3; r+=(m+k-1)!*binomial(m+k, m)*2^k*k!*(m+k)!); r; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Sep 11 2016
STATUS
approved