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.

Previous Showing 21-30 of 32 results. Next

A047997 Triangle of numbers a(n,k) = number of balance positions when k equal weights are placed at a k-subset of the points {-n, -(n-1), ..., n-1, n} on a centrally pivoted rod.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 8, 12, 1, 5, 13, 24, 32, 1, 6, 18, 43, 73, 94, 1, 7, 25, 69, 141, 227, 289, 1, 8, 32, 104, 252, 480, 734, 910, 1, 9, 41, 150, 414, 920, 1656, 2430, 2934, 1, 10, 50, 207, 649, 1636, 3370, 5744, 8150, 9686, 1, 11, 61, 277, 967
Offset: 1

Views

Author

Keywords

Comments

Also the number of k-subsets of {1..2n-1} with mean n. - Gus Wiseman, Apr 16 2023

Examples

			From _Gus Wiseman_, Apr 18 2023: (Start)
Triangle begins:
    1
    1    2
    1    3    5
    1    4    8   12
    1    5   13   24   32
    1    6   18   43   73   94
    1    7   25   69  141  227  289
    1    8   32  104  252  480  734  910
    1    9   41  150  414  920 1656 2430 2934
Row n = 4 counts the following balanced subsets:
  {0}  {-1,1}  {-1,0,1}   {-3,0,1,2}
       {-2,2}  {-2,0,2}   {-4,0,1,3}
       {-3,3}  {-3,0,3}   {-2,-1,0,3}
       {-4,4}  {-3,1,2}   {-2,-1,1,2}
               {-4,0,4}   {-3,-1,0,4}
               {-4,1,3}   {-3,-1,1,3}
               {-2,-1,3}  {-3,-2,1,4}
               {-3,-1,4}  {-3,-2,2,3}
                          {-4,-1,1,4}
                          {-4,-1,2,3}
                          {-4,-2,2,4}
                          {-4,-3,3,4}
(End)
		

Crossrefs

Last column is a(n,n) = A002838(n).
Row sums are A212352(n) = A047653(n)-1 = A000980(n)/2-1.
A007318 counts subsets by length, A327481 by mean, A013580 by median.
A327475 counts subsets with integer mean.

