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.

User: Roland Bacher

Roland Bacher's wiki page.

Roland Bacher has authored 22 sequences. Here are the ten most recent ones:

A137342 Number of rational series having complexity n over the finite field F_2 in two non-commuting variables.

Original entry on oeis.org

1, 4, 240, 52032, 37961472, 95557604352, 873176389545984, 30234012628981334016, 4073184753921806027390976, 2164965110784257951109280432128, 4571419424684923104187906920444592128
Offset: 0

Author

Roland Bacher, Apr 08 2008

Keywords

Formula

The reference contains a somewhat complicated formula.

A137343 Number of elements of length n with respect to the natural metric in the special group of rational series over the finite field F_2 in two non-commuting variables.

Original entry on oeis.org

1, 12, 1296, 505536, 679848192, 3248147205120, 57637071142391808, 3930578658351563587584, 1050888530707010579202637824, 1112792971262327168651248131637248
Offset: 0

Author

Roland Bacher, Apr 08 2008

Keywords

Formula

The reference contains a somewhat complicated formula.

A126792 Removing the first, fourth, seventh, tenth ... term of the sequence yields the original sequence, augmented by 1.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 2, 4, 3, 1, 3, 5, 3, 4, 2, 2, 4, 6, 2, 4, 5, 4, 3, 3, 3, 5, 7, 1, 3, 5, 3, 6, 5, 5, 4, 4, 3, 4, 6, 4, 8, 2, 2, 4, 6, 2, 4, 7, 4, 6, 6, 6, 5, 5, 2, 4, 5, 4, 7, 5, 5, 9, 3, 4, 3, 5, 3, 7, 3, 3, 5, 8, 3, 5, 7, 5, 7, 7, 7, 6, 6, 1, 3, 5, 3, 6, 5, 5, 8, 6, 3, 6, 10, 6, 4, 5, 5, 4, 6, 5, 4, 8, 4, 4, 4
Offset: 0

Author

Roland Bacher, Feb 20 2007, Feb 26 2007

Keywords

Comments

Inspired by the "decimation-like sequences" (or "suites du lezard", after Delahaye) of Eric Angelini.
This sequence is a generalization of sequence A000120, which is defined recursively by a(0)=0, a(2n)=a(n) and a(2n+1)=1+a(n). Its subsequence of even term is thus the original sequence while its subsequence of odd terms yields the original sequence augmented by 1.

Examples

			Removing parenthesised terms
(0),1,2,(1),3,2,(2),4,3,(1),3,5,(3),4,..
leaves
1,2, 3,2, 4,3, 3,5, 4,..
which is the original sequence with 1 added to each term.
		

References

  • Article by J-P. Delahaye in Pour la Science, mars 2007.

Crossrefs

Cf. A117943.

Programs

  • Maple
    liz:=n->if n=0 then 0 elif modp(n,3)=0 then liz(n/3) else 1+liz(n-1-floor(n/3)) fi;
  • Mathematica
    a[0] = 0; a[n_] := a[n] = If[Mod[n, 3] == 0, a[n/3], a[Floor[(2*n - 1)/3]] + 1]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Sep 27 2013 *)

A120331 Number of polynomials in two noncommuting variables over the field F_2 having complexity or rank n.

Original entry on oeis.org

1, 1, 6, 72, 1776, 89280, 9065472, 1850148864, 757046525952, 620298979246080, 1017126921430892544, 3336658943759213395968, 21894988380633154342354944, 287369531352172835754234347520, 7543680108676972971562235527692288
Offset: 0

Author

Roland Bacher, Apr 29 2008

Keywords

Examples

			The six polynomials corresponding to a(2) are: X, Y, X+Y, 1+X, 1+Y, 1+X+Y.
		

Crossrefs

Cf. A137342.

Formula

The reference contains a somewhat complicated formula.

A107991 Complexity (number of maximal spanning trees) in an unoriented simple graph with nodes {1,2,...,n} and edges {i,j} if i + j > n.

Original entry on oeis.org

