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-6 of 6 results.

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

Views

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

A094728 Triangle read by rows: T(n,k) = n^2 - k^2, 0 <= k < n.

Original entry on oeis.org

1, 4, 3, 9, 8, 5, 16, 15, 12, 7, 25, 24, 21, 16, 9, 36, 35, 32, 27, 20, 11, 49, 48, 45, 40, 33, 24, 13, 64, 63, 60, 55, 48, 39, 28, 15, 81, 80, 77, 72, 65, 56, 45, 32, 17, 100, 99, 96, 91, 84, 75, 64, 51, 36, 19, 121, 120, 117, 112, 105, 96, 85, 72, 57, 40, 21
Offset: 1

Views

Author

Reinhard Zumkeller, May 24 2004

Keywords

Comments

(T(n,k) mod 4) <> 2, see A042965, A016825.
All numbers m occur A034178(m) times.
The row polynomials T(n,x) appear in the calculation of the column g.f.s of triangle A120070 (used to find the frequencies of the spectral lines of the hydrogen atom).

Examples

			n=3: T(3,x) = 9+8*x+5*x^2.
Triangle begins:
   1;
   4,  3;
   9,  8,  5;
  16, 15, 12,  7;
  25, 24, 21, 16,  9;
  36, 35, 32, 27, 20, 11;
  49, 48, 45, 40, 33, 24, 13;
  64, 63, 60, 55, 48, 39, 28, 15;
  81, 80, 77, 72, 65, 56, 45, 32, 17;
  ... etc. - _Philippe Deléham_, Mar 07 2013
		

Crossrefs

Programs

  • Magma
    [n^2-k^2: k in [0..n-1], n in [1..15]]; // G. C. Greubel, Mar 12 2024
    
  • Mathematica
    Table[n^2 - k^2, {n,12}, {k,0,n-1}]//Flatten (* Michael De Vlieger, Nov 25 2015 *)
  • SageMath
    flatten([[n^2-k^2 for k in range(n)] for n in range(1,16)]) # G. C. Greubel, Mar 12 2024

Formula

Row polynomials: T(n,x) = n^2*Sum_{m=0..n} x^m - Sum_{m=0..n} m^2*x^m = Sum_{k=0..n-1} T(n,k)*x^k, n >= 1.
T(n, k) = A004736(n,k)*A094727(n,k).
T(n, 0) = A000290(n).
T(n, 1) = A005563(n-1) for n>1.
T(n, 2) = A028347(n) for n>2.
T(n, 3) = A028560(n-3) for n>3.
T(n, 4) = A028566(n-4) for n>4.
T(n, n-1) = A005408(n).
T(n, n-2) = A008586(n-1) for n>1.
T(n, n-3) = A016945(n-2) for n>2.
T(n, n-4) = A008590(n-2) for n>3.
T(n, n-5) = A017329(n-3) for n>4.
T(n, n-6) = A008594(n-3) for n>5.
T(n, n-8) = A008598(n-2) for n>7.
T(A005408(k), k) = A000567(k).
Sum_{k=0..n} T(n, k) = A002412(n) (row sums).
From G. C. Greubel, Mar 12 2024: (Start)
Sum_{k=0..n-1} (-1)^k * T(n, k) = A000384(floor((n+1)/2)).
Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A128624(n).
Sum_{k=0..floor((n-1)/2)} (-1)^k*T(n-k, k) = (1/2)*n*(n+1 - (-1)^n*cos(n*Pi/2)). (End)
G.f.: x*(1 - 3*x^2*y + x*(1 + y))/((1 - x)^3*(1 - x*y)^2). - Stefano Spezia, Aug 04 2025

A088003 Take the list t(n,0) = {1,...,n}; denote by t(n,j) this list after rotating to left (or right) by j positions. Calculate inner product of t(n,0) and t(n,j) and denote the value by s(n,j). Compute this inner product for all j = 1..n and choose the smallest. This is a(n).

Original entry on oeis.org

1, 4, 11, 22, 40, 64, 98, 140, 195, 260, 341, 434, 546, 672, 820, 984, 1173, 1380, 1615, 1870, 2156, 2464, 2806, 3172, 3575, 4004, 4473, 4970, 5510, 6080, 6696, 7344, 8041, 8772, 9555, 10374, 11248, 12160, 13130, 14140, 15211, 16324, 17501, 18722, 20010
Offset: 1

