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

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

Original entry on oeis.org

1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
Offset: 0

Views

Author

Clark Kimberling, Apr 10 2012

Keywords

Comments

Suppose that S={-n,...,0,...,n} and that f(w,x,y,n) is a function, where w,x,y are in S. The number of ordered triples (w,x,y) satisfying f(w,x,y,n)=0, regarded as a function of n, is a sequence t of nonnegative integers. Sequences such as t/4 may also be integer sequences for all except certain initial values of n. In the following guide, such sequences are indicated in the related sequences column and may be included in the corresponding Mathematica programs.
...
sequence... f(w,x,y,n) ..... related sequences
A211415 ... w^2+x*y-1 ...... t+2, t/4, (t/4-1)/4
A211422 ... w^2+x*y ........ (t-1)/8, A120486
A211423 ... w^2+2x*y ....... (t-1)/4
A211424 ... w^2+3x*y ....... (t-1)/4
A211425 ... w^2+4x*y ....... (t-1)/4
A211426 ... 2w^2+x*y ....... (t-1)/4
A211427 ... 3w^2+x*y ....... (t-1)/4
A211428 ... 2w^2+3x*y ...... (t-1)/4
A211429 ... w^3+x*y ........ (t-1)/4
A211430 ... w^2+x+y ........ (t-1)/2
A211431 ... w^3+(x+y)^2 .... (t-1)/2
A211432 ... w^2-x^2-y^2 .... (t-1)/8
A003215 ... w+x+y .......... (t-1)/2, A045943
A202253 ... w+2x+3y ........ (t-1)/2, A143978
A211433 ... w+2x+4y ........ (t-1)/2
A211434 ... w+2x+5y ........ (t-1)/4
A211435 ... w+4x+5y ........ (t-1)/2
A211436 ... 2w+3x+4y ....... (t-1)/2
A211435 ... 2w+3x+5y ....... (t-1)/2
A211438 ... w+2x+2y ....... (t-1)/2, A118277
A001844 ... w+x+2y ......... (t-1)/4, A000217
A211439 ... w+3x+3y ........ (t-1)/2
A211440 ... 2w+3x+3y ....... (t-1)/2
A028896 ... w+x+y-1 ........ t/6, A000217
A211441 ... w+x+y-2 ........ t/3, A028387
A182074 ... w^2+x*y-n ...... t/4, A028387
A000384 ... w+x+y-n
A000217 ... w+x+y-2n
A211437 ... w*x*y-n ........ t/4, A007425
A211480 ... w+2x+3y-1
A211481 ... w+2x+3y-n
A211482 ... w*x+w*y+x*y-w*x*y
A211483 ... (n+w)^2-x-y
A182112 ... (n+w)^2-x-y-w
...
For the following sequences, S={1,...,n}, rather than
{-n,...,0,...n}. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A132188 ... w^2-x*y
A211506 ... w^2-x*y-n
A211507 ... w^2-x*y+n
A211508 ... w^2+x*y-n
A211509 ... w^2+x*y-2n
A211510 ... w^2-x*y+2n
A211511 ... w^2-2x*y ....... t/2
A211512 ... w^2-3x*y ....... t/2
A211513 ... 2w^2-x*y ....... t/2
A211514 ... 3w^2-x*y ....... t/2
A211515 ... w^3-x*y
A211516 ... w^2-x-y
A211517 ... w^3-(x+y)^2
A063468 ... w^2-x^2-y^2 .... t/2
A000217 ... w+x-y
A001399 ... w-2x-3y
A211519 ... w-2x+3y
A008810 ... w+2x-3y
A001399 ... w-2x-3y
A008642 ... w-2x-4y
A211520 ... w-2x+4y
A211521 ... w+2x-4y
A000115 ... w-2x-5y
A211522 ... w-2x+5y
A211523 ... w+2x-5y
A211524 ... w-3x-5y
A211533 ... w-3x+5y
A211523 ... w+3x-5y
A211535 ... w-4x-5y
A211536 ... w-4x+5y
A008812 ... w+4x-5y
A055998 ... w+x+y-2n
A074148 ... 2w+x+y-2n
A211538 ... 2w+2x+y-2n
A211539 ... 2w+2x-y-2n
A211540 ... 2w-3x-4y
A211541 ... 2w-3x+4y
A211542 ... 2w+3x-4y
A211543 ... 2w-3x-5y
A211544 ... 2w-3x+5y
A008812 ... 2w+3x-5y
A008805 ... w-2x-2y (repeated triangular numbers)
A001318 ... w-2x+2y
A000982 ... w+x-2y
A211534 ... w-3x-3y
A211546 ... w-3x+3y (triply repeated triangular numbers)
A211547 ... 2w-3x-3y (triply repeated squares)
A082667 ... 2w-3x+3y
A055998 ... w-x-y+2
A001399 ... w-2x-3y+1
A108579 ... w-2x-3y+n
...
Next, S={-n,...-1,1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated inequality. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A211545 ... w+x+y>0; recurrence degree: 4
A211612 ... w+x+y>=0
A211613 ... w+x+y>1
A211614 ... w+x+y>2
A211615 ... |w+x+y|<=1
A211616 ... |w+x+y|<=2
A211617 ... 2w+x+y>0; recurrence degree: 5
A211618 ... 2w+x+y>1
A211619 ... 2w+x+y>2
A211620 ... |2w+x+y|<=1
A211621 ... w+2x+3y>0
A211622 ... w+2x+3y>1
A211623 ... |w+2x+3y|<=1
A211624 ... w+2x+2y>0; recurrence degree: 6
A211625 ... w+3x+3y>0; recurrence degree: 8
A211626 ... w+4x+4y>0; recurrence degree: 10
A211627 ... w+5x+5y>0; recurrence degree: 12
A211628 ... 3w+x+y>0; recurrence degree: 6
A211629 ... 4w+x+y>0; recurrence degree: 7
A211630 ... 5w+x+y>0; recurrence degree: 8
A211631 ... w^2>x^2+y^2; all terms divisible by 8
A211632 ... 2w^2>x^2+y^2; all terms divisible by 8
A211633 ... w^2>2x^2+2y^2; all terms divisible by 8
...
Next, S={1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated relation.
A211634 ... w^2<=x^2+y^2
A211635 ... w^2A211790
A211636 ... w^2>=x^2+y^2
A211637 ... w^2>x^2+y^2
A211638 ... w^2+x^2+y^2
A211639 ... w^2+x^2+y^2<=n
A211640 ... w^2+x^2+y^2>n
A211641 ... w^2+x^2+y^2>=n
A211642 ... w^2+x^2+y^2<2n
A211643 ... w^2+x^2+y^2<=2n
A211644 ... w^2+x^2+y^2>2n
A211645 ... w^2+x^2+y^2>=2n
A211646 ... w^2+x^2+y^2<3n
A211647 ... w^2+x^2+y^2<=3n
A063691 ... w^2+x^2+y^2=n
A211649 ... w^2+x^2+y^2=2n
A211648 ... w^2+x^2+y^2=3n
A211650 ... w^3A211790
A211651 ... w^3>x^3+y^3; see Comments at A211790
A211652 ... w^4A211790
A211653 ... w^4>x^4+y^4; see Comments at A211790

Examples

			a(1) counts these 9 triples: (-1,-1,1), (-1, 1,-1), (0, -1, 0), (0, 0, -1), (0,0,0), (0,0,1), (0,1,0), (1,-1,1), (1,1,-1).
		

Crossrefs

Cf. A120486.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 + x*y, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}] (* A211422 *)
    (t - 1)/8                   (* A120486 *)