1, 1, 1, 3, 8, 40, 180, 1260, 8064, 72576, 604800, 6652800, 68428800, 889574400, 10897286400, 163459296000, 2324754432000, 39520825344000, 640237370572800, 12164510040883200, 221172909834240000, 4644631106519040000, 93666727314800640000
Offset: 1

Author

Roland Bacher, Jun 13 2005

Keywords

Comments

Proof of the formula: check that the associated combinatorial Laplacian has eigenvalues {0,..n-1}\ {floor((n+1)/2)} by exhibiting a basis of eigenvectors (which are very simple).

Examples

			a(1)=a(2)=a(3)=1 because the corresponding graphs are trees.
a(4)=3 because the corresponding graph is a triangle with one of its vertices adjacent to a fourth vertex.
		

References

  • N. Biggs, Algebraic Graph Theory, Cambridge University Press (1974).

Crossrefs

Programs

  • GAP
    List([1..20],n->Factorial(n-1)/Int((n+1)/2)); # Muniru A Asiru, Dec 15 2018
    
  • Magma
    [Factorial(n-1)/Floor((n+1)/2): n in [1..25]]; // Vincenzo Librandi, Dec 15 2018
    
  • Maple
    a:=n->(n-1)!/floor((n+1)/2);
  • Mathematica
    Function[x, 1/x] /@
    CoefficientList[Series[3*Exp[x]/4 + 1/4*Exp[-x] + x/2*Exp[x], {x, 0, 10}], x] (* Pierre-Alain Sallard, Dec 15 2018 *)
    Table[(n - 1)! / Floor[(n + 1) / 2], {n, 1, 30}] (* Vincenzo Librandi, Dec 15 2018 *)
  • PARI
    A107991(n)=(n-1)!/round(n/2) \\ M. F. Hasler, Apr 21 2015
    
  • SageMath
    [factorial(n-1)/floor((n+1)/2) for n in range(1,24)] # Stefano Spezia, May 10 2024

Formula

a(n) = (n-1)!/floor((n+1)/2).
a(n+1) = n!/floor(n/2 + 1). - M. F. Hasler, Apr 21 2015
1/a(n+1) is the coefficient of the power series of 3*exp(x)/4 + 1/4*exp(-x) + x/2*exp(x) ; this function is the sum of f_n(x) where f_0(x)=cosh(x) and f_{n+1} is the primitive of f_n. - Pierre-Alain Sallard, Dec 15 2018
Sum_{n>=1} 1/a(n) = (e + sinh(1))/2 + cosh(1). - Amiram Eldar, Aug 15 2025

A098777 Pseudo-factorials: a(0)=1, a(n+1) = (-1)^(n+1) * Sum_{k=0..n} binomial(n,k) * a(k)*a(n-k), n>=0.

Original entry on oeis.org

1, -1, -2, 2, 16, -40, -320, 1040, 12160, -52480, -742400, 3872000, 66457600, -411136000, -8202444800, 58479872000, 1335009280000, -10791497728000, -277035646976000, 2502527565824000, 71391934873600000, -712816377856000000, -22367684235100160000, 244597236078018560000
Offset: 0

Author

Roland Bacher, Oct 04 2004

Keywords

Comments

A variation on the usual factorials (which satisfy the recursion (n+1)!=sum('binomial(n,k)*k!*(n-k)!','k'=0..n) for n>=0).
This sequence seems to satisfy an analog of Wilson's Theorem (which states that (p-1)! equals -1 modulo p for p a prime): For p<10000 a prime congruent to 2 modulo 3, we have a(p-1) congruent to 1 mod p and a(n) congruent to 0 mod p for n>p. For p<10000 a prime congruent to 1 mod 3 we have a(p-1)+a(p) congruent to -1 modulo p.
On the analytic side, the sequence is closely related (via its exponential generating series) to the elliptic curve of j-invariant O (corresponding to the regular hexagonal lattice).
This sequence has a generating function expressible in terms of the Dixon elliptic function sm(x,0) whose coefficients are A104133. The ordinary generating function has a continued fraction expansion of Jacobi type: the numerators are -j^2*(2-(-1)^j) and the denominators are (-1)^(j-1)(j+1/2+(-1)^j/2). - Philippe Flajolet and Roland Bacher, Jan 18 2009

