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.

A344560 a(n) = hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27).

Original entry on oeis.org

1, 1, 1, 7, 25, 61, 211, 841, 2857, 9745, 36421, 134971, 488731, 1807807, 6788965, 25384087, 95114377, 359291737, 1361265889, 5162682775, 19642369405, 74960720065, 286563664135, 1097430871285, 4211301910795, 16187715501811, 62311953400711, 240203420513161
Offset: 0

Views

Author

Peter Luschny, Jun 01 2021

Keywords

Comments

Let T(n,k) be the number of words of length n with an alphabet of size M where the first k=M-1 letters of the alphabet appear with the same frequency f in each word. Then T(n,k) = Sum_{f=0..n/k} Product_{i=0..k-1} binomial(n-i*f,f) and a(n) = T(n,3), A002426(n)=T(n,2). Removing the words with cycles by the inclusion-exclusion principle by a Mobius Transform gives words of length n of that type without cycles and division through n the Lyndon words of that type, A349002. - R. J. Mathar, Nov 07 2021
Diagonal of the rational function 1 / (1 - x^3 - y^3 - z^3 - x*y*z). - Ilya Gutkovskiy, Apr 22 2025

Crossrefs

Cf. A344559.

Programs

  • Maple
    a := n -> hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27):
    seq(simplify(a(n)), n = 0..27);
    a := proc(n) option remember; if n < 4 then [1, 1, 1, 7][n+1] else
    ((28*n^2 - 84*n + 56)*a(n - 3) - 3*(n - 1)^2*a(n - 2) + (3*n^2 - 3*n + 1)*a(n - 1))/ n^2 fi end: seq(a(n), n = 0..27);
  • Mathematica
    Table[HypergeometricPFQ[{-n/3, (1 - n)/3, (2 - n)/3}, {1, 1}, -27], {n, 0, 27}] (* Amiram Eldar, Jun 22 2021 *)
  • PARI
    a(n)=sum(k=0, n\3, n!/(k!^3*(n-3*k)!)) \\ Andrew Howroyd, Jan 14 2023
    
  • Python
    from sympy import hyperexpand, Rational
    from sympy.functions import hyper
    def A344560(n): return hyperexpand(hyper((Rational(-n,3),Rational(1-n,3),Rational(2-n,3)),(1,1),-27)) # Chai Wah Wu, Jan 04 2024

Formula

D-finite with recurrence n^2*a(n) = (28*n^2 - 84*n + 56)*a(n-3) - 3*(n - 1)^2*a(n-2) + (3*n^2 - 3*n + 1)* a(n-1) for n >= 4.
From Haoran Chen, Jun 22 2021: (Start)
a(n) ~ 2 * 4^n/(sqrt(3) * n * Pi).
a(n) = [(x*y)^0] (1 + x + y + 1/(x * y))^n. (End)
a(n) = Sum_{k=0..floor(n/3)} n!/(k!^3*(n-3*k)!). - Andrew Howroyd, Jan 14 2023