A212959 Number of (w,x,y) such that w,x,y are all in {0,...,n} and |w-x| = |x-y|.

Original entry on oeis.org

1, 4, 11, 20, 33, 48, 67, 88, 113, 140, 171, 204, 241, 280, 323, 368, 417, 468, 523, 580, 641, 704, 771, 840, 913, 988, 1067, 1148, 1233, 1320, 1411, 1504, 1601, 1700, 1803, 1908, 2017, 2128, 2243, 2360, 2481, 2604, 2731, 2860, 2993, 3128, 3267
Offset: 0

Author

Clark Kimberling, Jun 01 2012

Keywords

Comments

In the following guide to related sequences: M=max(x,y,z), m=min(x,y,z), and R=range=M-m. In some cases, it is an offset of the listed sequence which fits the conditions shown for w,x,y. Each sequence satisfies a linear recurrence relation, some of which are identified in the list by the following code (signature):
A: 2, 0, -2, 1, i.e., a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4);
B: 3, -2, -2, 3, -1;
C: 4, -6, 4, -1;
D: 1, 2, -2, -1, 1;
E: 2, 1, -4, 1, 2, -1;
F: 2, -1, 1, -2, 1;
G: 2, -1, 0, 1, -2, 1;
H: 2, -1, 2, -4, 2, -1, 2, -1;
I: 3, -3, 2, -3, 3, -1;
J: 4, -7, 8, -7, 4, -1.
...
A212959 ... |w-x|=|x-y| ...... recurrence type A
A212960 ... |w-x| != |x-y| ................... B
A212683 ... |w-x| < |x-y| .................... B
A212684 ... |w-x| >= |x-y| ................... B
A212963 ... see entry for definition ......... B
A212964 ... |w-x| < |x-y| < |y-w| ............ B
A006331 ... |w-x| < y ........................ C
A005900 ... |w-x| <= y ....................... C
A212965 ... w = R ............................ D
A212966 ... 2*w = R
A212967 ... w < R ............................ E
A212968 ... w >= R ........................... E
A077043 ... w = x > R ........................ A
A212969 ... w != x and x > R ................. E
A212970 ... w != x and x < R ................. E
A055998 ... w = x + y - 1
A011934 ... w < floor((x+y)/2) ............... B
A182260 ... w > floor((x+y)/2) ............... B
A055232 ... w <= floor((x+y)/2) .............. B
A011934 ... w >= floor((x+y)/2) .............. B
A212971 ... w < floor((x+y)/3) ............... B
A212972 ... w >= floor((x+y)/3) .............. B
A212973 ... w <= floor((x+y)/3) .............. B
A212974 ... w > floor((x+y)/3) ............... B
A212975 ... R is even ........................ E
A212976 ... R is odd ......................... E
A212978 ... R = 2*n - w - x
A212979 ... R = average{w,x,y}
A212980 ... w < x + y and x < y .............. B
A212981 ... w <= x+y and x < y ............... B
A212982 ... w < x + y and x <= y ............. B
A212983 ... w <= x + y and x <= y ............ B
A002623 ... w >= x + y and x <= y ............ B
A087811 ... w = 2*x + y ...................... A
A008805 ... w = 2*x + 2*y .................... D
A000982 ... 2*w = x + y ...................... F
A001318 ... 2*w = 2*x + y .................... F
A001840 ... w = 3*x + y
A212984 ... 3*w = x + y
A212985 ... 3*w = 3*x + y
A001399 ... w = 2*x + 3*y
A212986 ... 2*w = 3*x + y
A008810 ... 3*x = 2*x + y .................... F
A212987 ... 3*w = 2*x + 2*y
A001972 ... w = 4*x + y ...................... G
A212988 ... 4*w = x + y ...................... G
A212989 ... 4*w = 4*x + y
A008812 ... 5*w = 2*x + 3*y
A016061 ... n < w + x + y <= 2*n ............. C
A000292 ... w + x + y <=n .................... C
A000292 ... 2*n < w + x + y <= 3*n ........... C
A212977 ... n/2 < w + x + y <= n
A143785 ... w < R < x ........................ E
A005996 ... w < R <= x ....................... E
A128624 ... w <= R <= x ...................... E
A213041 ... R = 2*|w - x| .................... A
A213045 ... R < 2*|w - x| .................... B
A087035 ... R >= 2*|w - x| ................... B
A213388 ... R <= 2*|w - x| ................... B
A171218 ... M < 2*m .......................... B
A213389 ... R < 2|w - x| ..................... E
A213390 ... M >= 2*m ......................... E
A213391 ... 2*M < 3*m ........................ H
A213392 ... 2*M >= 3*m ....................... H
A213393 ... 2*M > 3*m ........................ H
A213391 ... 2*M <= 3*m ....................... H
A047838 ... w = |x + y - w| .................. A
A213396 ... 2*w < |x + y - w| ................ I
A213397 ... 2*w >= |x + y - w| ............... I
A213400 ... w < R < 2*w
A069894 ... min(|w-x|,|x-y|) = 1
A000384 ... max(|w-x|,|x-y|) = |w-y|
A213395 ... max(|w-x|,|x-y|) = w
A213398 ... min(|w-x|,|x-y|) = x ............. A
A213399 ... max(|w-x|,|x-y|) = x ............. D
A213479 ... max(|w-x|,|x-y|) = w+x+y ......... D
A213480 ... max(|w-x|,|x-y|) != w+x+y ........ E
A006918 ... |w-x| + |x-y| > w+x+y ............ E
A213481 ... |w-x| + |x-y| <= w+x+y ........... E
A213482 ... |w-x| + |x-y| < w+x+y ............ E
A213483 ... |w-x| + |x-y| >= w+x+y ........... E
A213484 ... |w-x|+|x-y|+|y-w| = w+x+y
A213485 ... |w-x|+|x-y|+|y-w| != w+x+y ....... J
A213486 ... |w-x|+|x-y|+|y-w| > w+x+y ........ J
A213487 ... |w-x|+|x-y|+|y-w| >= w+x+y ....... J
A213488 ... |w-x|+|x-y|+|y-w| < w+x+y ........ J
A213489 ... |w-x|+|x-y|+|y-w| <= w+x+y ....... J
A213490 ... w,x,y,|w-x|,|x-y| distinct
A213491 ... w,x,y,|w-x|,|x-y| not distinct
A213493 ... w,x,y,|w-x|,|x-y|,|w-y| distinct
A213495 ... w = min(|w-x|,|x-y|,|w-y|)
A213492 ... w != min(|w-x|,|x-y|,|w-y|)
A213496 ... x != max(|w-x|,|x-y|)
A213498 ... w != max(|w-x|,|x-y|,|w-y|)
A213497 ... w = min(|w-x|,|x-y|)
A213499 ... w != min(|w-x|,|x-y|)
A213501 ... w != max(|w-x|,|x-y|)
A213502 ... x != min(|w-x|,|x-y|)
...
A211795 includes a guide for sequences that count 4-tuples (w,x,y,z) having all terms in {0,...,n} and satisfying selected properties. Some of the sequences indexed at A211795 satisfy recurrences that are represented in the above list.
Partial sums of the numbers congruent to {1,3} mod 6 (see A047241). - Philippe Deléham, Mar 16 2014

