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

A008805 Triangular numbers repeated.

Original entry on oeis.org

1, 1, 3, 3, 6, 6, 10, 10, 15, 15, 21, 21, 28, 28, 36, 36, 45, 45, 55, 55, 66, 66, 78, 78, 91, 91, 105, 105, 120, 120, 136, 136, 153, 153, 171, 171, 190, 190, 210, 210, 231, 231, 253, 253, 276, 276, 300, 300, 325, 325, 351, 351, 378, 378, 406, 406, 435, 435
Offset: 0

Views

Author

Keywords

Comments

Number of choices for nonnegative integers x,y,z such that x and y are even and x + y + z = n.
Diagonal sums of A002260, when arranged as a number triangle. - Paul Barry, Feb 28 2003
a(n) = number of partitions of n+4 such that the differences between greatest and smallest parts are 2: a(n-4) = A097364(n,2) for n>3. - Reinhard Zumkeller, Aug 09 2004
For n >= i, i=4,5, a(n-i) is the number of incongruent two-color bracelets of n beads, i from them are black (cf. A005232, A032279), having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Prefixing A008805 by 0,0,0,0 gives the sequence c(0), c(1), ... defined by c(n)=number of (w,x,y) such that w = 2x+2y, where w,x,y are all in {1,...,n}; see A211422. - Clark Kimberling, Apr 15 2012
Partial sums of positive terms of A142150. - Reinhard Zumkeller, Jul 07 2012
The sum of the first parts of the nondecreasing partitions of n+2 into exactly two parts, n >= 0. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct symmetric pentagons in a regular n-gon, see illustration for some small n in links. - Kival Ngaokrajang, Jun 25 2013
a(n) is the number of nonnegative integer solutions to the equation x + y + z = n such that x + y <= z. For example, a(4) = 6 because we have 0+0+4 = 0+1+3 = 0+2+2 = 1+0+3 = 1+1+2 = 2+0+2. - Geoffrey Critzer, Jul 09 2013
a(n) is the number of distinct opening moves in n X n tic-tac-toe. - I. J. Kennedy, Sep 04 2013
a(n) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the T2 X t2 vibronic perturbation matrix, H(Q) (cf. Opalka & Domcke). - Bradley Klee, Jul 20 2015
a(n-1) also gives the number of D_4 (dihedral group of order 4) orbits of an n X n square grid with squares coming in either of two colors and only one square has one of the colors. - Wolfdieter Lang, Oct 03 2016
Also, this sequence is the third column in the triangle of the coefficients of the sum of two consecutive Fibonacci polynomials F(n+1, x) and F(n, x) (n>=0) in ascending powers of x. - Mohammad K. Azarian, Jul 18 2018
In an n-person symmetric matching pennies game (a zero-sum normal-form game) with n > 2 symmetric and indistinguishable players, each with two strategies (viz. heads or tails), a(n-3) is the number of distinct subsets of players that must play the same strategy to avoid incurring losses (single pure Nash equilibrium in the reduced game). The total number of distinct partitions is A000217(n-1). - Ambrosio Valencia-Romero, Apr 17 2022
a(n) is the number of connected bipartite graphs with n+1 edges and a stable set of cardinality 2. - Christian Barrientos, Jun 15 2022
a(n) is the number of 132-avoiding odd Grassmannian permutations of size n+2. - Juan B. Gil, Mar 10 2023
Consider a regular n-gon with all diagonals drawn. Define a "layer" to be the set of all regions sharing an edge with the exterior. Removing a layer creates another layer. Count the layers, removing them until none remain. The number of layers is a(n-2). See illustration. - Christopher Scussel, Nov 07 2023

Examples

			a(5) = 6, since (5) + 2 = 7 has three nondecreasing partitions with exactly 2 parts: (1,6),(2,5),(3,4). The sum of the first parts of these partitions = 1 + 2 + 3 = 6. - _Wesley Ivan Hurt_, Jun 08 2013
		

References

  • H. D. Brunk, An Introduction to Mathematical Statistics, Ginn, Boston, 1960; p. 360.

Crossrefs

