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-10 of 51 results. Next

A070937 Number of times maximal coefficient (A025591) appears in Product_{k<=n} (x^k + 1), i.e., number of times highest value appears in n-th row of A053632 or n-th column of A070936.

Original entry on oeis.org

1, 2, 4, 1, 5, 6, 4, 5, 1, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1
Offset: 0

Views

Author

Henry Bottomley, May 12 2002

Keywords

Examples

			a(4)=5 since Product_{k<=4} (x^k + 1) = 1 + x + x^2 + 2x^3 + 2x^4 + 2x^5 + 2x^6 + 2x^7 + x^8 + x^9 + x^10 and 2 appears as a coefficient 5 times.
		

Formula

If n mod 4 = 0 or 3 then a(n) odd, otherwise a(n) even.
For n > 9: a(n) = A014695(n).
From Chai Wah Wu, Apr 10 2021: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 12.
G.f.: (2*x^12 - 2*x^11 + 6*x^10 - 4*x^9 + 6*x^8 - 2*x^7 - 2*x^6 + 2*x^5 - 6*x^4 + 2*x^3 - 3*x^2 - x - 1)/((x - 1)*(x^2 + 1)). (End)

A079058 Least k > 0 such that A025591(k) >= p(n) (p(n)=the n-th partition number).

Original entry on oeis.org

1, 3, 5, 6, 7, 8, 9, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30
Offset: 1

Views

Author

Benoit Cloitre, Feb 02 2003

Keywords

Crossrefs

Cf. A000041.

Programs

  • PARI
    a(n)=if(n<0,0,k=1; while(polcoeff(prod(i=1,k,1+x^i),k*(k+1)\4)-polcoeff(1/eta(x),n)<0,k++); k)

Formula

a(n) is asymptotic to C*sqrt(n) with 3.5

Extensions

Name corrected by Sean A. Irvine, Jul 28 2025

A053632 Irregular triangle read by rows giving coefficients in expansion of Product_{k=1..n} (1 + x^k).

Original entry on oeis.org

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

Author

N. J. A. Sloane, Mar 22 2000

Keywords

Comments

