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.

A259825 a(n) = 12*H(n) where H() is the Hurwitz class number.

Original entry on oeis.org

-1, 0, 0, 4, 6, 0, 0, 12, 12, 0, 0, 12, 16, 0, 0, 24, 18, 0, 0, 12, 24, 0, 0, 36, 24, 0, 0, 16, 24, 0, 0, 36, 36, 0, 0, 24, 30, 0, 0, 48, 24, 0, 0, 12, 48, 0, 0, 60, 40, 0, 0, 24, 24, 0, 0, 48, 48, 0, 0, 36, 48, 0, 0, 60, 42, 0, 0, 12, 48, 0, 0, 84, 36, 0, 0
Offset: 0

Views

Author

Michael Somos, Jul 05 2015

Keywords

Comments

Coefficients of q-expansion of Eisenstein series G_{3/2}(tau) multiplied by 12. - N. J. A. Sloane, Mar 16 2019

Examples

			G.f. = -1 + 4*x^3 + 6*x^4 + 12*x^7 + 12*x^8 + 12*x^11 + 16*x^12 + 24*x^15 + ...
		

Crossrefs

Programs

  • Mathematica
    terms = 100; gf[m_] := With[{r = Range[-m, m]}, -2 Sum[(-1)^k*x^(k^2 + k)/(1 + (-x)^k)^2, {k, r}]/EllipticTheta[3, 0, x] - 2 Sum[(-1)^k*x^(k^2 + 2 k)/(1 + x^(2 k))^2, {k, r}]/EllipticTheta[3, 0, -x]]; gf[terms // Sqrt // Ceiling] + O[x]^terms // CoefficientList[#, x]& (* Jean-François Alcover, Apr 02 2017 *)
    a[ n_] := If[ n<1, -Boole[n==0], With[{m = Floor[(-1 + Sqrt[1 + 4*n])/2]}, -2*SeriesCoefficient[ Sum[(-1)^k*x^(k^2 + k)/(1 + (-x)^k)^2, {k, -m-1,m}] / EllipticTheta[3, 0, x] + Sum[(-1)^k*x^(k^2 + 2*k)/(1 + x^(2*k))^2, {k, -m-2,m}]/ EllipticTheta[3, 0, -x], {x, 0, n}]]]; (* Michael Somos, Feb 04 2022 *)
  • PARI
    {a(n) = 12 * qfbhclassno(n)};
    
  • PARI
    {a(n) = my(D, f); 12 * if( n<1, (n==0)/-12, [D, f] = core(-n, 1); if( D%4>1 && !(f%2), D*=4; f/=2); if( D%4<2, qfbclassno(D) / max(1, D+6), 0) * sumdiv(f, d, moebius(d) * kronecker(D, d) * sigma(f/d)))};

Formula

a(n) = 12 * A058305(n) / A058306(n). a(4*n + 1) = a(4*n + 2) = 0. a(3*n + 4) = 6 * A259827(n).
a(4*n + 3) = 4 * A130695(n). a(8*n + 3) = A005886(n) = 2 * A005869(n) = 4 * A008443(n). a(12*n + 7) = 12 * A259655(n).
a(16*n + 4) = 6 * A045834(n) = 3 * A005876(n). a(16*n + 8) = 12 * A045828(n) = 6 * A005884(n) = 3 * A005877(n).
a(24*n + 3) = 4 * A213627(n). a(24*n + 7) = 12 * A185220(n). a(24*n + 11) = 12 * A213617(n). a(24*n + 19) = 12 * A181648(n). a(24*n + 23) = 12 * A188569(n+1).
a(32*n + 4) = 6 * A213022(n). a(32*n + 8) = 12 * A213625(n). a(32*n + 12) = 16 * A008443(n) = 8 * A005869(n) = 4 * A005886(n) = 2 * A005878(n). a(32*n + 20) = 24 * A045831(n) = 6 * A004024(n). a(32*n + 24) = 24 * A213624(n).
G.f.: -2 * (Sum_{k in Z} (-1)^k * x^(k*k + k) / (1 + (-x)^k)^2) / (Sum_{k in Z} x^k^2) - 2 * (Sum_{k in Z} (-1)^k * x^(k^2 + 2*k) / (1 + x^(2*k))^2) / (Sum_{k in Z} (-x)^k^2).
a(n) >= 0 if n > 0. - Michael Somos, Feb 04 2022

A238872 Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 3, 4, 3, 6, 4, 3, 5, 6, 4, 9, 5, 3, 7, 7, 5, 9, 6, 6, 8, 9, 5, 9, 8, 6, 10, 6, 5, 15, 8, 9, 10, 7, 7, 12, 10, 3, 11, 15, 7, 15, 8, 6, 13, 12, 9, 12, 9, 9, 14, 12, 7, 15, 12, 6, 15, 13, 6, 21, 12, 12, 13, 6, 11, 15, 15, 9, 14, 12, 8, 24, 10, 9
Offset: 0

Views

Author

Joerg Arndt, Mar 21 2014

Keywords

Examples

			The a(33) = 15 such compositions of 33 are:
01:  [ 1 2 3 4 5 6 5 4 3 ]
02:  [ 2 3 4 5 6 7 6 ]
03:  [ 3 4 5 6 5 4 3 2 1 ]
04:  [ 3 4 5 6 7 8 ]
05:  [ 4 5 6 7 6 5 ]
06:  [ 5 6 7 6 5 4 ]
07:  [ 5 6 7 8 7 ]
08:  [ 6 7 6 5 4 3 2 ]
09:  [ 7 8 7 6 5 ]
10:  [ 8 7 6 5 4 3 ]
11:  [ 10 11 12 ]
12:  [ 12 11 10 ]
13:  [ 16 17 ]
14:  [ 17 16 ]
15:  [ 33 ]
G.f. = 1 + x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + 6*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 1, Boole[n == 0], If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
    a[ n_] := If[ n < 1, Boole[n == 0], Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 + (x - x^2 + z - z^2) / 2 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
  • PARI
    \\ generate the compositions
    a(n)=
    {
        if ( n==0, return(1) );
        my( ret=0 );
        my( as, ts );
        for (f=1, n,  \\ first part
            as = 0;
            for (p=f, n, \\ numper of parts in rising half
                as += p; \\ ascending sum
                if ( as > n, break() );
                if ( as == n,  ret+=1;  break() );
                ts = as;  \\ total sum
                forstep (q=p-1, 1, -1,
                    ts += q;  \\ descending sum
                    if ( ts > n, break() );
                    if ( ts == n,  ret+=1;  break() );
                );
            );
        );
        return( ret );
    }
    v=vector(100,n,a(n-1))

Formula

a(2*n) = A130695(2*n) / 3 if n>0. a(2*n + 1) = A130695(2*n + 1) = 3 * H(8*n + 3), where H is the Hurwitz class number, if n>0. - Michael Somos, Jul 04 2015

A260195 Number of integer triples [x, y, z] such that 1 <= min(x,z), max(x,z) <= y, y^2 - (x^2 - x + z^2 - z) / 2 = n.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 3, 4, 3, 6, 4, 3, 5, 6, 4, 9, 5, 3, 7, 7, 5, 9, 6, 6, 8, 9, 5, 9, 8, 6, 10, 6, 5, 15, 8, 9, 10, 7, 7, 12, 10, 3, 11, 15, 7, 15, 8, 6, 13, 12, 9, 12, 9, 9, 14, 12, 7, 15, 12, 6, 15, 13, 6, 21, 12, 12, 13, 6, 11, 15, 15, 9, 14, 12, 8, 24, 10, 9
Offset: 0

Views

Author

Michael Somos, Jul 18 2015

Keywords

Comments

Same as A238872 except a(0) = 0.

Examples

			G.f. = x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9];
    a[ n_] := Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 - (x^2 - x + z^2 - z) / 2 == n}, {x, y, z}, Integers, 10^9];
  • PARI
    {a(n) = my(c, t, i); for(k=1 + sqrtint(max(0, n-1)), n, forstep(j=1, min(2*k, sqrtint(t = 8*k^2 - 8*n + 2)), 2, if( issquare( t - j^2, &i) && i<=2*k, c++))); c};

Formula

a(n) = A238872(n) unless n=0. a(2*n) = A130695(2*n) / 3. a(2*n + 1) = A130695(2*n + 1) = A259825(8*n + 3) / 4 = 3 * H(8*n + 3) where H() is the Hurwitz class number.
Showing 1-3 of 3 results.