Views

Author

Labos Elemer, Oct 14 2003

Keywords

Comments

If the largest were chosen rather than the smallest, then A000330(n), the square pyramidal numbers, would be obtained. Also, if the inner product of t with 1-rotated-t is calculated, then A006527(n) is produced.
From Jonathan Halabi, Dec 25 2017, on behalf of Maya Nicklas: (Start)
a(n) is the number of squares (of any size) that occur in a skewed n X n chessboard, having n rows of n squares, each offset by one square from the row above. For instance, a(4) is the number of squares in this diagram:
XXXX
.XXXX
..XXXX
...XXXX
which is 22.
(End)
It seems that if we connect the top row of this skewed board with its bottom row (in the same skewed way), i.e., make the board toroidal, and count squares, we will get A128624. - Andrey Zabolotskiy, Dec 25 2017

Examples

			For n=6: t(6,0) = {1,2,3,4,5,6}, t(6,3) = {4,5,6,1,2,3};
compute scalar products for all rotations:
{76,67,64,67,76,91} of which the smallest is 64, so a(6)=64.
		

Crossrefs

Programs

  • Mathematica
    t0[x_] := Table[w, {w, 1, x}]; jr[x_, j_] := RotateRight[t0[x], j]; Table[Min[Table[Apply[Plus, t0[g]*jr[g, i]], {i, 1, g}]], {g, 1, up}]

Formula

a(n) = Min{y; y=t(n, 0)*t(n, x)=s(n, x); for x=1..n}.
a(n) = n*(2*n*(5*n+12)-3*(-1)^n+11)/48.
G.f.: x*(1+2*x+2*x^2)/((1+x)^2*(1-x)^4). - Bruno Berselli, Dec 01 2010
For n >= 1, a(n) = A000330(n) - A034828(n). - Luce ETIENNE, Aug 11 2014
a(n) = Sum_{i=0..floor(n/2)} (n-i)*(n-2*i). For n=7, a(7) = 7*7 + 6*5 + 5*3 + 4*1 = 98. - Bruno Berselli, Oct 26 2015

Extensions

Edited by Bruno Berselli, Dec 01 2010

A005996 G.f.: 2*(1-x^3)/((1-x)^5*(1+x)^2).

Original entry on oeis.org

2, 6, 16, 30, 54, 84, 128, 180, 250, 330, 432, 546, 686, 840, 1024, 1224, 1458, 1710, 2000, 2310, 2662, 3036, 3456, 3900, 4394, 4914, 5488, 6090, 6750, 7440, 8192, 8976, 9826, 10710, 11664, 12654, 13718, 14820, 16000, 17220, 18522, 19866, 21296, 22770, 24334
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of triples (w,x,y) having all terms in {0,...,n} and wClark Kimberling, Jun 10 2012
a(n) is also the sum of all elements of the square matrix M(n-1) = M1(n-1) x M2(n-1), where M1(n) is the square matrix with elements m1(i,j)= (1+(-1)^(i+j+1))/2, A057212; and M2(n) is the square matrix given by m2(i,j)= (1+(-1)^(i+j))/2, A057212. - Enrique Pérez Herrero, Jun 15 2013
Also the number of longest paths in the (n+1)-web graph for n > 2. - Eric W. Weisstein, Mar 27 2018
a(n) also is the number of undirected rook moves on an n X n chessboard, taken up to 180 degree rotation and axial reflections (horizontal and vertical), for n >= 2. - Hilko Koning, Aug 16 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially twice A034828.

Programs

  • Mathematica
    Table[(1/4)*(1 + n)*(-2 + 5*n + n^2 + 2*Ceiling[1/2 - n/2] - 4*Floor[n/2]), {n, 1, 200}] (* Enrique Pérez Herrero, Aug 03 2012 *)
    CoefficientList[Series[2 (1 - x^3)/((1 - x)^5 (1 + x)^2), {x, 0, 40}], x] (* Harvey P. Dale, Apr 08 2013 *)
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {2, 6, 16, 30, 54, 84}, 40] (* Harvey P. Dale, Apr 08 2013 *)
    Table[(n + 1) (2 n (n + 2) + 1 - (-1)^n)/8, {n, 20}] (* Eric W. Weisstein, Mar 27 2018 *)

Formula