Or, triangle T(n,k) read by rows, giving number of subsets of {1,2,...,n} with sum k. - Roger CUCULIERE (cuculier(AT)imaginet.fr), Nov 19 2000
Row n consists of A000124(n) terms. These are also the successive vectors (their nonzero elements) when one starts with the infinite vector (of zeros) with 1 inserted somewhere and then shifts it one step (right or left) and adds to the original, then shifts the result two steps and adds, three steps and adds, etc. - Antti Karttunen, Feb 13 2002
T(n,k) = number of partitions of k into distinct parts <= n. Triangle of distribution of Wilcoxon's signed rank statistic. - Mitch Harris, Mar 23 2006
T(n,k) = number of binary words of length n in which the sum of the positions of the 0's is k. Example: T(4,5)=2 because we have 0110 (sum of the positions of the 0's is 1+4=5) and 1001 (sum of the positions of the 0's is 2+3=5). - Emeric Deutsch, Jul 23 2006
A fair coin is flipped n times. You receive i dollars for a "success" on the i-th flip, 1<=i<=n. T(n,k)/2^n is the probability that you will receive exactly k dollars. Your expectation is n(n+1)/4 dollars. - Geoffrey Critzer, May 16 2010
From Gus Wiseman, Jan 02 2023: (Start)
With offset 1, also the number of integer compositions of n whose partial sums add up to k for k = n..n(n+1)/2. For example, row n = 6 counts the following compositions:
6 15 24 33 42 51 141 231 321 411 1311 2211 3111 12111 21111 111111
114 123 132 222 312 1131 1221 2121 11121 11211
213 1113 1122 1212 2112 1111
(End)

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1, 1, 1;
  1, 1, 1, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 1;
  1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1;
  ...
Row n = 4 counts the following binary words, where k = sum of positions of zeros:
  1111  0111  1011  0011  0101  0110  0001  0010  0100  1000  0000
                    1101  1110  1001  1010  1100
Row n = 5 counts the following strict partitions of k with all parts <= n (0 is the empty partition):
  0  1  2  3  4  5  42  43  53  54  532  542  543  5431 5432 54321
           21 31 32 51  52  431 432 541  5321 5421
                 41 321 421 521 531 4321
		

References

  • A. V. Yurkin, New binomial and new view on light theory, (book), 2013, 78 pages, no publisher listed.

Crossrefs

Rows reduced modulo 2 and interpreted as binary numbers: A068052, A068053. Rows converge towards A000009.
Row sums give A000079.
Cf. A285101 (multiplicative encoding of each row), A285103 (number of odd terms on row n), A285105 (number of even terms).
Row lengths are A000124.
A reciprocal version is (A033999, A219977, A291983, A291984, A291985, ...).
A negative version is A231599.
A version for partitions is A358194, reversed partitions A264034.

Programs

  • Maple
    with(gfun,seriestolist); map(op,[seq(seriestolist(series(mul(1+(z^i), i=1..n),z,binomial(n+1,2)+1)), n=0..10)]); # Antti Karttunen, Feb 13 2002
    # second Maple program:
    g:= proc(n) g(n):= `if`(n=0, 1, expand(g(n-1)*(1+x^n))) end:
    T:= n-> seq(coeff(g(n), x, k), k=0..degree(g(n))):
    seq(T(n), n=0..10);  # Alois P. Heinz, Nov 19 2012
  • Mathematica
    Table[CoefficientList[ Series[Product[(1 + t^i), {i, 1, n}], {t, 0, 100}], t], {n, 0, 8}] // Grid (* Geoffrey Critzer, May 16 2010 *)

Formula

From Mitch Harris, Mar 23 2006: (Start)
T(n,k) = T(n-1, k) + T(n-1, k-n), T(0,0)=1, T(0,k) = 0, T(n,k) = 0 if k < 0 or k > (n+1 choose 2).
G.f.: (1+x)*(1+x^2)*...*(1+x^n). (End)
Sum_{k>=0} k * T(n,k) = A001788(n). - Alois P. Heinz, Feb 09 2017
max_{k>=0} T(n,k) = A025591(n). - Alois P. Heinz, Jan 20 2023

A063865 Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 0.

Original entry on oeis.org

1, 0, 0, 2, 2, 0, 0, 8, 14, 0, 0, 70, 124, 0, 0, 722, 1314, 0, 0, 8220, 15272, 0, 0, 99820, 187692, 0, 0, 1265204, 2399784, 0, 0, 16547220, 31592878, 0, 0, 221653776, 425363952, 0, 0, 3025553180, 5830034720, 0, 0, 41931984034, 81072032060, 0, 0
Offset: 0

Author

N. J. A. Sloane, suggested by J. H. Conway, Aug 27 2001

Keywords

Comments

Number of sum partitions of the half of the n-th-triangular number by distinct numbers in the range 1 to n. Example: a(7)=8 since triangular(7)=28 and 14 = 2+3+4+5 = 1+3+4+6 = 1+2+5+6 = 3+5+6 = 7+1+2+4 = 7+3+4 = 7+2+5 = 7+1+6. - Hieronymus Fischer, Oct 20 2010
The asymptotic formula below was stated as a conjecture by Andrica & Tomescu in 2002 and proved by B. D. Sullivan in 2013. See his paper and H.-K. Hwang's review MR 2003j:05005 of the JIS paper. - Jonathan Sondow, Nov 11 2013
a(n) is the number of subsets of {1..n} whose sum is equal to the sum of their complement. See example below. - Gus Wiseman, Jul 04 2019

Examples

			From _Gus Wiseman_, Jul 04 2019: (Start)
For example, the a(0) = 1 through a(8) = 14 subsets (empty columns not shown) are:
  {}  {3}    {1,4}  {1,6,7}    {3,7,8}
      {1,2}  {2,3}  {2,5,7}    {4,6,8}
                    {3,4,7}    {5,6,7}
                    {3,5,6}    {1,2,7,8}
                    {1,2,4,7}  {1,3,6,8}
                    {1,2,5,6}  {1,4,5,8}
                    {1,3,4,6}  {1,4,6,7}
                    {2,3,4,5}  {2,3,5,8}
                               {2,3,6,7}
                               {2,4,5,7}
                               {3,4,5,6}
                               {1,2,3,4,8}
                               {1,2,3,5,7}
                               {1,2,4,5,6}
(End)
		

Crossrefs

"Decimations": A060468 = 2*A060005, A123117 = 2*A104456.
Analogous sequences for sums of squares and cubes are A158092, A158118, see also A019568. - Pietro Majer, Mar 15 2009

Programs

  • Maple
    M:=400; t1:=1; lprint(0,1); for n from 1 to M do t1:=expand(t1*(x^n+1/x^n)); lprint(n, coeff(t1,x,0)); od: # N. J. A. Sloane, Jul 07 2008
  • Mathematica
    f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[ n-1, s-n]+f[n-1, s+n]]; a[n_] := f[n, 0]
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/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 13 2014 *)
  • PARI
    a(n)=my(x='x); polcoeff(prod(k=1,n,x^k+x^-k)+O(x),0) \\ Charles R Greathouse IV, May 18 2015
    
  • PARI
    a(n)=0^n+floor(prod(k=1,n,2^(n*k)+2^(-n*k)))%(2^n) \\ Tani Akinari, Mar 09 2016

Formula

Asymptotic formula: a(n) ~ sqrt(6/Pi)*n^(-3/2)*2^n for n = 0 or 3 (mod 4) as n approaches infinity.
a(n) = 0 unless n == 0 or 3 (mod 4).
a(n) = constant term in expansion of Product_{ k = 1..n } (x^k + 1/x^k). - N. J. A. Sloane, Jul 07 2008
If n = 0 or 3 (mod 4) then a(n) = coefficient of x^(n(n+1)/4) in Product_{k=1..n} (1+x^k). - D. Andrica and I. Tomescu.
a(n) = 2*A058377(n) for any n > 0. - Rémy Sigrist, Oct 11 2017

Extensions

More terms from Dean Hickerson, Aug 28 2001
Corrected and edited by Steven Finch, Feb 01 2009

A083309 a(n) is the number of times that sums 3 +- 5 +- 7 +- 11 +- ... +- prime(2n+1) of the first 2n odd primes is zero. There are 2^(2n-1) choices for the sign patterns.

Original entry on oeis.org

0, 0, 1, 2, 7, 19, 63, 197, 645, 2172, 7423, 25534, 89218, 317284, 1130526, 4033648, 14515742, 52625952, 191790090, 702333340, 2585539586, 9570549372, 35562602950, 131774529663, 491713178890, 1842214901398, 6909091641548
Offset: 1

Author

T. D. Noe, Apr 29 2003

Keywords

Comments

The frequency of each possible sum is computed by the Mathematica program without explicitly computing the individual sums. Let S = 3 + 5 + 7 + ... + prime(2n+1). Because the primes do not grow very fast, it is easy to show that, for n > 2, all even numbers between -S+20 and S-20 occur at least once as a sum.
a(n) is the maximal number of subsets of {prime(2), prime(3), ..., prime(n+1)} that share the same sum. Cf. A025591, A083527.
See A238894 for a more general sequence that looks at all sums formed. - T. D. Noe, Mar 07 2014

Examples

			a(3) = 1 because there is only one sign pattern of the first six odd primes that yields zero: 3 + 5 + 7 - 11 + 13 - 17.
		

Crossrefs

Cf. A022894 (use all primes in the sum), A022895 (r.h.s. = 1), A022896 (r.h.s. = 2), A022897 (interleaved 0 for odd number of terms), ..., A022903 (using primes >= 7), A022904, A022920; A261061 - A261063 and A261044 (r.h.s. = -1); A261057, A261059, A261060, A261045 (r.h.s. = -2).

Programs

  • Mathematica
    d={1, 0, 0, 1}; nMax=32; zeroLst={}; Do[p=Prime[n+1]; d=PadLeft[d, Length[d]+p]+PadRight[d, Length[d]+p]; If[0==Mod[n, 2], AppendTo[zeroLst, d[[(Length[d]+1)/2]]]], {n, 2, nMax}]; zeroLst/2
  • PARI
    A083309(n, rhs=0, firstprime=2)={rhs-=prime(firstprime); my(p=vector(2*n-2+bittest(rhs, 0), i, prime(i+firstprime))); sum(i=1, 2^#p-1, sum(j=1, #p, (-1)^bittest(i, j-1)*p[j])==rhs)} \\ For illustrative purpose, too slow for n >> 10. - M. F. Hasler, Aug 08 2015

Formula

a(n) = A022897(2n). - M. F. Hasler, Aug 08 2015

A047653 Constant term in expansion of (1/2) * Product_{k=-n..n} (1 + x^k).

Original entry on oeis.org

1, 2, 4, 10, 26, 76, 236, 760, 2522, 8556, 29504, 103130, 364548, 1300820, 4679472, 16952162, 61790442, 226451036, 833918840, 3084255128, 11451630044, 42669225172, 159497648600, 597950875256, 2247724108772, 8470205600640, 31991616634296, 121086752349064
Offset: 0

Keywords

Comments

Or, constant term in expansion of Product_{k=1..n} (x^k + 1/x^k)^2. - N. J. A. Sloane, Jul 09 2008
Or, maximal coefficient of the polynomial (1+x)^2 * (1+x^2)^2 *...* (1+x^n)^2.
a(n) = A000302(n) - A181765(n).
From Gus Wiseman, Apr 18 2023: (Start)
Also the number of subsets of {1..2n} that are empty or have mean n. The a(0) = 1 through a(3) = 10 subsets are:
{} {} {} {}
{1} {2} {3}
{1,3} {1,5}
{1,2,3} {2,4}
{1,2,6}
{1,3,5}
{2,3,4}
{1,2,3,6}
{1,2,4,5}
{1,2,3,4,5}
Also the number of subsets of {-n..n} with no 0's but with sum 0. The a(0) = 1 through a(3) = 10 subsets are:
{} {} {} {}
{-1,1} {-1,1} {-1,1}
{-2,2} {-2,2}
{-2,-1,1,2} {-3,3}
{-3,1,2}
{-2,-1,3}
{-2,-1,1,2}
{-3,-1,1,3}
{-3,-2,2,3}
{-3,-2,-1,1,2,3}
(End)

Crossrefs

Cf. A025591.
Cf. A053632; variant: A127728.
For median instead of mean we have A079309(n) + 1.
Odd bisection of A133406.
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A007318 counts subsets by length, A327481 by mean.

Programs

  • Maple
    f:=n->coeff( expand( mul((x^k+1/x^k)^2,k=1..n) ),x,0);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,
          `if`(i=0, 1, 2*b(n, i-1)+b(n+i, i-1)+b(abs(n-i), i-1)))
        end:
    a:=n-> b(0, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Mar 10 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n>i*(i+1)/2, 0, If[i == 0, 1, 2*b[n, i-1]+b[n+i, i-1]+b[Abs[n-i], i-1]]]; a[n_] := b[0, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 10 2014, after Alois P. Heinz *)
    nmax = 26; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2];
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n] +
        2 PadLeft[PadRight[d, Length[d] + n], Length[d] + 2 n];
    , {n, nmax}];
    a1 (* Ray Chandler, Mar 15 2014 *)
    Table[Length[Select[Subsets[Range[2n]],Length[#]==0||Mean[#]==n&]],{n,0,6}] (* Gus Wiseman, Apr 18 2023 *)
  • PARI
    a(n)=polcoeff(prod(k=-n,n,1+x^k),0)/2
    
  • 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, Nov 30 2010

Formula

Sum of squares of coefficients in Product_{k=1..n} (1+x^k):
a(n) = Sum_{k=0..n(n+1)/2} A053632(n,k)^2. - Paul D. Hanna, Nov 30 2010
a(n) = A000980(n)/2.
a(n) ~ sqrt(3) * 4^n / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Sep 11 2014
From Gus Wiseman, Apr 18 2023 (Start)
a(n) = A133406(2n+1).
a(n) = A212352(n) + 1.
a(n) = A362046(2n) + 1.
(End)

Extensions

More terms from Michael Somos, Jun 10 2000

A058377 Number of solutions to 1 +- 2 +- 3 +- ... +- n = 0.

Original entry on oeis.org

0, 0, 1, 1, 0, 0, 4, 7, 0, 0, 35, 62, 0, 0, 361, 657, 0, 0, 4110, 7636, 0, 0, 49910, 93846, 0, 0, 632602, 1199892, 0, 0, 8273610, 15796439, 0, 0, 110826888, 212681976, 0, 0, 1512776590, 2915017360, 0, 0, 20965992017, 40536016030, 0, 0, 294245741167
Offset: 1

Author

Naohiro Nomoto, Dec 19 2000

Keywords

Comments

Consider the set { 1,2,3,...,n }. Sequence gives number of ways this set can be partitioned into 2 subsets with equal sums. For example, when n = 7, { 1,2,3,4,5,6,7} can be partitioned in 4 ways: {1,6,7} {2,3,4,5}; {2,5,7} {1,3,4,6}; {3,4,7} {1,2,5,6} and {1,2,4,7} {3,5,6}. - sorin (yamba_ro(AT)yahoo.com), Mar 24 2007
The "equal sums" of Sorin's comment are the positive terms of A074378 (Even triangular numbers halved). In the current sequence a(n) <> 0 iff n is the positive index (A014601) of an even triangular number (A014494). - Rick L. Shepherd, Feb 09 2010
a(n) is the number of partitions of n(n-3)/4 into distinct parts not exceeding n-1. - Alon Amit, Oct 18 2017
a(n) is the coefficient of x^(n*(n+1)/4-1) of Product_{k=2..n} (1+x^k). - Jianing Song, Nov 19 2021

Examples

			1+2-3=0, so a(3)=1;
1-2-3+4=0, so a(4)=1;
1+2-3+4-5-6+7=0, 1+2-3-4+5+6-7=0, 1-2+3+4-5+6-7=0, 1-2-3-4-5+6+7=0, so a(7)=4.
		

Programs

  • Maple
    b:= proc(n, i) option remember; local m; m:= i*(i+1)/2;
          `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i), i-1) +b(n+i, i-1)))
        end:
    a:= n-> `if`(irem(n-1, 4)<2, 0, b(n, n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Oct 30 2011
  • Mathematica
    f[n_, s_] := f[n, s] = Which[n == 0, If[s == 0, 1, 0], Abs[s] > (n*(n + 1))/2, 0, True, f[n - 1, s - n] + f[n - 1, s + n]]; Table[ f[n, 0]/2, {n, 1, 50}]
  • 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==1||k%4==2, v[k]=0, v[k]=polcoeff(poly[k], k*(k+1)/4-1))); v \\ Jianing Song, Nov 19 2021

Formula

a(n) is half the coefficient of q^0 in product('(q^(-k)+q^k)', 'k'=1..n) for n >= 1. - Floor van Lamoen, Oct 10 2005
a(4n+1) = a(4n+2) = 0. - Michael Somos, Apr 15 2007
a(n) = [x^n] Product_{k=1..n-1} (x^k + 1/x^k). - Ilya Gutkovskiy, Feb 01 2024

Extensions

More terms from Sascha Kurz, Mar 25 2002
Edited and extended by Robert G. Wilson v, Oct 24 2002

A063866 Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = 1.

Original entry on oeis.org

0, 1, 1, 0, 0, 3, 5, 0, 0, 23, 40, 0, 0, 221, 397, 0, 0, 2410, 4441, 0, 0, 28460, 53222, 0, 0, 353743, 668273, 0, 0, 4559828, 8679280, 0, 0, 60400688, 115633260, 0, 0, 817175698, 1571588177, 0, 0, 11243980807, 21704569869, 0, 0, 156860869714
Offset: 0

Author

N. J. A. Sloane, following a suggestion by J. H. Conway, Aug 27 2001

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[ n-1, s-n]+f[n-1, s+n]]; a[n_] := f[n, 1]
    nmax = 50; d = {1}; a1 = {};
    Do[
      i = Ceiling[Length[d]/2] + 1;
      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) equals the coefficient of x in Product_{k=1..n} (x^k + 1/x^k). - Paul D. Hanna, Jul 10 2018

Extensions

More terms from Dean Hickerson and Vladeta Jovovic, Aug 28 2001

A086376 Maximal coefficient of the polynomial (1-x)*(1-x^2)*...*(1-x^n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 3, 3, 4, 6, 5, 6, 7, 8, 8, 10, 11, 16, 16, 18, 21, 28, 29, 34, 41, 50, 56, 66, 80, 100, 114, 131, 158, 196, 225, 263, 320, 388, 455, 532, 644, 786, 921, 1083, 1321, 1600, 1891, 2218, 2711, 3280, 3895, 4588, 5591, 6780, 8051, 9519, 11624
Offset: 0

Author

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

Keywords

Crossrefs

Programs

  • Maple
    A086376 := proc(n)
            g := expand(mul( 1-x^k,k=1..n) );
            convert(PolynomialTools[CoefficientVector](g, x), list):
            max(%);
    end proc:
    seq(A086376(n),n=0..60) ; # R. J. Mathar, Jun 01 2011
  • Mathematica
    b[0] = 1; b[n_] := b[n] = b[n-1]*(1-x^n) // Expand;
    a[n_] := CoefficientList[b[n], x] // Max;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 13 2017 *)
  • PARI
    a(n)=vecmax(Vec(prod(k=1,n,1-x^k)));
    vector(100,n,a(n-1)) \\ Joerg Arndt, Jan 31 2024

Extensions

More terms from Sascha Kurz, Sep 22 2003
a(0)=1 prepended by Alois P. Heinz, Apr 12 2017

A063890 Number of solutions to +- 1 +- 2 +- 3 +- ... +- n = n.

Original entry on oeis.org

1, 1, 0, 0, 2, 3, 0, 0, 12, 21, 0, 0, 113, 202, 0, 0, 1218, 2241, 0, 0, 14326, 26776, 0, 0, 177714, 335607, 0, 0, 2287975, 4353975, 0, 0, 30282850, 57965473, 0, 0, 409476546, 787414730, 0, 0, 5631955466, 10870618388, 0, 0, 78545902971, 152074824054, 0, 0
Offset: 0

Author

Vladeta Jovovic, Aug 28 2001

Keywords

Examples

			a(8) = 12 because 8 = 1+2+3+4+5-6+7-8 = -1+2+3+4-5+6+7-8 = 1-2+3-4+5+6+7-8 = -1-2-3+4+5+6+7-8 = -1+2+3+4+5-6-7+8 = 1-2+3+4-5+6-7+8 = 1+2-3-4+5+6-7+8 = -1-2+3-4+5+6-7+8 = 1+2-3+4-5-6+7+8 = -1-2+3+4-5-6+7+8 = -1+2-3-4+5-6+7+8 = 1-2-3-4-5+6+7+8.
		

Crossrefs

Programs

  • Mathematica
    f[n_, s_] := f[n, s]=Which[n==0, If[s==0, 1, 0], Abs[s]>(n*(n+1))/2, 0, True, f[n-1, s-n]+f[n-1, s+n]]; a[n_] := f[n, n]
    nmax = 44; d = {1}; a1 = {1};
    Do[
      d = PadLeft[d, Length[d] + 2 n] + PadRight[d, Length[d] + 2 n];
      i = Ceiling[Length[d]/2] + n;
      AppendTo[a1, If[i > Length[d], 0, d[[i]]]];
      , {n, nmax}];
    a1 (* Ray Chandler, Mar 25 2014 *)

Formula

a(n) = [x^n] Product_{k=1..n} (x^k + 1/x^k). - Ilya Gutkovskiy, Jan 28 2022

Extensions

More terms from Dean Hickerson, Aug 30 2001
Showing 1-10 of 51 results. Next