Examples

			G.f. = 1 - x - 2*x^2 + 2*x^3 + 16*x^4 - 40*x^5 - 320*x^6 + 1040*x^7 + ...
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (-1)^n*add(
           binomial(n-1, k) *a(k) *a(n-1-k), k=0..n-1))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 22 2018
  • Mathematica
    max = 23; f[z_] = Sum[a[n]*(z^n/n!), {n, 0, max}]; a[0] = 1; a[1] = -1; eq = Rest[ Thread[ CoefficientList[f'[z] + f[-z]^2, z] == 0]]; sol = Solve[ Drop[eq, -max-1]][[1]]; Table[a[n], {n, 0, max}] /. sol (* Jean-François Alcover, Oct 05 2011 *)
    a[0] = 1; a[n_] := a[n] = (-1)^n*Sum[Binomial[n-1, k]*a[k]*a[n-k-1], {k, 0, n-1}]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 15 2015 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 - 3 InverseSeries[ Integrate[ Series[ (1 - 9 x^2)^(-2/3), {x, 0, n}], x]])^(1/3), {x, 0, n}]]; (* Michael Somos, May 22 2018 *)
    Table[SeriesCoefficient[With[{wp = WeierstrassP[z, {0, 4/27}], pd = WeierstrassPPrime[z, {0, 4/27}]}, (2 (2 - 9 pd + 9 wp (2 + 3 pd + 3 wp^2)))/((9 pd + 2 (1 - 3 wp)^2) (2 + 3 wp))], {z, 0, n}] n!, {n, 0, 23}] (* Jan Mangaldan, Jul 07 2020 *)
    nmax = 25; CoefficientList[(1 - 3*InverseSeries[Series[x*Hypergeometric2F1[1/2, 2/3, 3/2, 9*x^2], {x, 0, nmax}]])^(1/3), x] * Range[0, nmax]! (* Vaclav Kotesovec, Jul 07 2020 *)
  • PARI
    a(n)=local(A=1); A=(1-3*serreverse(intformal(1/(1-9*x^2 +x*O(x^n))^(2/3))))^(1/3); n!*polcoeff(A, n)
    for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Apr 10 2014

Formula

The exponential generating function f(z) = Sum_{n>=0} a(n) * z^n/n! satisfies f'(z)=-f(-z)^2 and is an elliptic function with respect to a regular hexagonal lattice (moreover, -f(z)f(-z) is (up to translation) a Weierstrass function.
a(n) = -n!/R^(n+1)*sum(b^(8*p+4*q)/((p-1/2)*b+(q-1/2)/b)^(n+1), p = -infinity..infinity, q = -infinity..infinity), where b = exp(I*Pi/6) and R = 2^(-4/3)/Pi*GAMMA(1/3)^3. - Philippe Flajolet and Roland Bacher, Jan 18 2009
G.f.: 1/Q(0), where Q(k) = 1 + (2*k+1)*x + 3*x^2*(2*k+1)^2/(1 - (2*k+1)*x + x^2*(2*k+2)^2/Q(k+1) ); (continued fraction after P. Flajolet). - Sergei N. Gladkovskii, Dec 05 2013
E.g.f.: (1 - 3*Series_Reversion( Integral 1/(1 - 9*x^2)^(2/3) dx ))^(1/3). - Paul D. Hanna, Apr 10 2014

A092291 Let p = n-th irregular prime, A000928(n). Then a(n) = smallest value of m such that numerator(Bernoulli(2*m)/(2*m)) / numerator(Bernoulli(2*m)/(2*m*(2*m-1))) equals p.

Original entry on oeis.org

574, 1269, 1910, 3384, 1185, 1376, 9611, 4789, 9670, 20946, 13019, 11247, 2689, 22708, 13355, 45251, 48407, 32653, 18761, 38706, 76391, 25563, 50310, 79023, 44948, 29864, 21716, 71441, 104339, 22993, 73572, 61549, 14714, 26122, 6227, 179369, 159687, 5862, 132157, 24925, 76023, 15346, 73479, 136956, 212240, 10587, 3801, 137040, 108520, 194171, 98550, 282532, 87272, 133081, 220187, 305002, 41764, 27268, 380180, 70921, 184940, 241076, 73858, 80108, 250927
Offset: 1