Programs

  • Mathematica
    a[n_, k_] := Length[ IntegerPartitions[ n*(2k - n + 1)/2, n, Range[2k - n + 1]]]; Flatten[ Table[ a[n, k], {k, 1, 11}, {n, 1, k}]] (* Jean-François Alcover, Jan 02 2012 *)
    Table[Length[Select[Subsets[Range[-n,n]],Length[#]==k&&Total[#]==0&]],{n,8},{k,n}] (* Gus Wiseman, Apr 16 2023 *)

Formula

Equivalent to number of partitions of n(2k-n+1)/2 into up to n parts each no more than 2k-n+1 so a(n, k)=A067059(n, n(2k-n+1)/2); row sums are A047653(n)-1 = A212352(n). - Henry Bottomley, Aug 11 2001

A086394 (-1) times minimal coefficient of the polynomial (1-x)*(1-x^2)*...*(1-x^n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 7, 7, 8, 10, 11, 12, 16, 19, 21, 23, 29, 34, 41, 46, 56, 68, 80, 92, 114, 135, 158, 182, 225, 269, 320, 369, 455, 544, 644, 753, 921, 1111, 1321, 1543, 1891, 2274, 2711, 3183, 3895, 4694, 5591, 6592, 8051, 9729, 11624
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 08 2003

Keywords

Crossrefs

Cf. A086376.
Cf. A025591.

Programs

  • Maple
    p:= proc(n) option remember; expand(
          `if`(n=0, 1, (x^n-1)*p(n-1)))
        end:
    a:= n-> -min(coeffs(p(n))):
    seq(a(n), n=1..80);  # Alois P. Heinz, Apr 12 2017
  • Mathematica
    p[n_] := p[n] = Expand[If[n == 0, 1, (x^n - 1)*p[n - 1]]];
    a[n_] := -Min[CoefficientList[p[n], x]];
    Table[a[n], {n, 1, 80}]; (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
  • PARI
    a(n)=-vecmin(vector(n*(n+1)/2,i,polcoeff(prod(k=1,n,1-x^k),i))) \\ Benoit Cloitre, Sep 12 2003

Extensions

More terms from Benoit Cloitre, Sep 12 2003
Further terms from Sascha Kurz, Sep 22 2003

A133871 a(n) = the definite integral Integral_{0..1} Product_{j=1..n} 4*sin^2(Pi*j*x) dx.

Original entry on oeis.org

2, 4, 6, 10, 12, 20, 24, 34, 44, 64, 78, 116, 148, 208, 286, 410, 556, 808, 1120, 1620, 2308, 3352, 4784, 6980, 10064, 14680, 21296, 31128, 45276, 66288, 96712, 141654, 207156, 303716, 444748, 652612, 956884, 1404920, 2062080, 3029564, 4450120
Offset: 1

Views

Author

Thomas Ward, Jan 07 2008

Keywords

Comments

This quantity arises in some examples associated to the dynamical Mertens's theorem for quasihyperbolic toral automorphisms.
The function being integrated to compute a_n vanishes on the set of points in the Farey sequence of level n. I am particularly interested in knowing how large the sequence is asymptotically.
a(n) = coefficient of x^(n*(n+1)/2) in the polynomial (-1)^n*Product_{k=1..n} (1-x^k)^2, and is the maximal such coefficient as well. - Steven Finch, Feb 03 2009

Examples

			a(2) = 4 since Integral_{0..1} sin^2(Pi*x) sin^2(2*Pi*x) dx = 1/4.
		

Crossrefs

Programs

  • Maple
    a:= n->int(product(4*(sin(Pi*j*x))^2, j=1..n), x=0..1); seq(a(n), n=1..10);
    # second Maple program:
    A133871:= k -> (-1)^k*coeff(mul((t^j-1)^2,j=1..k),t,k*(k+1)/2);
    # Robert Israel, Mar 15 2013
  • Mathematica
    p = 1; Table[p = Expand[p*(1 - x^n)^2]; Max[(-1)^n*CoefficientList[p, x]], {n, 1, 100}] (* Vaclav Kotesovec, May 03 2018 *)
    (* The constant "d" *) Chop[-E^(-I*(Pi^2*(1 + 6*x^2) - 6*PolyLog[2, E^(2*I*Pi*x)]) / (6*Pi*x)) /. x -> (x /. FindRoot[Pi*(Pi*(-1 + 6*x^2) + 12*I*x*Log[1 - E^(2*I*Pi*x)]) + 6*PolyLog[2, E^(2*I*Pi*x)], {x, 4/5}, WorkingPrecision -> 100])] (* Vaclav Kotesovec, May 04 2018 *)
  • PARI
    a(n)=sum(k=0, n*(n+1)/2, polcoeff(prod(m=1, n, 1-x^m+x*O(x^k)), k)^2) \\ Paul D. Hanna

Formula

a(n) = sum of squares of coefficients in Product_{k=1..n} (1-x^k). - Paul D. Hanna, Nov 30 2010
a(n) ~ c * d^n / sqrt(n), where d = 1.48770584269062356180051131... and c = 2.40574583936181024... [Ward, 2013]. - Vaclav Kotesovec, May 03 2018

Extensions

More terms from Steven Finch, Feb 03 2009

A181765 Number of subsets of the interval [-n .. +n] with sums > 0.

Original entry on oeis.org

0, 2, 12, 54, 230, 948, 3860, 15624, 63014, 253588, 1019072, 4091174, 16412668, 65808044, 263755984, 1056789662, 4233176854, 16953418148, 67885557896, 271793651816, 1088059997732, 4355377285932, 17432688395816, 69770793302408, 279227252601884
Offset: 0

Views

Author

Keywords

Comments

a(n) = A000302(n) - A047653(n) = (A004171(n) - A000980(n)) / 2.

Examples

			a(1) = #{{0,1}, {1}} = 2;
a(2) = #{{-2,0,1,2}, {-2,1,2}, {-1,0,1,2}, {-1,0,2}, {-1,1,2}, {-1,2}, {0,1}, {0,1,2}, {0,2}, {1}, {1,2}, {2}} = 12.
		

Programs

  • Haskell
    import Data.List (subsequences)
    a181765 n = length [xs | xs <- subsequences [-n..n], sum xs > 0]
    -- Reinhard Zumkeller, Feb 22 2012, Nov 13 2010

A014225 Number of initial pieces needed to reach level n in the Solitaire Army game.

Original entry on oeis.org

1, 2, 4, 8, 20
Offset: 0

Views

Author

Keywords

Comments

Level 4 is the highest level that can be reached.

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 715.

Crossrefs

Cf. A000980.

A039826 Largest coefficient in expansion of Product_{i=1..n} (1 + q^i + q^(2i)).

Original entry on oeis.org

1, 2, 3, 7, 15, 36, 87, 217, 549, 1423, 3735, 9911, 26513, 71581, 194681, 532481, 1464029, 4045117, 11225159, 31268577, 87404465, 245101771, 689323849, 1943817227, 5494808425, 15568077235, 44200775239, 125739619467, 358347118257, 1022994133467, 2925044957099, 8376049588815, 24018964753341
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A039827.

Programs

  • Mathematica
    nmax = 28; d = {1}; a1 = {};
    Do[
      n0s = Table[0, {n}];
      d = Join[d, n0s, n0s] + Join[n0s, d, n0s] + Join[n0s, n0s, d];
      AppendTo[a1, Last[Union[d]]];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 26 2014 *)
  • PARI
    a(n)=vecmax(Vec(prod(k=1,n,1+x^k+x^(2*k))));
    vector(50,n,a(n)) \\ Joerg Arndt, Jan 31 2024

Formula

a(n) ~ 3^(n+1) / (2*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jul 11 2018

A084239 Rank of K-groups of Furstenberg transformation group C*-algebras of n-torus.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 13, 20, 32, 52, 90, 152, 268, 472, 845, 1520, 2766, 5044, 9277, 17112, 31724, 59008, 110162, 206260, 387282, 729096, 1375654, 2601640, 4929378, 9358944, 17797100, 33904324, 64678112, 123580884, 236413054, 452902072
Offset: 0

Views

Author

Kamran Reihani (reyhan_k(AT)modares.ac.ir), Jun 21 2003

Keywords

Crossrefs

Cf. A000980.

Programs

  • Maple
    A084239 := proc(n)
        local tt,c ;
        if type(n,'odd') then
            product( 1+t^(i-(n+1)/2),i=1..n) ;
        else
            (1+t^(1/2))*product( 1+t^(i-(n+1)/2),i=1..n) ;
        end if;
        tt := expand(%) ;
        for c in tt do
            if c = lcoeff(c) then
                return c ;
            end if;
        end do:
    end proc: # R. J. Mathar, Nov 13 2016
  • Mathematica
    a[n_] := SeriesCoefficient[If[OddQ[n], 1, 1 + Sqrt[t]]*Product[1 + t^(i - (n + 1)/2), {i, n}], {t, 0, 0}];
    Array[a, 36, 0] (* Jean-François Alcover, Nov 24 2017 *)

Formula

a(n) = constant term of prod(i=1, n, 1+t^(i-.5(n+1))) for odd n and a(n) = constant term of (1+t^(.5))*prod(i=1, n, 1+t^(i-.5(n+1))) for even n.
Sums of antidiagonals of A067059, i.e. a(n) is sum over k of number of partitions of [k(n-k)/2] into up to k parts each no more than n-k. Close to 2^(n+1)*sqrt(6/(Pi*n^3)) and seems to be even closer to something like 2^(n+1)*sqrt(6/(Pi*(n^3+0.9*n^2-0.1825*n+1.5))). - Henry Bottomley, Jul 20 2003

Extensions

More terms from Henry Bottomley, Jul 20 2003

A350495 a(n) is the constant term in expansion of Product_{k=1..n} (x^(k^2) + 1/x^(k^2))^2.

Original entry on oeis.org

1, 2, 4, 8, 16, 40, 88, 222, 570, 1564, 4516, 13874, 41866, 137432, 442964, 1492610, 4998674, 17204844, 59175316, 207299554, 727137516, 2582078416, 9179001124, 32943918428, 118453240846, 428937325964, 1556421977612, 5676923326262, 20754245720206
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 28 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand((x^(n^2)+1/x^(n^2))^2*b(n-1)))
        end:
    a:= n-> coeff(b(n),x,0):
    seq(a(n), n=0..28);  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    Table[Coefficient[Product[(x^(k^2) + 1/x^(k^2))^2, {k, 1, n}], x, 0], {n, 0, 30}] (* Vaclav Kotesovec, Feb 05 2022 *)

Formula

Conjecture: a(n) ~ sqrt(5) * 4^n / (sqrt(Pi) * n^(5/2)). - Vaclav Kotesovec, Feb 05 2022

A348639 Number of ways to express n in the form 1 +- 2 +- 3 ... +- n.

Original entry on oeis.org

1, 0, 0, 1, 2, 0, 0, 6, 11, 0, 0, 57, 103, 0, 0, 615, 1131, 0, 0, 7209, 13467, 0, 0, 89261, 168515, 0, 0, 1147893, 2183943, 0, 0, 15181540, 29055149, 0, 0, 205171534, 394497990, 0, 0, 2820847321, 5444272739, 0, 0, 39329485312, 76142226498, 0, 0, 554756557011
Offset: 1

Views

Author

Daniel Cortild, Oct 26 2021

Keywords

Comments

a(n) is the coefficient of x^(n*(n+3)/4-1) of Product_{k=2..n} (1+x^k). - Jianing Song, Nov 19 2021

Crossrefs

Programs

  • C
    int solsN(int n, int k, int sum) { if (n == k) return sum == n; return solsN(n, k+1, sum + k + 1) + solsN(n, k+1, sum - k - 1);}
    int getNumber(int n) { return solsN(n, 1, 1); }
    
  • PARI
    list(n) = my(poly=vector(n), v=vector(n)); poly[1]=1; for(k=2, n, poly[k]=poly[k-1]*(1+'x^k)); for(k=1, n, if(k%4==2||k%4==3, v[k]=0, v[k]=polcoeff(poly[k], k*(k+3)/4-1))); v \\ Jianing Song, Nov 19 2021
  • Python
    from functools import cache
    @cache
    def b(t, s, u): # target, sum, upto
        if u == 1: return int(t == s + 1)
        return b(t, s - u, u - 1) + b(t, s + u, u - 1)
    def a(n): return b(n, 0, n)
    print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Oct 29 2021
    

Extensions

a(30)-a(48) from Michael S. Branicky, Oct 29 2021

A350881 a(n) is the constant term in expansion of Product_{k=1..n} (x^prime(k) + 1/x^prime(k))^2.

Original entry on oeis.org

1, 2, 4, 10, 24, 50, 140, 368, 1152, 3682, 11784, 39902, 134612, 463066, 1635092, 5818384, 20684072, 73693068, 266943648, 967762792, 3533666568, 13036452946, 48102671884, 178315730764, 661567489568, 2450447537226, 9123572154720, 34201574126260
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2022

Keywords

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; `if`(n=0, 1,
          p(n-1)*(x^ithprime(n)+1/x^ithprime(n))^2)
        end:
    a:= n-> coeff(p(n), x, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 26 2022
  • Mathematica
    p[n_] := p[n] = If[n == 0, 1, p[n - 1]*(x^Prime[n] + 1/x^Prime[n])^2];
    a[n_] := Coefficient[p[n], x, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
  • PARI
    a(n) = polcoef (prod(k=1, n, (x^prime(k) + 1/x^prime(k))^2), 0); \\ Michel Marcus, Jan 21 2022
Previous Showing 21-30 of 32 results. Next