a(n) = 2*(A006918(n) + A006918(n-1) + A006918(n-2)), n>1. - Ralf Stephan, Apr 26 2003
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(1)=2, a(2)=6, a(3)=16, a(4)=30, a(5)=54, a(6)=84. - Harvey P. Dale, Apr 08 2013
From Ayoub Saber Rguez, Nov 20 2021: (Start)
a(n) = A143785(n) - A002620(n+1).
a(n) = A128624(n) + A002620(n+1).
a(n) = (n^3 + 3*n^2 + 2*n + 1 + n*(n mod 2) - ((n+1) mod 2))/4. (End)

Extensions

Edited by N. J. A. Sloane, Aug 03 2012

A128623 Triangle read by rows: A128621 * A000012 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 2, 6, 3, 3, 8, 8, 4, 4, 15, 10, 10, 5, 5, 18, 18, 12, 12, 6, 6, 28, 21, 21, 14, 14, 7, 7, 32, 32, 24, 24, 16, 16, 8, 8, 45, 36, 36, 27, 27, 18, 18, 9, 9, 50, 50, 40, 40, 30, 30, 20, 20, 10, 10, 66, 55, 55, 44, 44, 33, 33, 22, 22, 11, 11, 72, 72, 60, 60, 48, 48, 36, 36, 24, 24, 12, 12, 91, 78, 78, 65, 65, 52, 52, 39, 39, 26, 26, 13, 13
Offset: 1

Views

Author

Gary W. Adamson, Mar 14 2007

Keywords

Examples

			First few rows of the triangle are:
   1;
   2,  2;
   6,  3,  3;
   8,  8,  4,  4;
  15, 10, 10,  5,  5;
  18, 18, 12, 12,  6, 6;
  28, 21, 21, 14, 14, 7, 7;
  ...
		

Crossrefs

Programs

  • Magma
    [n*Floor((n-k+2)/2): k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 13 2024
    
  • Mathematica
    Table[n*Floor[(n-k+2)/2], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 13 2024 *)
  • SageMath
    flatten([[n*((n-k+2)//2) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 13 2024

Formula

Sum_{k=1..n} T(n, k) = A128624(n) (row sums).
T(n,k) = n*(1+floor((n-k)/2)), 1 <= k <= n. - R. J. Mathar, Jun 27 2012
From G. C. Greubel, Mar 13 2024: (Start)
T(n, k) = n*A115514(n, k).
T(n, k) = Sum_{j=k..n} A128621(n, j).
T(n, 1) = A093005(n).
T(n, 2) = A093353(n-1), n >= 2.
T(n, n) = A000027(n).
T(2*n-1, n) = A245524(n).
Sum_{k=1..n} (-1)^k*T(n, k) = (1/2)*(1-(-1)^n)*A000384(floor((n+1)/2)). (End)

Extensions

a(41) = 27 inserted and more terms from Georg Fischer, Jun 05 2023

A227356 Partial sums of A129361.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 65, 112, 193, 324, 544, 900, 1489, 2442, 4005, 6534, 10660, 17336, 28193, 45760, 74273, 120408, 195200, 316216, 512257, 829458, 1343077, 2174130, 3519412, 5696124, 9219105, 14919408, 24144289
Offset: 1

Views

Author

Kival Ngaokrajang, Jul 08 2013

Keywords

Comments

Sum of labeled numbers of boxes arranged as Pyramid type-II with base Fibonacci(n).
Let us call a Pyramid "type-I" when each row starts with the same number as the leftmost base number, and "type-II" when each column has the same number as the base.
The Pyramid arrangements are related to other sequences as follows:
Base Number Type-I Type-II
----------- ------ -------
Natural A002623 A034828
Fibonacci A129696 a(n)
1,0 A008805
See illustration in links.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,1,-3,1,-1,0,1},{1,2,5,10,20,36,65},40] (* Harvey P. Dale, Jun 30 2025 *)

Formula

For n >=2, a(n) = a(n-1) + A129361(n-1).
G.f. -x*(1+x)*(x^2-x+1) / ( (x-1)*(x^2+x-1)*(x^4+x^2-1) ). - Joerg Arndt, Jul 10 2013
a(n) = 2 + A000045(n+4) - A096748(n+6). - R. J. Mathar, Jul 20 2013
Showing 1-6 of 6 results.