Examples

			a(1)=4 counts these (x,y,z): (0,0,0), (1,1,1), (0,1,0), (1,0,1).
Numbers congruent to {1, 3} mod 6: 1, 3, 7, 9, 13, 15, 19, ...
a(0) = 1;
a(1) = 1 + 3 = 4;
a(2) = 1 + 3 + 7 = 11;
a(3) = 1 + 3 + 7 + 9 = 20;
a(4) = 1 + 3 + 7 + 9 + 13 = 33;
a(5) = 1 + 3 + 7 + 9 + 13 + 15 = 48; etc. - _Philippe Deléham_, Mar 16 2014
		

References

  • A. Barvinok, Lattice Points and Lattice Polytopes, Chapter 7 in Handbook of Discrete and Computational Geometry, CRC Press, 1997, 133-152.
  • P. Gritzmann and J. M. Wills, Lattice Points, Chapter 3.2 in Handbook of Convex Geometry, vol. B, North-Holland, 1993, 765-797.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Abs[w - x] == Abs[x - y], s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 50]]   (* A212959 *)
  • PARI
    a(n)=(6*n^2+8*n+3)\/4 \\ Charles R Greathouse IV, Jul 28 2015

Formula

a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: (1+2*x+3*x^2)/((1+x)*(1-x)^3).
a(n) + A212960(n) = (n+1)^3.
a(n) = (6*n^2 + 8*n + 3 + (-1)^n)/4. - Luce ETIENNE, Apr 05 2014
a(n) = 2*A069905(3*(n+1)+2) - 3*(n+1). - Ayoub Saber Rguez, Aug 31 2021

