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 31-40 of 48 results. Next

A158465 Number of solutions to +-1+-2^4+-3^4+-4^4...+-n^4=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 16, 18, 0, 0, 32, 100, 0, 0, 424, 510, 0, 0, 2792, 5988, 0, 0, 29058, 45106, 0, 0, 276828, 473854, 0, 0, 2455340, 4777436, 0, 0, 27466324, 46429640, 0, 0, 280395282, 526489336, 0, 0, 3193589950, 5661226928, 0, 0
Offset: 1

Views

Author

Pietro Majer, Mar 19 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^16 + 1/x^16)..(x^n^4 + 1/x^n^4).
a(n)=0 for any n=1 (mod 4) or n=2 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. The asymptotic formula below is a conjecture by Andrica & Ionascu; it remains unproven. - Jonathan Sondow, Nov 11 2013

Examples

			For n=16 the a(16) = 2 solutions are +1 +16 +81 +256 -625 -1296 -2401 +4096 +6561 +10000 +14641 +20736 -28561 -38416 -50625 +65536 = 0 and the opposite.
		

Crossrefs

A111253(n) = a(n)/2. - Alois P. Heinz, Oct 31 2011

Programs

  • Maple
    N:=32: p:=1 a:=[]: for n from 32 to N do p:=expand
    (p*(x^(n^4)+x^(-n^4))): a:=[op(a), coeff(p,x,0)]: od:a;

Formula

Integral representation: a(n) = ((2^n)/Pi)*int_0^pi prod_{k=1}^n cos(x*k^4) dx.
Asymptotic formula: a(n) = (2^n)*sqrt(18/(Pi*n^9))*(1+o(1)) as n->infinity; n=-1 or 0 (mod 4).

Extensions

a(35)-a(58) from Alois P. Heinz, Oct 31 2011

A326179 Number of subsets of {1..n} containing n whose product is divisible by their sum.

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 9, 15, 30, 65, 138, 274, 563, 1149, 2441, 5110, 9090, 19645, 37524, 79178, 156697, 324182, 663749, 1353984, 2529510, 5088926, 10686159, 19987129, 40800192, 85303150, 162549135, 341440697, 630392773, 1317158898, 2687152135, 5276362642, 10078384386, 21415439670, 43367751196, 86613992774, 166456115593
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2019

Keywords

