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 17 results. Next

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

Views

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

A083527 a(n) is the number of times that sums 1+-4+-9+-16+-...+-n^2 of the first n squares is zero. There are 2^(n-1) choices for the sign patterns.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 5, 0, 0, 43, 57, 0, 0, 239, 430, 0, 0, 2904, 5419, 0, 0, 27813, 50213, 0, 0, 348082, 649300, 0, 0, 3913496, 7287183, 0, 0, 50030553, 93696497, 0, 0, 611793542, 1161079907, 0, 0, 8009933135, 15176652567, 0, 0
Offset: 1

Views

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.
a(n) is the maximal number of subsets of the first n squares that share the same sum. Cf. A025591, A083309.
a(n)=0 when n==1 or 2 (mod 4).

Examples

			a(7) = 1 because there is only one sign pattern of the first seven squares that yields zero: 1+4-9+16-25-36+49.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local m;
          m:= (1+(3+2*i)*i)*i/6;
          `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i^2), i-1) +b(n+i^2, i-1)))
        end:
    a:= n-> `if`(irem(n-1, 4)<2, 0, b(n^2, n-1)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Oct 31 2011
  • Mathematica
    d={1, 1}; nMax=60; zeroLst={0}; Do[p=n^2; d=PadLeft[d, Length[d]+p]+PadRight[d, Length[d]+p]; If[1==Mod[Length[d], 2], AppendTo[zeroLst, d[[(Length[d]+1)/2]]], AppendTo[zeroLst, 0]], {n, 2, nMax}]; zeroLst/2
    p = 1; t = {}; Do[p = Expand[p(x^(n^2) + x^(-n^2))]; AppendTo[t, Select[p, NumberQ[ # ] &]/2], {n, 51}]; t (* Robert G. Wilson v, Oct 31 2005 *)
  • PARI
    a(n)=sum(i=0,2^(n-1)-1,sum(j=1,n-1,(-1)^bittest(i,j-1)*j^2)==n^2) \\ Charles R Greathouse IV, Nov 05 2012

Formula

a(n) is half the coefficient of x^0 in the product_{k=1..n} x^(k^2)+x^(k^-2).
a(n) = A158092(n)/2.
a(n) = [x^(n^2)] Product_{k=1..n-1} (x^(k^2) + 1/x^(k^2)). - Ilya Gutkovskiy, Feb 01 2024

A158118 Number of solutions of +-1+-2^3+-3^3..+-n^3=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 4, 2, 0, 0, 4, 124, 0, 0, 536, 712, 0, 0, 4574, 2260, 0, 0, 10634, 73758, 0, 0, 406032, 638830, 0, 0, 4249160, 3263500, 0, 0, 21907736, 82561050, 0, 0, 485798436, 945916970, 0, 0, 5968541478, 6839493576, 0, 0
Offset: 1

Views

Author

Pietro Majer, Mar 12 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^8 + 1/x^8)..(x^n^3 + 1/x^n^3).
a(n) = 0 for any n=1 (mod 4) or n=2 (mod 4).
The expansion above and the integral representation formula below are due to Andrica & Tomescu. The asymptotic formula is a conjecture; see Andrica & Ionascu. - Jonathan Sondow, Nov 06 2013

Examples

			Example: For n=12 the a(12) = 2 solutions are:
+1+8-27+64-125-216-343+512+729-1000-1331+1728=0,
-1-8+27-64+125+216+343-512-729+1000+1331-1728=0.
		

Crossrefs

Equals twice A113263.
Cf. A063865, A158092, A019568. - Pietro Majer, Mar 15 2009

Programs

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

Formula

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

A158380 Number of solutions to +-1 +- 3 +- 6 +- ... +- n(n+1)/2 = 0.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 2, 2, 4, 0, 12, 16, 26, 0, 66, 104, 210, 0, 620, 970, 1748, 0, 5948, 10480, 18976, 0, 60836, 111430, 209460, 0, 704934, 1284836, 2387758, 0, 8331820, 15525814, 28987902, 0, 101242982, 190267598, 358969426, 0, 1275032260, 2404124188, 4547419694
Offset: 0

Views

Author

Pietro Majer, Mar 17 2009

Keywords

Comments

Equivalently, number of partitions of the set of the first n triangular numbers {t(1),...,t(n)} into two classes with equal sums.
Constant term in the expansion of (x + 1/x)(x^3 + 1/x^3)...(x^t(n) + 1/x^t(n)).
a(n) = 0 for all n == 1 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. - Jonathan Sondow, Nov 11 2013

Examples

			For n=6 the 2 solutions are +1-3+6-10-15+21 = 0 and -1+3-6+10+15-21 = 0.
		

Crossrefs

Programs

  • Maple
    N:=70: p:=1: a:=[]: for n from 0 to N do
    p:=expand(p*(x^(n*(n+1)/2)+x^(-n*(n+1)/2))):
    a:=[op(a), coeff(p, x, 0)]: od:a;
    # second Maple program:
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0,
          `if`(n=m, 1, b(abs(n-i*(i+1)/2), i-1)+
          b(n+i*(i+1)/2, i-1))))((2+(3+i)*i)*i/6)
        end:
    a:= n-> `if`(irem(n, 4)=1, 0, b(0, n)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Sep 17 2017
  • Mathematica
    a[n_] := With[{t = Table[k(k+1)/2, {k, 1, n}]}, Coefficient[Times @@ (x^t + 1/x^t), x, 0]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 50}] (* Jean-François Alcover, Jun 16 2018 *)
  • PARI
    t(k) = k*(k+1)/2;
    a(n) = polcoeff(prod(k=1, n, (x^t(k)+ 1/x^t(k))), 0); \\ Michel Marcus, May 19 2015

Formula

a(n) = (2^n/Pi) * Integral_{x=0..Pi} cos(x)*cos(3x)*...*cos(n(n+1)x/2) dx.
a(n) ~ 2^(n+1)*sqrt(10/Pi)*n^(-5/2)*(1+o(1)) as n --> infinity, n !== 1 (mod 4).
a(n) = 2 * A058498(n) for n > 0. - Alois P. Heinz, Nov 01 2011

Extensions

a(0) = 1 prepended by Joerg Arndt, Sep 17 2017
Example corrected by Ilya Gutkovskiy, Feb 02 2022

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

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 7, 19, 43, 95, 189, 429, 1003, 2457, 6319, 16165, 41601, 107969, 280253, 737065, 1950865, 5201941, 13954313, 37593679, 101695957, 276296549, 753191093, 2061201397, 5658850121, 15583938539, 43040609115, 119182143639, 330841253283, 920550527585
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+1/x^(n^2))*b(n-1)))
        end:
    a:= n-> coeff(b(n),x,0):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    Table[Coefficient[Product[x^(k^2) + 1 + 1/x^(k^2), {k, 1, n}], x, 0], {n, 0, 30}] (* Vaclav Kotesovec, Feb 05 2022 *)

Formula

Conjecture: a(n) ~ sqrt(5) * 3^(n + 1/2) / (2*sqrt(Pi)*n^(5/2)). - Vaclav Kotesovec, Feb 04 2022

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

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 2, 4, 0, 0, 19, 29, 0, 0, 127, 208, 0, 0, 1121, 1917, 0, 0, 10479, 19360, 0, 0, 113213, 204121, 0, 0, 1290968, 2363982, 0, 0, 15303057, 28397538, 0, 0, 187446097, 351339307, 0, 0, 2355979330, 4455357992, 0, 0, 30360404500, 57630025172
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 28 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0, `if`(n=m, 1,
          b(abs(n-i^2), i-1)+b(n+i^2, i-1))))((1+(3+2*i)*i)*i/6)
        end:
    a:= n-> `if`(irem(n, 4)>1, 0, b(n$2)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    b[n_, i_] := b[n, i] = Function[m, If[n > m, 0, If[n == m, 1, b[Abs[n - i^2], i - 1] + b[n + i^2, i - 1]]]][(1 + (3 + 2*i)*i)*i/6];
    a[n_] := If[Mod[n, 4] > 1, 0, b[n, n]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def b(n, i):
        if n > i*(i+1)*(2*i+1)//6: return 0
        if i == 0: return 1
        return b(n+i**2, i-1) + b(abs(n-i**2), i-1)
    def a(n): return b(n, n)
    print([a(n) for n in range(50)]) # Michael S. Branicky, Jan 28 2022

Formula

a(n) = [x^n] Product_{k=1..n} (x^(k^2) + 1/x^(k^2)).

A231015 Least k such that n = +- 1^2 +- 2^2 +- 3^2 +- 4^2 +- ... +- k^2 for some choice of +- signs.

Original entry on oeis.org

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

Views

Author

Jonathan Sondow, Nov 02 2013

Keywords

Comments

Erdős and Surányi proved that for each n there are infinitely many k satisfying the equation.
A158092(k) is the number of solutions to 0 = +-1^2 +- 2^2 +- ... +- k^2. The first nonzero value is A158092(7) = 2, so a(0) = 7.
a(n) is also defined for n < 0, and clearly a(-n) = a(n).
See A158092 and the Andrica-Ionascu links for more comments.
The integral formula (3.6) in Andrica-Vacaretu (see Theorem 3 of the INTEGERS 2013 slides which has a typo) gives in this case the number of representations of n as +- 1^2 +- 2^2 +- ... +- k^2 for some choice of +- signs. This integral formula is (2^n/2*Pi)*Integral_{t=0..2*Pi} cos(n*t) * Product_{j=1..k} cos(j^2*t) dt. Clearly the number of such representations of n is the coefficient of z^n in the expansion (z^(1^2) + z^(-1^2))*(z^(2^2) + z^(-2^2))*...*(z^(k^2) + z^(-k^2)). Andrica-Vacaretu used this generating function to prove the integral formula. Section 4 of Andrica-Vacaretu gives a table of the number of such representations of n for k=1,...,9. - Dorin Andrica, Nov 12 2013

Examples

			0 = 1^2 + 2^2 - 3^2 + 4^2 - 5^2 - 6^2 + 7^2.
1 = 1^2.
2 = - 1^2 - 2^2 - 3^2 + 4^2.
3 = - 1^2 + 2^2.
4 = - 1^2 - 2^2 + 3^2.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local m; m:=i*(i+1)*(2*i+1)/6;
          n<=m and (n=m or b(n+i^2, i-1) or b(abs(n-i^2), i-1))
        end:
    a:= proc(n) local k; for k while not b(n, k) do od; k end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Nov 03 2013
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{m}, m = i*(i+1)*(2*i+1)/6; n <= m && (n == m || b[n+i^2, i-1] || b[Abs[n-i^2], i-1])]; a[n_] := Module[{k}, For[k = 1, !b[n, k] , k++]; k]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 28 2014, after Alois P. Heinz *)

Formula

a(n(n+1)(2n+1)/6) = a(A000330(n)) = n for n > 0.
a((n(n+1)(2n+1)/6)-2) = a(A000330(n)-2) = n for n > 0.

Extensions

a(4) corrected and a(5)-a(85) from Donovan Johnson, Nov 03 2013

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

A292496 Number of solutions to +- 1^2 +- 3^2 +- 5^2 +- 7^2 +- ... +- (4*n-1)^2 = 0.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 12, 0, 40, 10, 516, 124, 5020, 1828, 48570, 32806, 527890, 444480, 6137942, 6482314, 70573856, 93276044, 853480374, 1300190254, 10660384742, 18371629260, 134129890382, 259804151324, 1728886287134, 3667061002286, 22672130669968
Offset: 0

Views

Author

Seiichi Manyama, Sep 17 2017

Keywords

Examples

			For n=4 the 2 solutions are +1^2-3^2-5^2+7^2-9^2+11^2+13^2-15^2 = 0 and -1^2+3^2+5^2-7^2+9^2-11^2-13^2+15^2 = 0.
		

Crossrefs

Programs

  • PARI
    a(n) = polcoeff(prod(k=1, 2*n, x^(2*k-1)^2+1/x^(2*k-1)^2), 0); \\ Michel Marcus, Sep 18 2017

Formula

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

A231071 Number of solutions to n = +- 1^2 +- 2^2 +- 3^2 +- 4^2 +- ... +- k^2 for minimal k giving at least one solution.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Nov 03 2013

Keywords

Comments

This type of sequence was first studied by Andrica and Vacaretu. - Jonathan Sondow, Nov 06 2013

Examples

			a(8) = 3: 8 = -1-4-9-16+25-36+49 = -1-4+9+16-25-36+49 = -1+4+9-16+25+36-49.
a(9) = 2: 9 = -1-4+9+16+25-36 = 1+4+9-16-25+36.
a(10) = 1: 10 = -1+4-9+16.
		

Crossrefs

Cf. A083527, A158092 (extremal sums).

Programs

  • Maple
    b:= proc(n, i) option remember; (m->`if`(n>m, 0, `if`(n=m, 1,
          b(n+i^2, i-1) +b(abs(n-i^2), i-1))))((1+(3+2*i)*i)*i/6)
        end:
    a:= proc(n) local k; for k while b(n, k)=0 do od; b(n, k) end:
    seq(a(n), n=0..100);
  • Mathematica
    b[n_, i_] := b[n, i] = Function[m, If[n > m, 0, If[n == m, 1,
       b[n+i^2, i-1] + b[Abs[n-i^2], i-1]]]][(1+(3+2*i)*i)*i/6];
    a[n_] := Module[{k}, For[k = 1, b[n, k] == 0, k++]; b[n, k]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 01 2022, after Alois P. Heinz *)

Formula

From Jonathan Sondow, Nov 03 2013: (Start)
a(n(n+1)(2n+1)/6) = 1 for n > 0: n(n+1)(2n+1)/6 = 1+4+9+...+n^2. See A000330.
a(n(n+1)(2n+1)/6 - 2) = 1 for n > 1: n(n+1)(2n+1)/6 - 2 = -1+4+9+...+n^2. (End)
Showing 1-10 of 17 results. Next