A056109 Fifth spoke of a hexagonal spiral.

Original entry on oeis.org

1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321, 386, 457, 534, 617, 706, 801, 902, 1009, 1122, 1241, 1366, 1497, 1634, 1777, 1926, 2081, 2242, 2409, 2582, 2761, 2946, 3137, 3334, 3537, 3746, 3961, 4182, 4409, 4642, 4881, 5126, 5377, 5634, 5897, 6166, 6441
Offset: 0

Author

Henry Bottomley, Jun 09 2000

Keywords

Comments

Squared distance from (0,0,-1) to (n,n,n) in R^3. - James R. Buddenhagen, Jun 15 2013

Examples

			Illustration of initial terms:
.
.                                                o
.                           o                 o o o o
.            o           o o o o           o o o o o o o
.   o     o o o o     o o o o o o o     o o o o o o o o o o
.            o           o o o o           o o o o o o o
.                           o                 o o o o
.                                                o
.
.   1        6              17                   34
- _Aaron David Fairbanks_, Feb 16 2025
		

Crossrefs

Cf. A008810, A122430 (prime terms).
Other spirals: A054552.
Cf. A000290.

Programs

  • GAP
    List([0..50],n->3*n^2+2*n+1); # Muniru A Asiru, Oct 07 2018
  • Magma
    [3*n^2 + 2*n + 1: n in [0..50]]; // Vincenzo Librandi, Mar 15 2013
    
  • Maple
    seq(coeff(series(n!*(exp(x)*(3*x^2+5*x+1)),x,n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Oct 07 2018
  • Mathematica
    Table[3 n^2 + 2 n + 1, {n, 0, 100}] (* Vincenzo Librandi, Mar 15 2013 *)
    LinearRecurrence[{3,-3,1},{1,6,17},60] (* Harvey P. Dale, Mar 28 2019 *)
  • PARI
    {a(n) = 3*n^2 + 2*n + 1}; /* Michael Somos, Aug 03 2006 */
    
  • PARI
    Vec((1+3*x+2*x^2)/(1-3*x+3*x^2-x^3)+O(x^100)) \\ Stefano Spezia, Oct 17 2018
    

Formula

a(n) = 3n^2+2n+1 = a(n-1)+6n-1 = 2a(n-1)-a(n-2)+6 = 3a(n-1)-3a(n-2)+a(n-3) = A056105(n)+4n = A056106(n)+3n = A056107(n)+2n = A056108(n)+n = A003215(n)-n.
G.f.: (1+3*x+2*x^2)/(1-3*x+3*x^2-x^3). - Colin Barker, Jan 04 2012
G.f.: (1 + x) * (1 + 2*x) / (1 - x)^3. - Michael Somos, Feb 04 2012
a(n) = A008810(3*n + 1) = A056105(-n). - Michael Somos, Aug 03 2006
E.g.f.: exp(x)*(1 + 5*x + 3*x^2). - Stefano Spezia, Oct 06 2018
a(n) = A000290(n+1) + 2*A000290(n). - Leo Tavares, May 29 2023
a(n) = A069894(n) - A000290(n+1). - Jarrod G. Sage, Jul 19 2024

A056105 First spoke of a hexagonal spiral.

Original entry on oeis.org

1, 2, 9, 22, 41, 66, 97, 134, 177, 226, 281, 342, 409, 482, 561, 646, 737, 834, 937, 1046, 1161, 1282, 1409, 1542, 1681, 1826, 1977, 2134, 2297, 2466, 2641, 2822, 3009, 3202, 3401, 3606, 3817, 4034, 4257, 4486, 4721, 4962, 5209, 5462, 5721, 5986, 6257
Offset: 0

Author

Henry Bottomley, Jun 09 2000

Keywords

Comments

Also the number of (not necessarily maximal) cliques in the n X n grid graph. - Eric W. Weisstein, Nov 29 2017

Examples

			The spiral begins:
                   49--48--47--46--45
                   /                 \
                 50  28--27--26--25  44
                 /   /             \   \
               51  29  13--12--11  24  43
               /   /   /         \   \   \
             52  30  14   4---3  10  23  42  67
             /   /   /   /     \   \   \   \   \
           53  31  15   5   1===2===9==22==41==66==>
             \   \   \   \         /   /   /   /
             54  32  16   6---7---8  21  40  65
               \   \   \             /   /   /
               55  33   17--18--19--20  39  64
                 \   \                 /   /
                 56  34--35--36--37--38  63
                   \                     /
                   57--58--59--60--61--62
		

Crossrefs

Cf. A285792 (prime terms), A113519 (semiprime terms).
Other spirals: A054552.

Programs

Formula

a(n) = 3*n^2 - 2*n + 1.
a(n) = a(n-1) + 6*n - 5.
a(n) = 2*a(n-1) - a(n-2) + 6.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A056106(n) - n = A056107(n) - 2*n.
a(n) = A056108(n) - 3*n = A056109(n) - 4*n = A003215(n) - 5*n.
A008810(3*n-1) = A056109(-n) = a(n). - Michael Somos, Aug 03 2006
G.f.: (1-x+6*x^2)/(1-3*x+3*x^2-x^3). - Colin Barker, Jan 04 2012
From Robert G. Wilson v, Jul 05 2014: (Start)
Each of the 6 primary spokes or rays has a generating formula as stated here:
1st: 90 degrees A056105 3n^2 - 2n + 1
2nd: 30 degrees A056106 3n^2 - n + 1
3rd: 330 degrees A056107 3n^2 + 1
4th: 270 degrees A056108 3n^2 + n + 1
5th: 210 degrees A056109 3n^2 + 2n + 1
6th: 150 degrees A003215 3n^2 + 3n + 1
Each of the 6 secondary spokes or rays has a generating formula as stated here:
1st: 60 degrees 12n^2 - 27n + 16
2nd: 360 degrees 12n^2 - 25n + 14
3rd: 300 degrees 12n^2 - 23n + 12
4th: 240 degrees 12n^2 - 21n + 10
5th: 180 degrees 12n^2 - 19n + 8
6th: 120 degrees 12n^2 - 17n + 6 = A033577(n+1)
(End)
a(n) = 1 + A000567(n). - Omar E. Pol, Apr 26 2017
a(n) = A000290(n-1) + 2*A000290(n), n >= 1. - J. M. Bergot, Mar 03 2018
E.g.f.: (1 + x + 3*x^2)*exp(x). - G. C. Greubel, Dec 02 2018

A184703 T(n,k) is the number of strings of numbers x(i=1..n) in 0..k with sum i*x(i) equal to k*n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 2, 3, 2, 1, 3, 6, 7, 3, 1, 3, 9, 14, 12, 4, 1, 4, 12, 28, 34, 21, 5, 1, 4, 17, 46, 78, 74, 35, 6, 1, 5, 22, 74, 156, 207, 154, 58, 8, 1, 5, 27, 107, 282, 476, 504, 304, 91, 10, 1, 6, 34, 154, 471, 985, 1349, 1169, 580, 142, 12, 1, 6, 41, 208, 744, 1842, 3142, 3571, 2574, 1066, 215, 15
Offset: 1

Author

R. H. Hardin, Jan 20 2011

Keywords

Comments

T(n,k) is the number of integer lattice points in k*P_n, where P_n is the polytope in R^n defined by the constraints 0 <= x_i <= 1 and Sum_{i=1..n} i x_i = n. Thus for each n, T(n,k) is an Ehrhart quasi-polynomial. - Robert Israel, Dec 21 2022

Examples

			Table starts:
   1   1    1    1     1     1      1      1       1       1       1       1
   1   2    2    3     3     4      4      5       5       6       6       7
   2   3    6    9    12    17     22     27      34      41      48      57
   2   7   14   28    46    74    107    154     208     278     357     456
   3  12   34   78   156   282    471    744    1119    1623    2279    3118
   4  21   74  207   476   985   1842   3226    5325    8414   12766   18789
   5  35  154  504  1349  3142   6575  12688   22923   39266   64315  101460
   6  58  304 1169  3571  9353  21713  46037   90595  167917  295811  499442
   8  91  580 2574  8939 26146  67105 155645  332729  665317 1257898 2268061
  10 142 1066 5439 21310 69331 195760 495251 1146377 2467215 4994696 9599863
Some solutions for n=5, k=4:
  4   4   2   0   1   2   1   0   2   4   0   0   4   0   2   2
  1   2   3   1   2   0   2   0   1   1   0   0   0   2   2   1
  2   1   4   0   1   2   2   1   4   0   4   0   4   0   2   2
  2   1   0   2   3   3   1   3   1   1   2   0   1   4   2   0
  0   1   0   2   0   0   1   1   0   2   0   4   0   0   0   2
		

Crossrefs

Column 1 is A000009.
Row 3 is A008810(n+1).

Programs

  • Maple
    S:= proc(n,k,s) option remember; local j;
      if n = 1 then
        if s <= k then return 1 else return 0 fi
      fi;
      add(procname(n-1,k,s-j*n), j=0..min(s/n,k))
    end proc:
    [seq(seq(S(n,m-n,(m-n)*n),n=1..m-1),m=1..20)]; # Robert Israel, Dec 21 2022
  • Mathematica
    S[n_, k_, s_] := S[n, k, s] = Module[{}, If[n == 1, If[s <= k, Return@1, Return@0]]; Sum[S[n - 1, k, s - j*n], {j, 0, Min[s/n, k]}]];
    Table[Table[S[n, m - n, (m - n)*n], {n, 1, m - 1}], {m, 1, 20}] // Flatten (* Jean-François Alcover, Aug 21 2023, after Robert Israel *)

A225345 T(n,k) = Number of n X k {-1,1}-arrays such that the sum over i=1..n,j=1..k of i*x(i,j) is zero, the sum of x(i,j) is zero, and rows are nondecreasing (number of ways to distribute k-across galley oarsmen left-right at n fore-aft positions so that there are no turning moments on the ship).

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 3, 0, 1, 0, 3, 6, 7, 0, 0, 1, 0, 9, 0, 15, 0, 1, 0, 3, 12, 31, 0, 33, 8, 0, 1, 0, 17, 0, 107, 0, 77, 0, 1, 0, 5, 22, 81, 0, 395, 410, 181, 0, 0, 1, 0, 27, 0, 397, 0, 1525, 0, 443, 0, 1, 0, 5, 34, 171, 0, 2073, 4508, 6095, 0, 1113, 58, 0, 1, 0, 41, 0, 1081, 0
Offset: 1

Author

R. H. Hardin, May 05 2013

Keywords

Comments

Table starts
.0...1...0.....1....0......1.....0.......1.....0........1......0........1
.0...1...0.....1....0......1.....0.......1.....0........1......0........1
.0...1...0.....3....0......3.....0.......5.....0........5......0........7
.2...3...6.....9...12.....17....22......27....34.......41.....48.......57
.0...7...0....31....0.....81.....0.....171.....0......309......0......509
.0..15...0...107....0....397.....0....1081.....0.....2399......0.....4675
.0..33...0...395....0...2073.....0....7261.....0....19709......0....45385
.8..77.410..1525.4508..11291.25056...50659.95130...168289.283338...457627
.0.181...0..6095....0..63121.....0..364051.....0..1478059......0..4749875
.0.443...0.24893....0.360909.....0.2676331.....0.13280209......0.50435657

Examples

			Some solutions for n=4, k=4
.-1.-1.-1..1...-1.-1..1..1...-1..1..1..1...-1.-1.-1.-1...-1.-1.-1..1
.-1..1..1..1...-1..1..1..1...-1.-1.-1..1....1..1..1..1....1..1..1..1
.-1..1..1..1...-1.-1.-1.-1...-1.-1.-1..1....1..1..1..1...-1.-1.-1..1
.-1.-1.-1..1...-1..1..1..1...-1..1..1..1...-1.-1.-1.-1...-1.-1..1..1
		

Crossrefs

Column 1 is A063074(n/4).
Row 3 is A063196(n/2+1).
Row 4 is A008810(n+1).
Row 5 is A202254(n/2).

Formula

Empirical for row n:
n=1: a(n) = a(n-2);
n=2: a(n) = a(n-2);
n=3: a(n) = a(n-2) +a(n-4) -a(n-6);
n=4: a(n) = 2*a(n-1) -a(n-2) +a(n-3) -2*a(n-4) +a(n-5);
n=5: a(n) = 3*a(n-2) -2*a(n-4) -2*a(n-6) +3*a(n-8) -a(n-10);
n=6: [order 26, even n];
n=7: [order 42, even n];
n=8: [order 28];
n=9: [order 58, even n];
n=10: [order 90, even n];
n=11: [order 102, even n];
n=12: [order 66].

A229093 The clubs patterns appearing in n X n coins.

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 9, 12, 17, 22, 27, 34, 41, 48, 57, 66, 75, 86, 97, 108, 121, 134, 147, 162, 177, 192, 209, 226, 243, 262, 281, 300, 321, 342, 363, 386, 409, 432, 457, 482, 507, 534, 561, 588, 617, 646, 675, 706, 737, 768, 801, 834, 867, 902, 937, 972, 1009, 1046
Offset: 0

Author

Kival Ngaokrajang, Sep 13 2013

Keywords

Comments

On the Japanese TV show "Tsuki no Koibito", a girl told her boyfriend that she saw a heart in 4 coins. Actually there are a total of 6 distinct patterns appearing in 2 X 2 coins in which each pattern consists of a part of the perimeter of each coin and forms a continuous area.
a(n) is the number of clubs patterns appearing in n X n coins. It is also A008810(n-1), except for the third term. The inverse patterns (stars or voids between clubs) is A030511 (except the second term). See illustration in links.

Crossrefs

Cf. A008810, A030511, A074148 (heart patterns), A227906, A229154.

Programs

  • Mathematica
    CoefficientList[Series[(x^7 - 2 x^6 + x^5 - x^4 + x^3 - x^2 - 1)/((x - 1)^3 (x^2 + x + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 08 2013 *)
    LinearRecurrence[{2,-1,1,-2,1},{0,0,1,2,4,6,9,12,17,22},70] (* Harvey P. Dale, Feb 05 2020 *)
  • PARI
    Vec(x^2*(x^7-2*x^6+x^5-x^4+x^3-x^2-1)/((x-1)^3*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Oct 08 2013
    
  • PARI
    a(n) = ceil((n-1)^2/3) \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) = ceiling((n-1)^2/3), a(0) = 0, a(4) = 4.
G.f.: x^2*(x^7-2*x^6+x^5-x^4+x^3-x^2-1) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Oct 07 2013

Extensions

More terms from Colin Barker, Oct 08 2013

A008812 Expansion of (1+x^5)/((1-x)^2*(1-x^5)).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 11, 14, 17, 20, 25, 30, 35, 40, 45, 52, 59, 66, 73, 80, 89, 98, 107, 116, 125, 136, 147, 158, 169, 180, 193, 206, 219, 232, 245, 260, 275, 290, 305, 320, 337, 354, 371, 388, 405, 424, 443, 462, 481, 500, 521, 542, 563, 584, 605, 628, 651, 674
Offset: 0

Keywords

Comments

Number of 0..n arrays of six elements with zero second differences. - R. H. Hardin, Nov 16 2011
Also number of ordered triples (w,x,y) with all terms in {1,...,n+1} and w + 4*x = 5*y. Also the number of 3-tuples (w,x,y) with all terms in {1,...,n+1} and 5*w = 2*x +3*y. - Clark Kimberling, Apr 15 2012 [Corrected by Pontus von Brömssen, Jan 26 2020]
a(n) is also the number of 5 boxes polyomino (zig-zag patterns) packing into (n+3) X (n+3) square. See illustration in links. - Kival Ngaokrajang, Nov 10 2013
Also, number of ordered pairs (x,y) with both terms in {1,...,n+1} and x+4*y divisible by 5; or number of ordered pairs (x,y) with both terms in {1,...,n+1} and 2*x+3*y divisible by 5. - Pontus von Brömssen, Jan 26 2020

Examples

			For n = 5 there are 8 0..5 arrays of six elements with zero second differences: [0,0,0,0,0,0], [0,1,2,3,4,5], [1,1,1,1,1,1], [2,2,2,2,2,2], [3,3,3,3,3,3], [4,4,4,4,4,4], [5,4,3,2,1,0], [5,5,5,5,5,5].
		

Crossrefs

Cf. A130497 (first differences).
Cf. Expansions of the form (1+x^m)/((1-x)^2*(1-x^m)): A000290 (m=1), A000982 (m=2), A008810 (m=3), A008811 (m=4), this sequence (m=5), A008813 (m=6), A008814 (m=7), A008815 (m=8), A008816 (m=9), A008817 (m=10).

Programs

  • GAP
    a:=[1,2,3,4,5,8,11];; for n in [8..65] do a[n]:=2*a[n-1]-a[n-2] +a[n-5]-2*a[n-6]+a[n-7]; od; a; # G. C. Greubel, Sep 12 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 65); Coefficients(R!( (1+x^5)/((1-x)^2*(1-x^5)) )); // G. C. Greubel, Sep 12 2019
    
  • Maple
    seq(coeff(series((1+x^5)/((1-x)^2*(1-x^5)), x, n+1), x, n), n = 0..65); # G. C. Greubel, Sep 12 2019
  • Mathematica
    CoefficientList[Series[(1+x^5)/(1-x)^2/(1-x^5),{x,0,65}],x] (* or *) LinearRecurrence[{2,-1,0,0,1,-2,1}, {1,2,3,4,5,8,11}, 65] (* Harvey P. Dale, Apr 17 2015 *)
  • PARI
    Vec((1+x^5)/(1-x)^2/(1-x^5)+O(x^65)) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Sage
    def A008812_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1+x^5)/((1-x)^2*(1-x^5))).list()
    A008812_list(65) # G. C. Greubel, Sep 12 2019
    

Formula

G.f.: (1+x^5)/((1-x)^2*(1-x^5)).
a(n) = 2*a(n-1) -a(n-2) +a(n-5) -2*a(n-6) +a(n-7). - R. H. Hardin, Nov 16 2011

Extensions

More terms added by G. C. Greubel, Sep 12 2019

A008811 Expansion of x*(1+x^4)/((1-x)^2*(1-x^4)).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 10, 13, 16, 21, 26, 31, 36, 43, 50, 57, 64, 73, 82, 91, 100, 111, 122, 133, 144, 157, 170, 183, 196, 211, 226, 241, 256, 273, 290, 307, 324, 343, 362, 381, 400, 421, 442, 463, 484, 507, 530, 553, 576, 601, 626, 651, 676, 703, 730, 757, 784, 813
Offset: 0

Keywords

Comments

Number of 0..n-1 arrays of 5 elements with zero 2nd differences. - R. H. Hardin, Nov 15 2011

Crossrefs

Cf. A129756 (first differences).
Cf. Expansions of the form (1+x^m)/((1-x)^2*(1-x^m)): A000290 (m=1), A000982 (m=2), A008810 (m=3), this sequence (m=4), A008812 (m=5), A008813 (m=6), A008814 (m=7), A008815 (m=8), A008816 (m=9), A008817 (m=10).

Programs

  • GAP
    a:=[0,1,2,3,4,7];; for n in [7..60] do a[n]:=2*a[n-1]-a[n-2] +a[n-4]-2*a[n-5]+a[n-6]; od; a; # G. C. Greubel, Sep 12 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( x*(1+x^4)/((1-x)^2*(1-x^4)) )); // G. C. Greubel, Sep 12 2019
    
  • Maple
    f := n->n^2/4+3*n/2+g(n);
    g := n->if n mod 2 = 0 then 3 elif n mod 4 = 1 then 9/4 else 13/4; fi;
    seq(f(n), n=-3..50);
  • Mathematica
    CoefficientList[Series[x*(1+x^4)/((1-x)^2*(1-x^4)), {x,0,60}], x] (* G. C. Greubel, Sep 12 2019 *)
  • PARI
    concat([0], Vec(x*(1+x^4)/((1-x)^2*(1-x^4))+O(x^60))) \\ Charles R Greathouse IV, Sep 26 2012, modified by G. C. Greubel, Sep 12 2019
    
  • Sage
    def A008811_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+x^4)/((1-x)^2*(1-x^4))).list()
    A008811_list(60) # G. C. Greubel, Sep 12 2019
    

Formula

G.f.: x*(1+x^4)/((1-x)^2*(1-x^4)).
a(n) = 2*a(n-1) -a(n-2) +a(n-4) -2*a(n-5) +a(n-6). - R. H. Hardin, Nov 15 2011
a(n) = (-2*(1+(-1)^n)*(-1)^floor(n/2) + 2*n^2 + 5 - (-1)^n)/8. - Tani Akinari, Jul 24 2013
E.g.f.: ((2 + x + x^2)*cosh(x) + (3 + x + x^2)*sinh(x) - 2*cos(x))/4. - Stefano Spezia, May 26 2021
Sum_{n>=1} 1/a(n) = Pi^2/24 + tanh(Pi/2)*Pi/4 + tanh(sqrt(3)*Pi/2)*Pi/sqrt(3). - Amiram Eldar, Aug 25 2022
a(n) = 2*floor((n^2 + 4)/8) + (n mod 2). - Ridouane Oudra, Sep 08 2023

A225310 T(n,k)=Number of nXk -1,1 arrays such that the sum over i=1..n,j=1..k of i*x(i,j) is zero and rows are nondecreasing (ways to put k thrusters pointing east or west at each of n positions 1..n distance from the hinge of a south-pointing gate without turning the gate).

Original entry on oeis.org

0, 1, 0, 0, 1, 2, 1, 0, 3, 2, 0, 3, 6, 7, 0, 1, 0, 9, 16, 15, 0, 0, 3, 12, 31, 0, 35, 8, 1, 0, 17, 52, 113, 0, 87, 14, 0, 5, 22, 83, 0, 443, 474, 217, 0, 1, 0, 27, 122, 427, 0, 1787, 1576, 547, 0, 0, 5, 34, 175, 0, 2341, 5304, 7445, 0, 1417, 70, 1, 0, 41, 238, 1165, 0, 13333, 26498
Offset: 1

Author

R. H. Hardin May 05 2013

Keywords

Comments

Table starts
..0....1....0......1.....0.......1......0........1......0.........1.......0
..0....1....0......3.....0.......3......0........5......0.........5.......0
..2....3....6......9....12......17.....22.......27.....34........41......48
..2....7...16.....31....52......83....122......175....238.......317.....410
..0...15....0....113.....0.....427......0.....1165......0......2591.......0
..0...35....0....443.....0....2341......0.....8221......0.....22351.......0
..8...87..474...1787..5304...13333..29638....60007.112790....199669..336342
.14..217.1576...7445.26498...77721.197440...449693.939130...1828785.3360554
..0..547....0..31593.....0..461973......0..3437315......0..17085339.......0
..0.1417....0.136351.....0.2791167......0.26700429......0.162204059.......0

Examples

			Some solutions for n=4 k=4
..1..1..1..1...-1.-1..1..1...-1.-1.-1..1....1..1..1..1...-1..1..1..1
..1..1..1..1...-1..1..1..1...-1.-1.-1..1...-1.-1.-1.-1...-1.-1..1..1
.-1.-1.-1.-1....1..1..1..1...-1..1..1..1....1..1..1..1...-1..1..1..1
.-1.-1..1..1...-1.-1.-1.-1...-1.-1..1..1...-1.-1.-1..1...-1.-1.-1..1
		

Crossrefs

Column 1 is A063865
Column 2 is A007576
Row 3 is A008810(n+1)

Formula

Empirical for row n:
n=1: a(n) = a(n-2)
n=2: a(n) = a(n-2) +a(n-4) -a(n-6)
n=3: a(n) = 2*a(n-1) -a(n-2) +a(n-3) -2*a(n-4) +a(n-5)
n=4: a(n) = a(n-1) +a(n-2) -2*a(n-5) +a(n-8) +a(n-9) -a(n-10)
n=5: [order 18]
n=6: [order 42]
n=7: [order 24]
n=8: [order 36]
Showing 1-10 of 28 results. Next