Author

N. J. A. Sloane, based on a suggestion of Roland Bacher, Feb 05 2004

Keywords

Comments

It was conjectured that a(n) = (1 + A000928(n) * (A035112(n) - 1))/2. However, Bernd Kellner's insightful paper shows that this formula first fails for the irregular prime 6449. - T. D. Noe, Feb 10 2004

Crossrefs

Term in A090495 corresponding to first occurrence of p in A090496.

Programs

  • Mathematica
    (* This program is not convenient for a large number of terms *) irregularPrimeQ[p_] := Module[{k = 1}, While[2*k <= p-3 && Mod[ Numerator[ BernoulliB[2*k]], p] != 0, k++]; 2*k <= p-3]; irregularPrime[1] = 37; irregularPrime[n_] := irregularPrime[n] = Module[{p}, For[p = NextPrime[ irregularPrime[n-1]], True, p = NextPrime[p], If[ irregularPrimeQ[p], Return[p]]]]; a[n_] := a[n] = For[m = 1, True, m++, If[ Numerator[BernoulliB[2*m]/(2*m)] / Numerator[ BernoulliB[2*m]/(2*m*(2*m-1))] == irregularPrime[n], Return[m]]]; Table[ Print[a[n]]; a[n], {n, 1, 15}] (* Jean-François Alcover, Sep 27 2013 *)

Extensions

Initial terms were computed by Roland Bacher, Feb 04 2004; further terms from Hans Havermann, Feb 05 2004 and T. D. Noe, Feb 06 2004
Offset modified by Jean-François Alcover, Sep 27 2013

A087809 Number of triangulations (by Euclidean triangles) having 3+3n vertices of a triangle with each side subdivided by n additional points.

Original entry on oeis.org

1, 4, 29, 229, 1847, 14974, 121430, 983476, 7952111, 64193728, 517447289, 4165721377, 33500374796, 269166095800, 2161064409680, 17339917293304, 139060729285871, 1114752741216196, 8933074352513183, 71564554425680839, 573180368696547407, 4589853880027965526, 36748143844815661298, 294180007538192738464
Offset: 0

Author

Roland Bacher, Oct 16 2003

Keywords

Examples

			a(0)=1 since there is only one triangulation of a triangle (consisting of the triangle itself).
The a(1)=4 triangulations of a triangle with each side subdivided by one additional point are given by
.
       O             O
      / \           /|\
     O _ O         O   O
    / \ / \       / \|/ \
   O _ O _ O  ,  O _ O _ O
.
and rotations by 120 degrees and 240 degrees of the last triangulation.
		

