cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A192008 Modified linear phone booth sequence: number of ways to occupy n phone booths in a row, one by one, each time picking a phone booth adjacent to the smallest number of previously occupied phone booths.

Original entry on oeis.org

1, 2, 4, 8, 32, 96, 456, 2016, 11232, 61632, 419328, 2695680, 21358080, 161049600, 1433894400, 12429158400, 123511910400, 1202903654400, 13229501644800, 143113833676800, 1722282128179200, 20516624400384000, 268083853148160000, 3485314242772992000, 49167975665958912000
Offset: 1

Views

Author

Jens Voß, Jun 21 2011

Keywords

Examples

			For n=4, the A192008(n) = 8 ways of picking the phones are (1, 3, 4, 2), (1, 4, 2, 3), (1, 4, 3, 2), (2, 4, 1, 3), (3, 1, 4, 2), (4, 1, 2, 3), (4, 1, 3, 2), (4, 2, 1, 3).
		

Crossrefs

Programs

  • PARI
    { A192008(n) = my(r,k); r=0; for(v=0,2, forstep(m=lift(Mod(n-1-v,3)/2),(n-1-v)\2,3, k=(n-1-v-2*m)\3; r+=(m+k+1)!*binomial(m+k,m)*2^k*(k+v)!*(m+k)!*(1+(v==1)););); r; } \\ Max Alekseyev, Sep 11 2016

Formula

a(n) = Sum (m+k+1)!*binomial(m+k,m)*2^k*(k+v1+v2)!*(m+k)!, where the sum is taken over v1,v2 each from 0 to 1, and over nonnegative m,k such that 2*m+3*k = n-1-v1-v2. - Max Alekseyev, Sep 11 2016

Extensions

More terms from João Batista Souza de Oliveira, Jul 09 2014
Terms a(20) onward from Max Alekseyev, Sep 11 2016

A192009 Modified cyclic phone booth sequence: number of ways to occupy n labeled phone booths in a circle one by one, each time picking a phone booth adjacent to the smallest number of previously occupied phone booths.

Original entry on oeis.org

1, 2, 6, 8, 40, 168, 504, 3456, 15552, 97920, 620928, 4465152, 31449600, 273369600, 2172096000, 20968243200, 192753561600, 2032260710400, 20942298316800, 243270107136000, 2758764950323200, 34958441123020800, 434690126954496000, 5946571752210432000, 80503989505228800000
Offset: 1

Views

Author

Jens Voß, Jun 21 2011

Keywords

Examples

			For n=4, the A192009(n) = 6 ways of picking the phone booths are (1, 3, 2, 4), (1, 3, 4, 2), (2, 4, 1, 3), (2, 4, 3, 1), (3, 1, 2, 4), (3, 1, 4, 2), (4, 2, 1, 3), (4, 2, 3, 1).
		

Crossrefs

Programs

  • Maple
    A192009 := proc(n)
        local a,k,m;
        if n = 1 then
            return 1;
        end if;
        a := 0 ;
        for k from 0 to n/3 do
            m := (n-3*k)/2 ;
            if type (m,'integer') then
                a := a+(m+k-1)!*binomial(m+k,m)*2^k*k!*(m+k)! ;
            end if;
        end do:
        a*n ;
    end proc:
    seq(A192009(n),n=1..20) ; # R. J. Mathar, Sep 17 2016
  • Mathematica
    r[n_] := {ToRules[Reduce[m >= 0 && k >= 0 && 2m+3k == n, {m, k}, Integers] ]}; f[{m_, k_}] := (m+k-1)!*Binomial[m + k, m]*2^k*k!*(m+k)!; a[n_] := n*Total[f /@ ({m, k} /. r[n])]; a[1] = 1; Array[a, 25] (* Jean-François Alcover, Sep 13 2016, after Max Alekseyev *)
  • PARI
    { A192009(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*n; } \\ Max Alekseyev, Sep 11 2016

Formula

For n > 1, a(n) = 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. - Max Alekseyev, Sep 11 2016
a(n) = n * A276657(n). - Max Alekseyev, Sep 11 2016

Extensions

Terms a(15) onward from Max Alekseyev, Sep 11 2016
Showing 1-2 of 2 results.