Cf. A000217, A002260, A002620, A006918 (partial sums), A054252, A135276, A142150, A158920 (binomial trans.).

Programs

  • GAP
    List([0..60], n-> (2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32); # G. C. Greubel, Sep 12 2019
    
  • Haskell
    import Data.List (transpose)
    a008805 = a000217 . (`div` 2) . (+ 1)
    a008805_list = drop 2 $ concat $ transpose [a000217_list, a000217_list]
    -- Reinhard Zumkeller, Feb 01 2013
    
  • Magma
    [(2*n+3+(-1)^n)*(2*n+7+(-1)^n)/32 : n in [0..50]]; // Wesley Ivan Hurt, Apr 22 2015
    
  • Maple
    A008805:=n->(2*n+3+(-1)^n)*(2*n+7+(-1)^n)/32: seq(A008805(n), n=0..50); # Wesley Ivan Hurt, Apr 22 2015
  • Mathematica
    CoefficientList[Series[1/(1-x^2)^2/(1-x), {x, 0, 50}], x]
    Table[Binomial[Floor[n/2] + 2, 2], {n, 0, 57}] (* Michael De Vlieger, Oct 03 2016 *)
  • PARI
    a(n)=(n\2+2)*(n\2+1)/2
    
  • Python
    def A008805(n): return (m:=(n>>1)+1)*(m+1)>>1 # Chai Wah Wu, Oct 20 2023
  • Sage
    [(2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32 for n in (0..60)] # G. C. Greubel, Sep 12 2019
    

Formula

G.f.: 1/((1-x)*(1-x^2)^2) = 1/((1+x)^2*(1-x)^3).
E.g.f.: (exp(x)*(2*x^2 +12*x+ 11) - exp(-x)*(2*x -5))/16.
a(-n) = a(-5+n).
a(n) = binomial(floor(n/2)+2, 2). - Vladimir Shevelev, May 03 2011
From Paul Barry, May 31 2003: (Start)
a(n) = ((2*n +5)*(-1)^n + (2*n^2 +10*n +11))/16.
a(n) = Sum_{k=0..n} ((k+2)*(1+(-1)^k))/4. (End)
From Paul Barry, Apr 16 2005: (Start)
a(n) = Sum_{k=0..n} floor((k+2)/2)*(1-(-1)^(n+k-1))/2.
a(n) = Sum_{k=0..floor(n/2)} floor((n-2k+2)/2). (End)
A signed version is given by Sum_{k=0..n} (-1)^k*floor(k^2/4). - Paul Barry, Aug 19 2003
a(n) = A108299(n-2,n)*(-1)^floor((n+1)/2) for n>1. - Reinhard Zumkeller, Jun 01 2005
a(n) = A004125(n+3) - A049798(n+2). - Carl Najafi, Jan 31 2013
a(n) = Sum_{i=1..floor((n+2)/2)} i. - Wesley Ivan Hurt, Jun 08 2013
a(n) = (1/2)*floor((n+2)/2)*(floor((n+2)/2)+1). - Wesley Ivan Hurt, Jun 08 2013
From Wesley Ivan Hurt, Apr 22 2015: (Start)
a(n) = a(n-1) +2*a(n-2) -2*a(n-3) -a(n-4) +a(n-5).
a(n) = (2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32. (End)
a(n-1) = A054252(n,1) = A054252(n^2-1), n >= 1. See a Oct 03 2016 comment above. - Wolfdieter Lang, Oct 03 2016
a(n) = A000217(A008619(n)). - Guenther Schrack, Sep 12 2018
From Ambrosio Valencia-Romero, Apr 17 2022: (Start)
a(n) = a(n-1) if n odd, a(n) = a(n-1) + (n+2)/2 if n is even, for n > 0, a(0) = 1.
a(n) = (n+1)*(n+3)/8 if n odd, a(n) = (n+2)*(n+4)/8 if n is even, for n >= 0.
a(n) = A002620(n+2) - a(n-1), for n > 0, a(0) = 1.
a(n) = A142150(n+2) + a(n-1), for n > 0, a(0) = 1.
a(n) = A000217(n+3)/2 - A135276(n+3)/2. (End)

A211540 Number of ordered triples (w,x,y) with all terms in {1..n} and 2w = 3x + 4y.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 19, 21, 24, 27, 30, 33, 37, 40, 44, 48, 52, 56, 61, 65, 70, 75, 80, 85, 91, 96, 102, 108, 114, 120, 127, 133, 140, 147, 154, 161, 169, 176, 184, 192, 200, 208, 217, 225, 234, 243, 252, 261, 271, 280, 290
Offset: 0

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

For a guide to related sequences, see A211422.
Also the number of partitions of n+1 into three parts, where each part > 1. - Peter Woodward, May 25 2015
a(n) is also equal to the number of partitions of n+4 into three distinct parts, where each part > 1. - Giovanni Resta, May 26 2015
Number of different distributions of n+1 identical balls in 3 boxes as x,y,z where 0 < x < y < z. - Ece Uslu and Esin Becenen, Dec 31 2015
After the first three terms, partial sums of A008615. - Robert Israel, Dec 31 2015
For n >= 2, also the number of partitions of n - 2 into 3 parts. The Heinz numbers of these partitions are given by A014612. - Gus Wiseman, Oct 11 2020

Examples

			a(5) = a(6) = 1 with only one ordered triple (5,2,1). - _Michael Somos_, Feb 02 2015
a(11) = 5 Number of different distributions of 11 identical balls in 3 boxes as x,y and z where 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Dec 31 2015
a(1) = a(2) = a(3) = a(4) = a(5) = 0, since with fewer than 6 identical balls there is no such distribution with 3 boxes that holds for 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Dec 31 2015
G.f.: x^5 + x^6 + 2*x^7 + 3*x^8 + 4*x^9 + 5*x^10 + 7*x^11 + 8*x^12 + ...
From _Gus Wiseman_, Oct 11 2020: (Start)
The a(5) = 1 through a(15) = 14 partitions of n + 1 into three parts > 1 [Woodward] are the following (A = 10, B = 11, C = 12). The ordered version is A000217(n - 4) and the Heinz numbers are A046316.
  222  322  332  333  433  443  444  544  554  555  655
            422  432  442  533  543  553  644  654  664
                 522  532  542  552  643  653  663  754
                      622  632  633  652  662  744  763
                           722  642  733  743  753  772
                                732  742  752  762  844
                                822  832  833  843  853
                                     922  842  852  862
                                          932  933  943
                                          A22  942  952
                                               A32  A33
                                               B22  A42
                                                    B32
                                                    C22
The a(5) = 1 through a(15) = 14 partitions of n + 4 into three distinct parts > 1 [Resta] are the following (A = 10, B = 11, C = 12, D = 13, E = 14). The ordered version is A211540*6 and the Heinz numbers are A046389.
  432  532  542  543  643  653  654  754  764  765  865
            632  642  652  743  753  763  854  864  874
                 732  742  752  762  853  863  873  964
                      832  842  843  862  872  954  973
                           932  852  943  953  963  982
                                942  952  962  972  A54
                                A32  A42  A43  A53  A63
                                     B32  A52  A62  A72
                                          B42  B43  B53
                                          C32  B52  B62
                                               C42  C43
                                               D32  C52
                                                    D42
                                                    E32
The a(5) = 1 through a(15) = 14 partitions of n + 1 into three distinct parts [Uslu and Becenen] are the following (A = 10, B = 11, C = 12, D = 13). The ordered version is A211540(n)*6 and the Heinz numbers are A007304.
  321  421  431  432  532  542  543  643  653  654  754
            521  531  541  632  642  652  743  753  763
                 621  631  641  651  742  752  762  853
                      721  731  732  751  761  843  862
                           821  741  832  842  852  871
                                831  841  851  861  943
                                921  931  932  942  952
                                     A21  941  951  961
                                          A31  A32  A42
                                          B21  A41  A51
                                               B31  B32
                                               C21  B41
                                                    C31
                                                    D21
(End)
		

Crossrefs

All of the following pertain to 3-part strict partitions.
- A000009 counts these partitions of any length, with non-strict version A000041.
- A007304 gives the Heinz numbers, with non-strict version A014612.
- A101271 counts the relatively prime case, with non-strict version A023023.
- A220377 counts the pairwise coprime case, with non-strict version A307719.
- A337605 counts the pairwise non-coprime case, with non-strict version A337599.

Programs

  • Magma
    I:=[0,0,0,0,0,1]; [n le 6 select I[n] else Self(n-1)+Self(n-2)-Self(n-4)-Self(n-5)+Self(n-6): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
    
  • Maple
    f:= gfun:-rectoproc({a(n) = a(n-1)+a(n-2)-a(n-4)-a(n-5)+a(n-6),seq(a(i)=0,i=0..4),a(5)=1},a(n),remember):
    seq(f(i),i=0..100); # Robert Israel, Dec 31 2015
  • Mathematica
    t[n_] := t[n] = Flatten[Table[-2 w + 3 x + 4 y, {w, n}, {x, n}, {y, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 80}]  (* A211540 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 0, 0, 0, 0, 1}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
    Table[Length[Select[IntegerPartitions[n+1,{3}],UnsameQ@@#&]],{n,0,30}] (* Gus Wiseman, Oct 05 2020 *)
  • PARI
    {a(n) = round( (n-2)^2 / 12 )}; / * Michael Somos, Feb 02 2015 */
    
  • PARI
    concat(vector(5), Vec(x^5/(1-x-x^2+x^4+x^5-x^6) + O(x^100))) \\ Altug Alkan, Jan 10 2016

Formula

a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6).
a(n) = A069905(n-2) = A001399(n-5) for n >= 5. - Alois P. Heinz, Nov 03 2012
a(n) = 3*k^2-6*k+3 (for n = 6*k-3), 3*k^2-5*k+2 (for n = 6*k-2), 3*k^2-4*k+1 (for n = 6*k-1), 3*k^2-3*k+1 (for n = 6*k), 3*k^2-2*k (for n = 6*k+1), 3*k^2-k (for n = 6*k+2). - Ece Uslu, Esin Becenen, Dec 31 2015
a(n) = A004526(n-2) + a(n-2) for n > 2. - Ece Uslu, Esin Becenen, Dec 31 2015
G.f.: x^5/(1 - x - x^2 + x^4 + x^5 - x^6). - Robert Israel, Dec 31 2015
a(n) = Sum_{k=1..floor(n/3)} floor((n-k)/2)-k. - Wesley Ivan Hurt, Apr 27 2019
From Gus Wiseman, Oct 11 2020: (Start)
a(n+2) = A069905(n) = A001399(n-3) counts 3-part partitions.
a(n-1) = A069905(n-3) = A001399(n-6) counts 3-part strict partitions.
a(n-1) = A069905(n-3) = A001399(n-6) counts 3-part partitions with no 1's.
a(n-4) = A069905(n-6) = A001399(n-9) counts 3-part strict partitions with no 1's.
A000217(n-2) counts 3-part compositions.
a(n-1)*6 = A069905(n-3)*6 = A001399(n-6)*6 counts 3-part strict compositions.
A000217(n-5) counts 3-part compositions with no 1's.
a(n-4)*6 = A069905(n-6)*6 = A001399(n-9)*6 counts 3-part strict compositions with no 1's.
(End)

A132188 Number of 3-term geometric progressions with no term exceeding n.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 9, 12, 17, 18, 19, 22, 23, 24, 25, 32, 33, 38, 39, 42, 43, 44, 45, 48, 57, 58, 63, 66, 67, 68, 69, 76, 77, 78, 79, 90, 91, 92, 93, 96, 97, 98, 99, 102, 107, 108, 109, 116, 129, 138, 139, 142, 143, 148, 149, 152, 153, 154, 155, 158
Offset: 1

Views

Author

Gerry Myerson, Nov 21 2007

Keywords

Comments

a(n) = number of pairs (i,j) in [1..n] X [1..n] with integral geometric mean sqrt(i*j). Cf. A000982, A362931. - N. J. A. Sloane, Aug 28 2023
Also the number of 2 X 2 symmetric singular matrices with entries from {1, ..., n} - cf. A064368.
Rephrased: Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2=x*y. See A211422. - Clark Kimberling, Apr 14 2012

Examples

			a(4) counts these six (w,x,y) - triples: (1,1,1), (2,1,4), (2,4,1), (2,2,2), (3,3,3), (4,4,4). - _Clark Kimberling_, Apr 14 2012
		

Crossrefs

Programs

  • Haskell
    a132188 0 = 0
    a132188 n = a132345 n + (a120486 $ fromInteger n)
    -- Reinhard Zumkeller, Apr 21 2012
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          1+2*add(`if`(issqr(i*n), 1, 0), i=1..n-1))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 28 2023
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 - x*y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 80}]  (* Clark Kimberling, Apr 14 2012 *)
  • Python
    from sympy.ntheory.primetest import is_square
    def A132188(n): return n+(sum(1 for x in range(1,n+1) for y in range(1,x) if is_square(x*y))<<1) # Chai Wah Wu, Aug 28 2023

Formula

a(n) = Sum [sqrt(n/k)]^2, where the sum is over all squarefree k not exceeding n.
If we call A120486, this sequence and A132189 F(n), P(n) and S(n), respectively, then P(n) = 2 F(n) - n = S(n) + n. The Finch-Sebah paper cited at A000188 proves that F(n) is asymptotic to (3 / pi^2) n log n. In the reference, we prove that F(n) = (3 / pi^2) n log n + O(n), from which it follows that P(n) = (6 / pi^2) n log n + O(n) and similarly for S(n).
a(n) = Sum_{1 <=x,y <=n} A010052(x*y). - Clark Kimberling, Apr 14 2012
a(n) = n+2*Sum_{1<=xA010052(x*y). - Chai Wah Wu, Aug 28 2023

A108579 Number of symmetry classes of 3 X 3 magic squares (with distinct positive entries) having magic sum 3n.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 4, 7, 10, 13, 17, 22, 26, 32, 38, 44, 51, 59, 66, 75, 84, 93, 103, 114, 124, 136, 148, 160, 173, 187, 200, 215, 230, 245, 261, 278, 294, 312, 330, 348, 367, 387, 406, 427, 448, 469, 491, 514, 536, 560, 584, 608, 633, 659, 684, 711, 738, 765, 793, 822, 850
Offset: 1

Views

Author

Thomas Zaslavsky, Jun 11 2005

Keywords

Comments

A magic square has distinct positive integers in its cells, whose sum is the same (the "magic sum") along any row, column, or main diagonal.
a(n) is given by a quasipolynomial of period 6.
It appears that A108579(n) is the number of ordered triples (w,x,y) with components all in {1,...,n} and w+n=2x+3y, as in the Mathematica section. For related sequences, see A211422. - Clark Kimberling, Apr 15 2012

Examples

			a(5) = 1 because there is a unique 3 X 3 magic square, up to symmetry, using the first 9 positive integers.
		

Crossrefs

Nonzero entries are the second differences of A055328.

Programs

  • Mathematica
    (* This program generates a sequence described in the Comments section *)
    t[n_] := t[n] = Flatten[Table[-w^2 + x*y + n, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 1, 80}]  (* A211506 *)
    (* Clark Kimberling, Apr 15 2012 *)

Formula

a(n) = floor((1/4)*(n-2)^2)-floor((1/3)*(n-1)). - Mircea Merca, Oct 08 2013
G.f.: x^5*(1+2*x)/((1-x)*(1-x^2)*(1-x^3)).

Extensions

Edited by N. J. A. Sloane, Oct 04 2010

A211538 Number of ordered triples (w,x,y) with all terms in {1,...,n} and 2w=2n-2x-y.

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 9, 12, 18, 22, 30, 35, 45, 51, 63, 70, 84, 92, 108, 117, 135, 145, 165, 176, 198, 210, 234, 247, 273, 287, 315, 330, 360, 376, 408, 425, 459, 477, 513, 532, 570, 590, 630, 651, 693, 715, 759, 782, 828, 852, 900, 925, 975, 1001, 1053, 1080, 1134, 1162
Offset: 1

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

For a guide to related sequences, see A211422.
Partial sums of A029578. - Reinhard Zumkeller, Nov 27 2012

Crossrefs

Cf. A211422.

Programs

  • Haskell
    a211538 n = a211538_list !! (n-1)
    a211538_list = scanl (+) 0 a029578_list
    -- Reinhard Zumkeller, Nov 27 2012
    
  • Magma
    [(6*n^2-26*n+25-(2*n-7)*(-1)^n)/16: n in [1..60]]; // Bruno Berselli, Jun 03 2014
  • Maple
    A211538:=n->(6*n^2-26*n+25-(2*n-7)*(-1)^n)/16: seq(A211538(n), n=1..100); # Wesley Ivan Hurt, May 18 2015
  • Mathematica
    t[n_] := t[n] = Flatten[Table[2 w + 2 x + y - 2 n, {w, n}, {x, n}, {y, n}]]; c[n_] := Count[t[n], 0]; t = Table[c[n], {n, 0, 70}]
    Table[(6*n^2 - 26*n + 25 - (2*n - 7)*(-1)^n)/16, {n, 100}] (* Wesley Ivan Hurt, May 18 2015 *)
    LinearRecurrence[{1, 2, -2, -1, 1}, {0, 0, 0, 1, 3}, 70] (* Vincenzo Librandi, May 19 2015 *)

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = (6*n^2-26*n+25-(2*n-7)*(-1)^n)/16, from Luce ETIENNE. [Bruno Berselli, Jun 03 2014]
From Wesley Ivan Hurt, May 18 2015: (Start)
G.f.: x^3*(1 + 2 x)/((1 - x)^3*(x + 1)^2).
a(n) = Sum_{i=ceiling((n-3)/2)..n-3} i. (End)

A211547 The squares n^2, n >= 0, each one written three times.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 4, 4, 4, 9, 9, 9, 16, 16, 16, 25, 25, 25, 36, 36, 36, 49, 49, 49, 64, 64, 64, 81, 81, 81, 100, 100, 100, 121, 121, 121, 144, 144, 144, 169, 169, 169, 196, 196, 196, 225, 225, 225, 256, 256, 256, 289, 289, 289, 324, 324, 324, 361, 361, 361
Offset: 0

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

Number of ordered triples (w,x,y) with all terms in {1,...,n} and 2w=3x+3y.
For a guide to related sequences, see A211422.

Crossrefs

Cf. A075561, A211422, A211435 (triply repeated triangular numbers).

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[-2 w + 3 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 60}](*A211547, squares thrice*)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,0,2,-2,0,-1,1},{0,0,0,1,1,1,4},60] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    concat(vector(3), Vec(x^3*(1 + x)*(1 - x + x^2) / ((1 - x)^3*(1 + x + x^2)^2) + O(x^40))) \\\ Colin Barker, Dec 02 2017

Formula

a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
G.f.: x^3*(1 + x)*(1 - x + x^2) / ((1 - x)^3*(1 + x + x^2)^2). - Colin Barker, Dec 02 2017
a(n) = A075561(n-2) for n > 2. - Georg Fischer, Oct 23 2018
E.g.f.: exp(-x/2)*(exp(3*x/2)*(5 + 3*x*(x - 1)) - 5*cos(sqrt(3)*x/2) - sqrt(3)*(3 + 4*x)*sin(sqrt(3)*x/2))/27. - Stefano Spezia, Oct 17 2022

Extensions

Definition simplified by N. J. A. Sloane, Nov 17 2020. Also the old version said "squares repeated three times", which was at best ambiguous, and strictly speaking was incorrect, since "squares repeated" is 0, 0, 1, 1, 4, 4, 9, 9, ... .

A211639 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2+x^2+y^2<=n.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 4, 4, 4, 7, 7, 10, 11, 11, 17, 17, 17, 20, 23, 26, 26, 32, 35, 35, 38, 38, 44, 48, 48, 54, 60, 60, 60, 66, 69, 75, 78, 78, 87, 87, 87, 96, 102, 105, 108, 114, 120, 120, 121, 127, 133, 139, 139, 145, 157, 157, 163, 169, 169, 178, 178, 184, 196
Offset: 0

Views

Author

Clark Kimberling, Apr 18 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211638, A211422. Partial sums of A063691.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[w^2 + x^2 + y^2 <= n, s = s + 1],
            {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 80]]     (* A211639 *)
    (* Peter J. C. Moses, Apr 13 2012 *)

Formula

a(n) = A211638(n)+A063691(n). - R. J. Mathar, Jan 07 2015
G.f.: (theta_3(x) - 1)^3/(8*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018

A211651 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^3 >= x^3 + y^3.

Original entry on oeis.org

0, 0, 1, 5, 14, 29, 53, 88, 134, 195, 270, 362, 473, 605, 762, 941, 1147, 1380, 1644, 1941, 2268, 2632, 3031, 3471, 3948, 4471, 5037, 5646, 6306, 7011, 7770, 8582, 9447, 10369, 11347, 12388, 13490, 14653, 15883, 17179, 18542, 19980, 21487
Offset: 0

Views

Author

Clark Kimberling, Apr 19 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Maple
    g:= proc(n) local  x;
      add(floor((n^3-x^3)^(1/3)),x=1..n-1)
    end proc:
    ListTools:-PartialSums(map(g, [$0..50])); # Robert Israel, May 03 2019
  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[w^3 >= x^3 + y^3, s = s + 1],
            {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
    Map[t, Range[0, 50]]  (* A211651 *)
    (* Peter J. C. Moses, Apr 13 2012 *)

A211423 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + 2*x*y = 0.

Original entry on oeis.org

1, 5, 17, 21, 33, 37, 49, 53, 73, 85, 97, 101, 121, 125, 137, 141, 161, 165, 193, 197, 209, 213, 225, 229, 257, 277, 289, 301, 313, 317, 337, 341, 377, 381, 393, 397, 433, 437, 449, 453, 481, 485, 497, 501, 513, 525, 537, 541, 569, 597, 641, 645, 657
Offset: 0

Views

Author

Clark Kimberling, Apr 10 2012

Keywords

Comments

For a guide to related sequences, see A211422.
From David A. Corneth, May 21 2020: (Start)
Let (w, x, y) be a primitive solution to the 8 solutions {(w, x, y), (-w, x, y), (w, -x, -y), (-w, -x, -y), (w, y, x), (-w, y, x), (w, -y, -x), (-w, -y, -x)}. Then for any n > 1 we have the primitive solution (0, 0, n) giving 4 solutions where abs(max(w, x, y)) = n. For even n we also have (n, 2, (n/2)^2) as a primitive solution. So a(n) - a(n-1) >= 4 for n odd and a(n) - a(n-1) >= 12 for n even and a(n) >= 8*n - 3. (End)

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 + 2 x*y, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 60}] (* A211423 *)
    (t - 1)/4                   (* integers *)
  • PARI
    first(n) = {n--; my(v = vector(n, i, 4)); forstep(w = 2, n, 2, for(x = 1, n, y = w^2/(2*x); if(denominator(y) == 1 && abs(y) <= n, v[vecmax([x, y, w])]+=4 ) ) ); res = vector(n + 1); res[1] = 1; for(i = 2, n+1, res[i] = res[i-1] + v[i-1]); res } \\ David A. Corneth, May 21 2020
    
  • PARI
    first(n) = { my(res = vector(n), d); res[1] = 1; for(i = 1, n-1, t = i\(sqrtint(2*i*core(2*i)))*2+1; if(!bitand(i, 1), d = divisors(i^2/2); t += 2*(vecsearch(d, i) - #d\2 - 1)); res[i+1] = res[i] + 4*t; ); res } \\ faster than PARI above \\ David A. Corneth, May 22 2020

A211539 Number of ordered triples (w,x,y) with all terms in {1,...,n} and 2w = 2n - 2x + y.

Original entry on oeis.org

0, 0, 2, 3, 7, 9, 15, 18, 26, 30, 40, 45, 57, 63, 77, 84, 100, 108, 126, 135, 155, 165, 187, 198, 222, 234, 260, 273, 301, 315, 345, 360, 392, 408, 442, 459, 495, 513, 551, 570, 610, 630, 672, 693, 737, 759, 805, 828, 876, 900, 950, 975, 1027, 1053
Offset: 0

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

For a guide to related sequences, see A211422.
a(n) = sum of natural numbers in interval (floor((n+1)/2),n]. - Jaroslav Krizek, Mar 05 2014
For n > 0, 2*a(n-1) is the sum of the largest parts of the partitions of 2n into two distinct even parts. - Wesley Ivan Hurt, Dec 19 2017
From Paul Curtz, Oct 23 2018: (Start)
Consider the 51 first nonnegative numbers in the following boustrophedon distribution:
35--36--37--38--39--40--41--42--43--44--45
34--33--32--31--30--29--28--27--26--46
12--13--14--15--16--17--18--25--47
11--10---9---8---7--19--24--48
1---2---3---6--20--23--49
0---4---5--21--22--50
a(n+1) is the union of the main vertical (0,2, 9,15, 30,40, ... ) and of the shifted main antidiagonal (3,7, 18,26, 45,57, ... ). (End)
Sum of the shortest side lengths of all integer-sided triangles with perimeter 3(n+1) whose sides lengths are in arithmetic progression (For example, when n=4 there are two triangles with perimeter 3(4+1) = 15 whose side lengths are in arithmetic progression: [3,5,7] and [4,5,6]; thus a(4) = 3+4 = 7). - Wesley Ivan Hurt, Nov 01 2020

Examples

			G.f. = 2*x^2 + 3*x^3 + 7*x^4 + 9*x^5 + 15*x^6 + 18*x^7 + ... - _Michael Somos_, Nov 14 2018
		

Crossrefs

Programs

  • GAP
    a:=[0];; for n in [2..55] do if n mod 2 = 0 then Add(a,a[n-1]+n); else Add(a,a[n-1]+(n-1)/2); fi; od; Concatenation([0],a); # Muniru A Asiru, Oct 26 2018
  • Magma
    I:=[0,0,2,3,7]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Mar 12 2014
    
  • Maple
    a:=n->add(k,k=floor((n+1)/2)+1..n): seq(a(n),n=0..55); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    t[n_] := t[n] = Flatten[Table[2 w + 2 x - y - 2 n, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* A211539 *)
    FindLinearRecurrence[t]
    CoefficientList[Series[(x^3 + 2 x^2)/((1 + x)^2 (1 - x)^3), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 12 2014 *)
  • PARI
    a(n)=(1/16)*(6*n^2+2*n-3+(2*n+3)*(-1)^n) \\ Ralf Stephan, Mar 10 2014
    

Formula

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
From Jaroslav Krizek, Mar 05 2014: (Start)
a(n) = T(n+1) - T(floor((n+1)/2)) - (n+1), where T(k) = A000217(k).
a(n) = Sum_{k=floor((n+1)/2)+1..n} k.
a(n) = a(n-1) + n for even n; a(n) = a(n-1) + (n-1)/2 for odd n. (End)
From Ralf Stephan, Mar 10 2014: (Start)
a(n) = (1/16) * (6n^2 + 2n - 3 + (2n+3)*(-1)^n ).
G.f.: (x^3+2x^2)/((1+x)^2*(1-x)^3). (End)
From Paul Curtz, Oct 22 2018: (Start)
a(2n) = A005449(n), a(2n+1) = A045943(n).
a(2n) + a(2n+1) = A045944(n).
a(3n) = 3*(0, 1, 5, 10, 19, 28, 42, ...).
a(n+1) = a(n) + A065423(n+2).
a(-n) = A211538(n+2). (End)
E.g.f.: (3*x*(1 + x)*cosh(x) + (-3 + 5*x + 3*x^2)*sinh(x))/8. - Stefano Spezia, Nov 02 2020
a(n) = A001318(n+1) - (n+1). - Davide Rotondo, Apr 07 2024
Showing 1-10 of 105 results. Next