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-3 of 3 results.

A177316 Number of permutations of n copies of 1..4 with all adjacent differences <= 1 in absolute value.

Original entry on oeis.org

1, 2, 26, 506, 11482, 284002, 7426610, 201922730, 5650739930, 161686253810, 4708709084026, 139111173397066, 4159013698117618, 125595645802182818, 3825428523179727266, 117382025506323434506, 3625185567639373456090, 112597953571519245194770
Offset: 0

Views

Author

R. H. Hardin, May 06 2010

Keywords

Comments

See A103882 and A177317 through A177328 for the number of permutations of n copies of 1..k (for different values of k) with adjacent differences restricted in size. We conjecture that all these sequences satisfy the congruences A(n*p^k) == A(n*p^(k-1)) ( mod p^(3*k) ) for all positive integers n and k and any prime p >= 5. - Peter Bala, Jan 16 2020

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 2, 26][n+1],
           (3*((105*n^4-356*n^3+402*n^2-208*n+43)*a(n-1)
          -(105*n^4-904*n^3+2868*n^2-3932*n+1930)*a(n-2))
          +(9*n-11)*(n-3)^3*a(n-3))/((9*n-16)*n^3))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Jan 22 2020
    A177316 := n -> hypergeom([-n, -n, n, n], [1, 1, 1], 1):
    seq(simplify(A177316(n)), n = 0..17); # Peter Luschny, Mar 27 2023
  • Mathematica
    a[n_] := HypergeometricPFQ[{-n, -n, n, n}, {1, 1, 1}, 1];
    Table[a[n], {n, 0, 17}] (* Jean-François Alcover, May 28 2023, after Peter Luschny *)
  • Python
    def A177316(n):
        if n == 0: return 1
        m, g = 1, 0
        for k in range(n+1):
            g += m*n**2//(n+k)**2
            m *= ((n+k+1)*(n-k))**2
            m //= (k+1)**4
        return g # Chai Wah Wu, Oct 03 2022

Formula

From Peter Bala, Jan 14 2020: (Start)
Conjecture: a(n) = (1/3)*( A005259(n) + A005259(n-1) ).
Equivalently, a(n) = Sum_{k = 0..n} binomial(n,k)^2*binomial(n+k-1,k)^2. Cf. A103882. If true, then the sequence satisfies the recurrence a(n) = (2*(102*n^6 - 612*n^5 + 1462*n^4 - 1768*n^3 + 1143*n^2 - 382*n+52) * a(n-1) - (2*n-1)*(3*n^2 - 3*n+1) * (n-2)^3 * a(n-2)) / (n^3*(2*n - 3) * (3*n^2 - 9*n+7)) and the supercongruences a(n*p^k) == a(n*p^(k-1)) ( mod p^(3*k) ) for all positive integers n and k and any prime p >= 5. [added Apr 18 2022: assuming the recurrence given in the Maple program below is correct then these conjectures are true.] (End)
a(n) = 2*A352653(n) for n >= 1. - Peter Bala, Apr 18 2022
a(n) = hypergeom([-n, -n, n, n], [1, 1, 1], 1). - Peter Luschny, Mar 27 2023
a(n) ~ (1 + sqrt(2))^(4*n) / (2^(5/4) * Pi^(3/2) * n^(3/2)). - Vaclav Kotesovec, Mar 29 2023

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 20 2020

A177322 Number of permutations of n copies of 1..4 with all adjacent differences <= 2 in absolute value.

Original entry on oeis.org

1, 12, 660, 51240, 4635540, 457507512, 47768769048, 5188083048720, 580132098966420, 66341857216154520, 7722843117550721160, 912113857017595941072, 109025503164832356811800, 13164173606420256001705200, 1603262885152270822600633200, 196721396289915224779758846240
Offset: 0

Views

Author

R. H. Hardin, May 06 2010

Keywords

Crossrefs

Formula

From Peter Bala, Nov 05 2024: (Start)
The following are conjectural:
For n >= 1, a(n) = Sum_{k = 0..2*n} (-1)^(n+k) * (k/n)^2 * binomial(2*n, k)^4. Cf. the identity Sum_{k = 0..2*n} (-1)^(n+k) * (k/n) * binomial(2*n, k)^2 = binomial(2*n, n) = A000984(n) for n >= 1.
For n >= 1, a(n) = 2 * binomial(2*n, n) * Sum_{k = 0..n} (k/n) * binomial(2*n, n-k)^2 * binomial(2*n+k, k).
P-recursive: n^3*(2*n-1)*(n-1)*(24*n^3-105*n^2+152*n-73)*a(n) = 2*(n-1)*(3264*n^7-20808*n^6+53900*n^5-73159*n^4+55963*n^3-24107*n^2+5436*n-504)*a(n-1) - 4*(2*n-1)*(24*n^3-33*n^2+14*n-2)*(2*n-3)^2*(n-2)^2*a(n-2) with a(1) = 12 and a(0) = 1.
The supercongruences a(n*p^r) == a(n*p^(r-1)) (mod p^(3*r)) hold for all primes p >= 5 and all positive integers n and r. (End)
a(n) = A156554(n) * A000984(n). A156554 counts ways to place 1s and 4s in the permutation; a positive (resp. negative) sequence element in A156554 is a run-length of 1s (resp. 4s) followed by a 2 or 3 or the end of the permutation. Each zero in A156554 corresponds to an additional 2 or 3 in the permutation. - Martin Fuller, Jun 07 2025

Extensions

a(0)=1 prepended by Alois P. Heinz, Jun 07 2025

A177326 Number of permutations of n copies of 1..5 with all adjacent differences <= 3 in absolute value.

Original entry on oeis.org

1, 72, 41580, 37850400, 42251309100, 52977847995072, 71614356453896256, 102038786510159790720, 151158246783053570131500, 230729955958244519983206000, 360656999876515853295073369080, 574739352751818771710077504838400, 930674941577730459521320183457601600
Offset: 0

Views

Author

R. H. Hardin, May 06 2010

Keywords

Crossrefs

Formula

a(n) = A103881(3n,n) * A006480(n). - Martin Fuller, Jun 08 2025

Extensions

a(0)=1 prepended by Martin Fuller, Jun 08 2025
Showing 1-3 of 3 results.