Programs

  • Mathematica
    max = 19; f[x_] := Sum[ a[n]*x^n, {n, 0, max}]; a[0] = 1; g[x_] := Sum[ b[n]*x^n, {n, 0, max}]; b[0] = 0; coes = CoefficientList[ Series[ g[x]*(1 - g[x])^2 - x, {x, 0, max}], x]; solb = Solve[ Thread[ coes == 0]][[1]]; coes = CoefficientList[ Series[ f[x] - ((10*g[x]^3 - 17*g[x]^2 + 7*g[x] - 1)/((1 - 3*g[x])*(2*g[x] - 1)*(4*g[x]^2 - 6*g[x] + 1))), {x, 0, max}], x] /. solb; sola = Solve[ Thread[ coes == 0]][[1]]; Table[a[n] /. sola, {n, 0, max}] (* Jean-François Alcover, Dec 06 2011, after Mark van Hoeij *)
  • PARI
    list(lim=20)={my(a=List([1, 4])); for(m=3,lim,my(x=a[#a],y=a[#a-1],n=m-1,q=2*n*(2*n-1)*(5*n^2-29*n+30),z=(-295*n^4+1926*n^3-3425*n^2+2106*n-360)*x+24*(3*n-4)*(3*n-5)*(5*n^2-19*n+6)*y); listput(a,-z/q)); Vec(a)} \\ Bill McEachen, Jun 18 2025
    
  • PARI
    my(x='x+O(x^35), g=serreverse(x*(1-x)^2)); Vec((10*g^3 - 17*g^2 + 7*g - 1)/((1-3*g)*(2*g-1)*(4*g^2 - 6*g+1))) \\ Joerg Arndt, Jun 19 2025

Formula

A formula is given in the Bacher reference.
It seems that a(n) = Sum_{i, j, k>=0} C(n, i+j)*C(n, j+k)*C(n, k+i). - Benoit Cloitre, Oct 25 2004; proved in the article by Asinowski et al.
G.f.: seems to be (10*g^3 - 17*g^2 + 7*g - 1)/((1-3*g)*(2*g-1)*(4*g^2 - 6*g+1)) where g*(1-g)^2 = x. - Mark van Hoeij, Nov 10 2011; proved in the article by Asinowski et al.
Conjecture: 2*n*(2*n-1)*(5*n^2 - 29*n + 30)*a(n) + (-295*n^4 + 1926*n^3 - 3425*n^2 + 2106*n - 360)*a(n-1) + 24*(3*n-4)*(3*n-5)*(5*n^2 - 19*n + 6)*a(n-2) = 0. - R. J. Mathar, Apr 23 2015. Proved by Andrei Asinowski, C. Krattenthaler, T. Mansour, Counting triangulations of balanced subdivisions of convex polygons, 2016.

A085015 Multiplicity of the root 1 in the characteristic polynomial mod 2 of the n X n matrix with entries binomial(i+j,i), 0<=i,j

Original entry on oeis.org

0, 1, 0, 3, 2, 5, 0, 3, 2, 5, 0, 11, 6, 9, 4, 7, 6, 9, 4, 15, 10, 21, 0, 11, 6, 9, 4, 15, 10, 13, 8, 11, 10, 13, 8, 19, 14, 25, 4, 15, 10, 21, 0, 43, 22, 33, 12, 23, 18, 21, 16, 27, 22, 33, 12, 23, 18, 21, 16, 27, 22, 25, 20, 23, 22, 25, 20, 31, 26, 37, 16, 27, 22, 33, 12, 55, 34, 45
Offset: 0

Author

Roland Bacher, Jun 18 2003

Keywords

References

  • R. Bacher and R. Chapman, Symmetric Pascal matrices modulo p, European J. Combin. 25 (2004), no. 4, 459-473.

Programs

  • Maple
    f := (l,n)->if 2^l<(n) then f(l+1,n); else l fi; fo := n->f(0,n); a := n->if n=0 then 0 else (2^fo(n)+2*(-1)^fo(n))/3-(2^fo(n)-n)+2*a(2^fo(n)-n); fi;

Formula

a(0)=0 and a(2^l-k)=(2^l+2*(-1)^l)/3-k+2*a(k) for 0<=k<=2^(l-1).

A084117 Multiplicity of the factor (1+x+x^2) in the characteristic polynomial modulo 2 of the symmetric matrix with entries binomial(i+j,i), 0<=i,j

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 3, 2, 3, 2, 5, 0, 3, 2, 5, 4, 5, 4, 7, 2, 5, 0, 11, 6, 9, 8, 11, 6, 9, 8, 11, 10, 11, 10, 13, 8, 11, 6, 17, 12, 15, 10, 21, 0, 11, 6, 17, 12, 15, 14, 17, 12, 15, 10, 21, 16, 19, 18, 21, 16, 19, 18, 21, 20, 21, 20, 23, 18, 21, 16, 27, 22, 25, 20, 31, 10, 21, 16, 27, 22, 25
Offset: 0

Author

Roland Bacher, Jun 18 2003

Keywords

References

  • R. Bacher and R. Chapman, Symmetric Pascal matrices modulo p, European J. Combin. 25 (2004), no. 4, 459-473.

Crossrefs

Cf. A085015.

Formula

a(2n) = n - a(n). - Ralf Stephan, Oct 07 2003