Examples

			The a(1) = 1 through a(7) = 15 subsets:
  {1}  {2}  {3}      {4}  {5}          {6}          {7}
            {1,2,3}       {1,4,5}      {3,6}        {1,6,7}
                          {2,3,5}      {2,4,6}      {2,5,7}
                          {3,4,5}      {4,5,6}      {3,4,7}
                          {1,2,3,4,5}  {1,2,3,6}    {3,5,7}
                                       {1,3,5,6}    {1,2,4,7}
                                       {3,4,5,6}    {2,3,6,7}
                                       {1,2,3,4,6}  {2,5,6,7}
                                       {2,3,4,5,6}  {3,5,6,7}
                                                    {1,2,5,6,7}
                                                    {1,3,4,5,7}
                                                    {1,3,4,6,7}
                                                    {2,3,4,5,7}
                                                    {2,4,5,6,7}
                                                    {1,2,3,4,5,6,7}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n],{1,n}],MemberQ[#,n]&&Divisible[Times@@#,Plus@@#]&]],{n,0,10}]

Extensions

a(21)-a(30) from Alois P. Heinz, Jun 13 2019
a(31)-a(40) from Bert Dobbelaere, Jun 23 2019

A326180 Number of maximal subsets of {1..n} containing n whose product is divisible by their sum.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 11, 1, 16, 1, 1, 1, 27, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2019

Keywords

Examples

			The a(6) = 3, a(10) = 11, and a(12) = 16 subsets:
  {1,3,5,6}    {1,2,4,5,6,7,10}      {1,2,3,4,5,6,7,8,12}
  {1,2,3,4,6}  {1,2,3,4,5,7,8,10}    {1,3,4,5,6,7,8,10,12}
  {2,3,4,5,6}  {1,2,3,4,6,7,9,10}    {1,3,4,6,7,8,9,10,12}
               {1,2,3,5,6,7,8,10}    {1,3,4,5,6,8,10,11,12}
               {1,2,3,5,7,8,9,10}    {1,2,3,4,5,6,8,9,10,12}
               {1,2,5,6,7,8,9,10}    {1,2,3,4,6,7,8,9,11,12}
               {1,3,4,5,6,7,9,10}    {1,2,3,5,6,7,8,9,10,12}
               {1,3,4,6,7,8,9,10}    {1,2,3,5,6,7,8,9,11,12}
               {1,4,5,6,7,8,9,10}    {1,3,4,5,6,7,8,9,11,12}
               {1,2,3,4,5,6,8,9,10}  {1,2,3,4,6,7,8,10,11,12}
               {2,3,4,5,6,7,8,9,10}  {1,2,3,4,6,8,9,10,11,12}
                                     {1,3,5,6,7,8,9,10,11,12}
                                     {1,2,3,4,5,6,7,9,10,11,12}
                                     {1,2,3,4,5,7,8,9,10,11,12}
                                     {1,2,4,5,6,7,8,9,10,11,12}
                                     {2,3,4,5,6,7,8,9,10,11,12}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n],{1,n}],MemberQ[#,n]&&Divisible[Times@@#,Plus@@#]&]]],{n,0,10}]

Formula

a(A060462(n)) = 1.

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

Original entry on oeis.org

1, 0, 0, 62, 332, 0, 0, 80006, 531524, 0, 0, 173607568, 1226700784, 0, 0, 455805857978, 3321800235936, 0, 0, 1325490660318216, 9841000101286172, 0, 0, 4108826483323392880, 30886378286619335592, 0, 0, 13306426381421174346512, 100916492010297213463566
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2008

Keywords

Comments

From Robert Israel, Nov 09 2017: (Start)
a(n) is the coefficient of x^(3*n*(n+1)/2) in Product_{k=0..n} (x^(2*k)+1)^3.
a(n) = 0 if n == 1 or 2 (mod 4). (End)

Crossrefs

For constant term in expansion of Product_{ k = 1..n } (x^k + 1/x^k)^q for other values of q see A063865, A047653, A124996.

Programs

  • Maple
    seq(coeff(mul(x^k+1/x^k,k=1..n)^3,x,0),n=0..50); # Robert Israel, Nov 09 2017
  • PARI
    a(n) = polcoef(prod(k=1, n, (x^k + 1/x^k)^3), 0); \\ Michel Marcus, Jan 07 2021

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

Original entry on oeis.org

1, 6, 44, 426, 4658, 55260, 689508, 8914872, 118374410, 1604658420, 22115171280, 308940507202, 4364729023812, 62256518307724, 895294865045296, 12966655239260890, 188967013096930258, 2769003814616561636, 40773380119956434784, 603008173331642200144
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2008

Keywords

Crossrefs

For constant term in expansion of Product_{k=1..n} (x^k + 1/x^k)^q for other values of q see A063865, A047653, A124995.

Programs

  • PARI
    a(n) = polcoef(prod(k=1, n, (x^k + 1/x^k)^4), 0); \\ Michel Marcus, Jan 07 2021

Formula

a(n) ~ sqrt(3) * 16^n / (sqrt(2*Pi) * n^(3/2)). - Vaclav Kotesovec, Jan 07 2021

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

Original entry on oeis.org

1, 0, 4, 62, 4658, 0, 2319512420, 14225426190522, 361926393013029354, 0, 16231015449888734994721650504, 28330316118212024049511095643949434, 200866780133770636272812495083578779133456, 0
Offset: 0

Views

Author

Seiichi Manyama, Dec 23 2021

Keywords

Comments

a(n) is the coefficient of x^(n^2 * (n+1)/2) in Product_{k=0..n} (1 + x^(2*k))^n.

Crossrefs

Programs

  • PARI
    a(n) = polcoef(prod(k=1, n, x^k+1/x^k)^n, 0);
    
  • PARI
    a(n) = polcoef(prod(k=1, n, 1+x^(2*k))^n, n^2*(n+1)/2);

Formula

a(4*n+1) = 0.

A006718 Number of golygons of length 8n.

Original entry on oeis.org

1, 4, 112, 8432, 909288, 121106960, 18167084064, 2956370702688, 510696155882492, 92343039606440064, 17311893232788414400, 3342127071364266721200, 661066887819006986788620, 133456726466163517072371360
Offset: 0

Views

Author

Keywords

Comments

A007219 is the main entry for golygons.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 92.

Crossrefs

See A007219 for much more information about golygons.

Programs

  • Mathematica
    p1[n_] := Product[x^k + 1, {k, 1, n - 1, 2}] // Expand; p2[n_] := Product[x^k + 1, {k, 1, n/2}] // Expand; c[n_] := Coefficient[p1[n], x, n^2/8] * Coefficient[p2[n], x, n (n/2 + 1)/8]; a[n_] := c[8*n]; Table[a[n], {n, 0, 11}] (* Jean-François Alcover, Jul 24 2013, after Eric W. Weisstein *)

Formula

a(n) = 4 * A007219(n) for n > 0. - Charles R Greathouse IV, Apr 29 2012
a(n) = A060468(n) * A292476(2*n) = A063865(4*n) * A292476(2*n). - Seiichi Manyama, Sep 18 2017

Extensions

a(0) = 1 prepended by Seiichi Manyama, Sep 18 2017

A342804 Number of solutions to 1 +-*/ 2 +-*/ 3 +-*/ ... +-*/ n = 0.

Original entry on oeis.org

0, 0, 1, 1, 1, 5, 8, 18, 39, 91, 185, 460, 1051, 2526, 6280, 15645, 35516, 93765, 225989, 611503
Offset: 1

Views

Author

Scott R. Shannon, Mar 27 2021

Keywords

Comments

Normal operator precedence is followed, so multiplication and division are performed before addition or subtraction, and each operator only acts on the following term, so 2 / 3 * 4 equals (2 / 3) * 4.
Unlike A058377, which uses only addition and subtraction, this sequence has solutions for all values of n >= 3.

Examples

			a(3) = 1 as 1 + 2 - 3 = 0 is the only solution.
a(4) = 1 as 1 - 2 - 3 + 4 = 0 is the only solution.
a(5) = 1 as 1 * 2 - 3 - 4 + 5 = 0 is the only solution. This is the first term where a solution exists while no corresponding solution exists in A058377.
a(6) = 5. The solutions, all of which use multiplication or division, are
         1 + 2 * 3 + 4 - 5 - 6 = 0,
         1 - 2 + 3 * 4 - 5 - 6 = 0,
         1 - 2 * 3 + 4 - 5 + 6 = 0,
         1 * 2 + 3 - 4 + 5 - 6 = 0,
         1 - 2 / 3 / 4 - 5 / 6 = 0.
  The last solution is the first that uses division.
a(7) = 8. Six solutions use just addition, division and multiplication. The other two are
         1 + 2 - 3 * 4 * 5 / 6 + 7 = 0,
         1 / 2 * 3 * 4 - 5 + 6 - 7 = 0.
a(15) = 6280. An example solution is
         1 / 2 / 3 / 4 * 5 * 6 - 7 - 8 + 9 / 10 + 11 / 12 * 13 + 14 / 15 = 0
  which includes four fractions that sum to 15, which is balanced by - 7 - 8.
a(20) = 611503. An example solution is
         1 / 2 / 3 / 4 / 5 + 6 / 7 / 8 / 9 / 10 * 11 / 12 - 13 / 14 / 15 / 16
              + 17 / 18 - 19 / 20 = 0
  which sums five fractions that include fourteen divisions.
		

Crossrefs

Cf. A342602 (using +-*), A342995 (using +-/), A058377 (using +-), A063865, A000217, A025591, A161943.

Programs

  • Mathematica
    Table[Length@Select[Tuples[{"+","-","*","/"},k-1],ToExpression[""<>Riffle[ToString/@Range@k,#]]==0&],{k,9}] (* Giorgos Kalogeropoulos, Apr 02 2021 *)
  • Python
    from itertools import product
    from fractions import Fraction
    def a(n):
      nn = ["Fraction("+str(i)+", 1)" for i in range(1, n+1)]
      return sum(eval("".join([*sum(zip(nn, ops+("",)), ())])) == 0 for ops in product("+-*/", repeat=n-1))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Apr 02 2021

A015818 Number of solutions of +- 1 +- 2 +- ... +- (n-1) +- n = 0 in which the partial sums +- 1 +- ... +- k (1<=k<=n) are all distinct.

Original entry on oeis.org

1, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 10, 14, 0, 0, 36, 40, 0, 0, 134, 258, 0, 0, 702, 1040, 0, 0, 4170, 5996, 0, 0, 23642, 36616, 0, 0, 140500, 217002, 0, 0, 852132, 1374692, 0, 0, 5411800, 8852230, 0, 0, 35764246, 56370054, 0, 0, 232969442, 376479130, 0, 0, 1555855594, 2534308444
Offset: 0

Views

Author

Keywords

Comments

If n==1 or 2 (mod 4) then a(n)=0.

Examples

			For n=4 there are 2 solutions: +1-2-3+4=0 and -1+2+3-4=0.
		

Crossrefs

a(n) <= A063865(n).

Programs

  • PARI
    issol(i, n) = {b = binary(i); while(length(b) < n, b = concat(0, b)); if (! sum(k=1, n, if (b[k], k, -k)), vsp = []; lastnb = 0; for (j=1, n, vsp = Set(concat(vsp, sum(k=1, j, if (b[k], k, -k)))); if (#vsp == lastnb, return (0)); lastnb = #vsp;); return (1););}
    a(n) = if ((!n) || ((n % 4) != 1) && ((n % 4) != 2), sum(i=0, 2^n-1, issol(i, n)));  \\ Michel Marcus, May 22 2014

Extensions

a(36)-a(46) from Ray Chandler, Nov 29 2008
a(47)-a(58) from Sean A. Irvine, Dec 13 2018

A113036 Number of solutions to +- 1 +- 2 +- .. +- n = 2.

Original entry on oeis.org

0, 0, 0, 1, 2, 0, 0, 8, 13, 0, 0, 69, 123, 0, 0, 719, 1313, 0, 0, 8215, 15260, 0, 0, 99774, 187615, 0, 0, 1264854, 2399207, 0, 0, 16544234, 31587644, 0, 0, 221625505, 425313967, 0, 0, 3025271756, 5829531261, 0, 0, 41929052284, 81066732018, 0
Offset: 0

Views

Author

Floor van Lamoen, Oct 11 2005

Keywords

Crossrefs

Programs

  • Maple
    A113036:= proc(n) local i,j,p,t; t:= NULL; for j to n do p:=1; for i to j do p:=p*(x^(-i)+x^i); od; t:=t,coeff(p,x,2); od; t; end;
  • Mathematica
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2] + 2;
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 14 2014 *)

Formula

a(n) is the coefficient of x^2 in product(x^(-k)+x^k, k=1..n).
Previous Showing 31-40 of 48 results. Next