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

A002415 4-dimensional pyramidal numbers: a(n) = n^2*(n^2-1)/12.

Original entry on oeis.org

0, 0, 1, 6, 20, 50, 105, 196, 336, 540, 825, 1210, 1716, 2366, 3185, 4200, 5440, 6936, 8721, 10830, 13300, 16170, 19481, 23276, 27600, 32500, 38025, 44226, 51156, 58870, 67425, 76880, 87296, 98736, 111265, 124950, 139860, 156066, 173641, 192660, 213200, 235340
Offset: 0

Views

Author

Keywords

Comments

Also number of ways to legally insert two pairs of parentheses into a string of m := n-1 letters. (There are initially 2C(m+4,4) (A034827) ways to insert the parentheses, but we must subtract 2(m+1) for illegal clumps of 4 parentheses, 2m(m+1) for clumps of 3 parentheses, C(m+1,2) for 2 clumps of 2 parentheses and (m-1)C(m+1,2) for 1 clump of 2 parentheses, giving m(m+1)^2(m+2)/12 = n^2*(n^2-1)/12.) See also A000217.
E.g., for n=2 there are 6 ways: ((a))b, ((a)b), ((ab)), (a)(b), (a(b)), a((b)).
Let M_n denote the n X n matrix M_n(i,j)=(i+j); then the characteristic polynomial of M_n is x^(n-2) * (x^2-A002378(n)*x - a(n)). - Benoit Cloitre, Nov 09 2002
Let M_n denote the n X n matrix M_n(i,j)=(i-j); then the characteristic polynomial of M_n is x^n + a(n)x^(n-2). - Michael Somos, Nov 14 2002 [See A114327 for the infinite matrix M in triangular form. - Wolfdieter Lang, Feb 05 2018]
Number of permutations of [n] which avoid the pattern 132 and have exactly 2 descents. - Mike Zabrocki, Aug 26 2004
Number of tilings of a <2,n,2> hexagon.
a(n) is the number of squares of side length at least 1 having vertices at the points of an n X n unit grid of points (the vertices of an n-1 X n-1 chessboard). [For a proof, see Comments in A051602. - N. J. A. Sloane, Sep 29 2021] For example, on the 3 X 3 grid (the vertices of a 2 X 2 chessboard) there are four 1 X 1 squares, one (skew) sqrt(2) X sqrt(2) square, and one 3 X 3 square, so a(3)=6. On the 4 X 4 grid (the vertices of a 3 X 3 chessboard) there are 9 1 X 1 squares, 4 2 X 2 squares, 1 3 X 3 square, 4 sqrt(2) X sqrt(2) squares, and 2 sqrt(5) X sqrt(5) squares, so a(4) = 20. See also A024206, A108279. [Comment revised by N. J. A. Sloane, Feb 11 2015]
Kekulé numbers for certain benzenoids. - Emeric Deutsch, Jun 12 2005
Number of distinct components of the Riemann curvature tensor. - Gene Ward Smith, Apr 24 2006
a(n) is the number of 4 X 4 matrices (symmetrical about each diagonal) M = [a,b,c,d;b,e,f,c;c,f,e,b;d,c,b,a] with a+b+c+d=b+e+f+c=n+2; (a,b,c,d,e,f natural numbers). - Philippe Deléham, Apr 11 2007
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-3) is the number of 5-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
a(n) is the number of Dyck (n+1)-paths with exactly n-1 peaks. - David Callan, Sep 20 2007
Starting (1,6,20,50,...) = third partial sums of binomial transform of [1,2,0,0,0,...]. a(n) = Sum_{i=0..n} C(n+3,i+3)*b(i), where b(i)=[1,2,0,0,0,...]. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
4-dimensional square numbers. - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
Equals row sums of triangle A177877; a(n), n > 1 = (n-1) terms in (1,2,3,...) dot (...,3,2,1) with additive carryovers. Example: a(4) = 20 = (1,2,3) dot (3,2,1) with carryovers = (1*3) + (2*2 + 3) + (3*1 + 7) = (3 + 7 + 10).
Convolution of the triangular numbers A000217 with the odd numbers A004273.
a(n+2) is the number of 4-tuples (w,x,y,z) with all terms in {0,...,n} and w-x=max{w,x,y,z}-min{w,x,y,z}. - Clark Kimberling, May 28 2012
The second level of finite differences is a(n+2) - 2*a(n+1) + a(n) = (n+1)^2, the squares. - J. M. Bergot, May 29 2012
Because the differences of this sequence give A000330, this is also the number of squares in an n+1 X n+1 grid whose sides are not parallel to the axes.
a(n+2) gives the number of 2*2 arrays that can be populated with 0..n such that rows and columns are nondecreasing. - Jon Perry, Mar 30 2013
For n consecutive numbers 1,2,3,...,n, the sum of all ways of adding the k-tuples of consecutive numbers for n=a(n+1). As an example, let n=4: (1)+(2)+(3)+(4)=10; (1+2)+(2+3)+(3+4)=15; (1+2+3)+(2+3+4)=15; (1+2+3+4)=10 and the sum of these is 50=a(4+1)=a(5). - J. M. Bergot, Apr 19 2013
If P(n,k) = n*(n+1)*(k*n-k+3)/6 is the n-th (k+2)-gonal pyramidal number, then a(n) = P(n,k)*P(n-1,k-1) - P(n-1,k)*P(n,k-1). - Bruno Berselli, Feb 18 2014
For n > 1, a(n) = 1/6 of the area of the trapezoid created by the points (n,n+1), (n+1,n), (1,n^2+n), (n^2+n,1). - J. M. Bergot, May 14 2014
For n > 3, a(n) is twice the area of a triangle with vertices at points (C(n,4),C(n+1,4)), (C(n+1,4),C(n+2,4)), and (C(n+2,4),C(n+3,4)). - J. M. Bergot, Jun 03 2014
a(n) is the dimension of the space of metric curvature tensors (those having the symmetries of the Riemann curvature tensor of a metric) on an n-dimensional real vector space. - Daniel J. F. Fox, Dec 15 2018
Coefficients in the terminating series identity 1 - 6*n/(n + 5) + 20*n*(n - 1)/((n + 5)*(n + 6)) - 50*n*(n - 1)*(n - 2)/((n + 5)*(n + 6)*(n + 7)) + ... = 0 for n = 1,2,3,.... Cf. A000330 and A005585. - Peter Bala, Feb 18 2019

Examples

			a(7) = 6*21 - (6*0 + 4*1 + 2*3 + 0*6 - 2*10 - 4*15) = 196. - _Bruno Berselli_, Jun 22 2013
G.f. = x^2 + 6*x^3 + 20*x^4 + 50*x^5 + 105*x^6 + 196*x^7 + 336*x^8 + ...
		

References

  • O. D. Anderson, Find the next sequence, J. Rec. Math., 8 (No. 4, 1975-1976), 241.
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 195.
  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p.165).
  • R. Euler and J. Sadek, "The Number of Squares on a Geoboard", Journal of Recreational Mathematics, 251-5 30(4) 1999-2000 Baywood Pub. NY
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 238.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = ((-1)^n)*A053120(2*n, 4)/8 (one-eighth of fifth unsigned column of Chebyshev T-triangle, zeros omitted). Cf. A001296.
Second row of array A103905.
Third column of Narayana numbers A001263.
Partial sums of A000330.
The expression binomial(m+n-1,n)^2-binomial(m+n,n+1)*binomial(m+n-2,n-1) for the values m = 2 through 14 produces sequences A000012, A000217, A002415, A006542, A006857, A108679, A134288, A134289, A134290, A134291, A140925, A140935, A169937.
Cf. A220212 for a list of sequences produced by the convolution of the natural numbers (A000027) with the k-gonal numbers.

Programs

  • GAP
    List([0..45],n->Binomial(n^2,2)/6); # Muniru A Asiru, Dec 15 2018
  • Magma
    [n^2*(n^2-1)/12: n in [0..50]]; // Wesley Ivan Hurt, May 14 2014
    
  • Maple
    A002415 := proc(n) binomial(n^2,2)/6 ; end proc: # Zerinvary Lajos, Jan 07 2008
  • Mathematica
    Table[(n^4 - n^2)/12, {n, 0, 40}] (* Zerinvary Lajos, Mar 21 2007 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,1,6,20},40] (* Harvey P. Dale, Nov 29 2011 *)
  • PARI
    a(n) = n^2 * (n^2 - 1) / 12;
    
  • PARI
    x='x+O('x^200); concat([0, 0], Vec(x^2*(1+x)/(1-x)^5)) \\ Altug Alkan, Mar 23 2016
    

Formula

G.f.: x^2*(1+x)/(1-x)^5. - Simon Plouffe in his 1992 dissertation
a(n) = Sum_{i=0..n} (n-i)*i^2 = a(n-1) + A000330(n-1) = A000217(n)*A000292(n-2)/n = A000217(n)*A000217(n-1)/3 = A006011(n-1)/3, convolution of the natural numbers with the squares. - Henry Bottomley, Oct 19 2000
a(n)+1 = A079034(n). - Mario Catalani (mario.catalani(AT)unito.it), Feb 12 2003
a(n) = 2*C(n+2, 4) - C(n+1, 3). - Paul Barry, Mar 04 2003
a(n) = C(n+2, 4) + C(n+1, 4). - Paul Barry, Mar 13 2003
a(n) = Sum_{k=1..n} A000330(n-1). - Benoit Cloitre, Jun 15 2003
a(n) = n*C(n+1,3)/2 = C(n+1,3)*C(n+1,2)/(n+1). - Mitch Harris, Jul 06 2006
a(n) = A006011(n)/3 = A008911(n)/2 = A047928(n-1)/12 = A083374(n)/6. - Zerinvary Lajos, May 09 2007
a(n) = (1/2)*Sum_{1 <= x_1, x_2 <= n} (det V(x_1,x_2))^2 = (1/2)*Sum_{1 <= i,j <= n} (i-j)^2, where V(x_1,x_2) is the Vandermonde matrix of order 2. - Peter Bala, Sep 21 2007
a(n) = C(n+1,3) + 2*C(n+1,4). - Borislav St. Borisov (b.st.borisov(AT)abv.bg), Mar 05 2009
a(n) = (1/48)*sinh(2*arccosh(n))^2. - Artur Jasinski, Feb 10 2010
a(n) = n*A000292(n-1)/2. - Tom Copeland, Sep 13 2011
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 29 2011
a(n) = (n-1)*A000217(n-1) - Sum_{i=0..n-2} (n-1-2*i)*A000217(i) for n > 1. - Bruno Berselli, Jun 22 2013
a(n) = C(n,2)*C(n+1,3) - C(n,3)*C(n+1,2). - J. M. Bergot, Sep 17 2013
a(n) = Sum_{k=1..n} ( (2k-n)* k(k+1)/2 ). - Wesley Ivan Hurt, Sep 26 2013
a(n) = floor(n^2/3) + 3*Sum_{k=1..n} k^2*floor((n-k+1)/3). - Mircea Merca, Feb 06 2014
Euler transform of length 2 sequence [6, -1]. - Michael Somos, May 28 2014
G.f. x^2*2F1(3,4;2;x). - R. J. Mathar, Aug 09 2015
Sum_{n>=2} 1/a(n) = 21 - 2*Pi^2 = 1.260791197821282762331... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A080852(2,n-2). - R. J. Mathar, Jul 28 2016
a(n) = A046092(n) * A046092(n-1)/48 = A000217(n) * A000217(n-1)/3. - Bruce J. Nicholson, Jun 06 2017
E.g.f.: (1/12)*exp(x)*x^2*(6 + 6*x + x^2). - Stefano Spezia, Dec 07 2018
Sum_{n>=2} (-1)^n/a(n) = Pi^2 - 9 (See A002388). - Amiram Eldar, Jun 28 2020

Extensions

Typo in link fixed by Matthew Vandermast, Nov 22 2010
Redundant comment deleted and more detail on relationship with A000330 added by Joshua Zucker, Jan 01 2013

A007401 Add n-1 to n-th term of 'n appears n times' sequence (A002024).

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Keywords

Comments

Complement of A000096 = increasing sequence of positive integers excluding n*(n+3)/2. - Jonathan Vos Post, Aug 13 2005
As a triangle: (1; 3,4; 6,7,8; 10,11,12,13; ...), Row sums = A127736: (1, 7, 21, 46, 85, 141, 217, ...). - Gary W. Adamson, Oct 25 2007
Odd primes are a subsequence except 5, cf. A004139. - Reinhard Zumkeller, Jul 18 2011
A023532(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
T(n,k) = ((n+k)^2+n-k)/2 - 1, n,k > 0, read by antidiagonals. - Boris Putievskiy, Jan 14 2013
A023531(a(n)) = 0. - Reinhard Zumkeller, Feb 14 2015

Examples

			From _Boris Putievskiy_, Jan 14 2013: (Start)
The start of the sequence as table:
   1,  3,  6, 10, 15, 21, 28, ...
   4,  7, 11, 16, 22, 29, 37, ...
   8, 12, 17, 23, 30, 38, 47, ...
  13, 18, 24, 31, 39, 48, 58, ...
  19, 25, 32, 40, 49, 59, 70, ...
  26, 33, 41, 50, 60, 71, 83, ...
  34, 42, 51, 61, 72, 84, 97, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   3,  4;
   6,  7,  8;
  10, 11, 12, 13;
  15, 16, 17, 18, 19;
  21, 22, 23, 24, 25, 26;
  28, 29, 30, 31, 32, 33, 34;
  ...
Row number r contains r numbers r*(r+1)/2, r*(r+1)/2+1, ..., r*(r+1)/2+r-1. (End)
		

References

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

Crossrefs

Programs

  • Haskell
    a007401 n = a007401_list !! n
    a007701_list = [x | x <- [0..], a023531 x == 0]
    -- Reinhard Zumkeller, Feb 14 2015, Dec 04 2012
    
  • Mathematica
    f[n_] := n + Floor[ Sqrt[2n] - 1/2]; Array[f, 66]; (* Robert G. Wilson v, Feb 13 2011 *)
  • PARI
    a(n)=n+floor(sqrt(n+n)-1/2) \\ Charles R Greathouse IV, Feb 13 2011
    
  • PARI
    for(m=1,9, for(n=m*(m+1)/2,(m^2+3*m-2)/2, print1(n", "))) \\ Charles R Greathouse IV, Feb 13 2011
    
  • Python
    from math import isqrt
    def A007401(n): return n-1+(isqrt(n<<3)+1>>1) # Chai Wah Wu, Oct 18 2022

Formula

From Boris Putievskiy, Jan 14 2013: (Start)
a(n) = A014132(n) - 1.
a(n) = A003057(n)^2 - A114327(n) - 1.
a(n) = ((t+2)^2 + i - j)/2-1, where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)

A014132 Complement of triangular numbers (A000217); also array T(n,k) = ((n+k)^2 + n-k)/2, n, k > 0, read by antidiagonals.

Original entry on oeis.org

2, 4, 5, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79
Offset: 1

Views

Author

Keywords

Comments

Numbers that are not triangular (nontriangular numbers).
Also definable as follows: a(1)=2; for n>1, a(n) is smallest integer greater than a(n-1) such that the condition "n and a(a(n)) have opposite parities" can always be satisfied. - Benoit Cloitre and Matthew Vandermast, Mar 10 2003
Record values in A256188 that are greater than 1. - Reinhard Zumkeller, Mar 26 2015
From Daniel Forgues, Apr 10 2015: (Start)
With n >= 1, k >= 1:
t(n+k) - k, 1 <= k <= n+k-1, n >= 1;
t(n+k-1) + n, 1 <= n <= n+k-1, k >= 1;
where t(n+k) = t(n+k-1) + (n+k) is the (n+k)-th triangular number, while the number of compositions of n+k into 2 parts is C(n+k-1, 2-1) = n+k-1, the number of nontriangular numbers between t(n+k-1) and t(n+k), just right!
Related to Hilbert's Infinite Hotel:
0) All rooms, numbered through the positive integers, are full;
1) An infinite number of trains, each containing an infinite number of passengers, arrives: i.e., a 2-D lattice of pairs of positive integers;
2) Move occupant of room m, m >= 1, to room t(m) = m*(m+1)/2, where t(m) is the m-th triangular number;
3) Assign n-th passenger from k-th train to room t(n+k-1) + n, 1 <= n <= n+k-1, k >= 1;
4) Everybody has his or her own room, no room is empty, for m >= 1.
If situation 1 happens again, repeat steps 2 and 3, you're back to 4.
(End)
1711 + 2*a(n)*(58 + a(n)) is prime for n<=21. The terms that do not have this property start 29,32,34,43,47,58,59,60,62,63,65,68,70,73,... - Benedict W. J. Irwin, Nov 22 2016
Also numbers k with the property that in the symmetric representation of sigma(k) both Dyck paths have a central peak or both Dyck paths have a central valley. (Cf. A237593.) - Omar E. Pol, Aug 28 2018

Examples

			From _Boris Putievskiy_, Jan 14 2013: (Start)
Start of the sequence as a table (read by antidiagonals, right to left), where the k-th row corresponds to the k-th column of the triangle (shown thereafter):
   2,  4,  7, 11, 16, 22, 29, ...
   5,  8, 12, 17, 23, 30, 38, ...
   9, 13, 18, 24, 31, 39, 48, ...
  14, 19, 25, 32, 40, 49, 59, ...
  20, 26, 33, 41, 50, 60, 71, ...
  27, 34, 42, 51, 61, 72, 84, ...
  35, 43, 52, 62, 73, 85, 98, ...
  (...)
Start of the sequence as a triangle (read by rows), where the i elements of the i-th row are t(i) + 1 up to t(i+1) - 1, i >= 1:
   2;
   4,  5;
   7,  8,  9;
  11, 12, 13, 14;
  16, 17, 18, 19, 20;
  22, 23, 24, 25, 26, 27;
  29, 30, 31, 32, 33, 34, 35;
  (...)
Row number i contains i numbers, where t(i) = i*(i+1)/2:
  t(i) + 1, t(i) + 2, ..., t(i) + i = t(i+1) - 1
(End) [Edited by _Daniel Forgues_, Apr 11 2015]
		

Crossrefs

Cf. A000124 (left edge: quasi-triangular numbers), A000096 (right edge: almost-triangular numbers), A006002 (row sums), A001105 (central terms).
Cf. A242401 (subsequence).
Cf. A145397 (the non-tetrahedral numbers).

Programs

  • Haskell
    a014132 n = n + round (sqrt $ 2 * fromInteger n)
    a014132_list = filter ((== 0) . a010054) [0..]
    -- Reinhard Zumkeller, Dec 12 2012
    
  • Magma
    IsTriangular:=func< n | exists{ k: k in [1..Isqrt(2*n)] | n eq (k*(k+1) div 2)} >; [ n: n in [1..90] | not IsTriangular(n) ]; // Klaus Brockhaus, Jan 04 2011
    
  • Mathematica
    f[n_] := n + Round[Sqrt[2n]]; Array[f, 71] (* or *)
    Complement[ Range[83], Array[ #(# + 1)/2 &, 13]] (* Robert G. Wilson v, Oct 21 2005 *)
    DeleteCases[Range[80],?(OddQ[Sqrt[8#+1]]&)] (* _Harvey P. Dale, Jul 24 2021 *)
  • PARI
    a(n)=if(n<1,0,n+(sqrtint(8*n-7)+1)\2)
    
  • PARI
    isok(n) = !ispolygonal(n,3); \\ Michel Marcus, Mar 01 2016
    
  • Python
    from math import isqrt
    def A014132(n): return n+(isqrt((n<<3)-7)+1>>1) # Chai Wah Wu, Jun 17 2024

Formula

a(n) = n + round(sqrt(2*n)).
a(a(n)) = n + 2*floor(1/2 + sqrt(2n)) + 1.
a(n) = a(n-1) + A035214(n), a(1)=2.
a(n) = A080036(n) - 1.
a(n) = n + A002024(n). - Vincenzo Librandi, Jul 08 2010
A010054(a(n)) = 0. - Reinhard Zumkeller, Dec 10 2012
From Boris Putievskiy, Jan 14 2013: (Start)
a(n) = A007401(n)+1.
a(n) = A003057(n)^2 - A114327(n).
a(n) = ((t+2)^2 + i - j)/2, where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)
A248952(a(n)) < 0. - Reinhard Zumkeller, Oct 20 2014
a(n) = A256188(A004202(n)). - Reinhard Zumkeller, Mar 26 2015
From Robert Israel, Apr 20 2015 (Start):
a(n) = A118011(n) - n.
G.f.: x/(1-x)^2 + x/(1-x) * Sum(j>=0, x^(j*(j+1)/2)) = x/(1-x)^2 + x^(7/8)/(2-2*x) * Theta2(0,sqrt(x)), where Theta2 is a Jacobi theta function. (End)
G.f. as array: x*y*(2 - 2*y + x^2*y + y^2 - x*(1 + y))/((1 - x)^3*(1 - y)^3). - Stefano Spezia, Apr 22 2024

Extensions

Following Alford Arnold's comment: keyword tabl and correspondent crossrefs added by Reinhard Zumkeller, Dec 12 2012
I restored the original definition. - N. J. A. Sloane, Jan 27 2019

A049581 Table T(n,k) = |n-k| read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Commutative non-associative operator with identity 0. T(nx,kx) = x T(n,k). A multiplicative analog is A089913. - Marc LeBrun, Nov 14 2003
For the characteristic polynomial of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A203993. - Wolfdieter Lang, Feb 04 2018
For the determinant of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A085750. - Bernard Schott, May 13 2020
a(n) = 0 iff n = 4 times triangular number (A046092). - Bernard Schott, May 13 2020

Examples

			Displayed as a triangle t(n, k):
  n\k   0 1 2 3 4 5 6 7 8 9 10 ...
  0:    0
  1:    1 1
  2:    2 0 2
  3:    3 1 1 3
  4:    4 2 0 2 4
  5:    5 3 1 1 3 5
  6:    6 4 2 0 2 4 6
  7:    7 5 3 1 1 3 5 7
  8:    8 6 4 2 0 2 4 6 8
  9:    9 7 5 3 1 1 3 5 7 9
  10:  10 8 6 4 2 0 2 4 6 8 10
... reformatted by _Wolfdieter Lang_, Feb 04 2018
Displayed as a table:
  0 1 2 3 4 5 6 ...
  1 0 1 2 3 4 5 ...
  2 1 0 1 2 3 4 ...
  3 2 1 0 1 2 3 ...
  4 3 2 1 0 1 2 ...
  5 4 3 2 1 0 1 ...
  6 5 4 3 2 1 0 ...
  ...
		

Crossrefs

Cf. A089913. Apart from signs, same as A114327. A203993.

Programs

  • GAP
    a := Flat(List([0..12],n->List([0..n],k->Maximum(k,n-k)-Minimum(k,n-k)))); # Muniru A Asiru, Jan 26 2018
    
  • Magma
    [[Abs(n-2*k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 07 2019
    
  • Maple
    seq(seq(abs(n-2*k),k=0..n),n=0..12); # Robert Israel, Sep 30 2015
  • Mathematica
    Table[Abs[(n-k) -k], {n,0,12}, {k,0,n}]//Flatten (* Michael De Vlieger, Sep 29 2015 *)
    Table[Join[Range[n,0,-2],Range[If[EvenQ[n],2,1],n,2]],{n,0,12}]//Flatten (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    a(n) = abs(2*(n+1)-binomial((sqrtint(8*(n+1))+1)\2, 2)-(binomial(1+floor(1/2 + sqrt(2*(n+1))), 2))-1);
    vector(100, n , a(n-1)) \\ Altug Alkan, Sep 29 2015
    
  • PARI
    {t(n,k) = abs(n-2*k)}; \\ G. C. Greubel, Jun 07 2019
    
  • Python
    from math import isqrt
    def A049581(n): return abs((k:=n+1<<1)-((m:=isqrt(k))+(k>m*(m+1)))**2-1) # Chai Wah Wu, Nov 09 2024
  • Sage
    [[abs(n-2*k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 07 2019
    

Formula

G.f.: (x + y - 4*x*y + x^2*y + x*y^2)/((1-x)^2*(1-y)^2*(1-x*y)) = (x/(1-x)^2 + y/(1-y)^2)/(1-x*y). T(n,0) = T(0,n) = n; T(n+1,k+1) = T(n,k). - Franklin T. Adams-Watters, Feb 06 2006
a(n) = |A002260(n+1)-A004736(n+1)| or a(n) = |((n+1)-t*(t+1)/2) - ((t*t+3*t+4)/2-(n+1))| where t = floor((-1+sqrt(8*(n+1)-7))/2). - Boris Putievskiy, Dec 24 2012; corrected by Altug Alkan, Sep 30 2015
From Robert Israel, Sep 30 2015: (Start)
If b(n) = a(n+1) - 2*a(n) + a(n-1), then for n >= 3 we have
b(n) = -1 if n = (j^2+5j+4)/2 for some integer j >= 1
b(n) = -3 if n = (j^2+5j+6)/2 for some integer j >= 0
b(n) = 4 if n = 2j^2 + 6j + 4 for some integer j >= 0
b(n) = 2 if n = 2j^2 + 8j + 7 or 2j^2 + 8j + 8 for some integer j >= 0
b(n) = 0 otherwise. (End)
Triangle t(n,k) = max(k, n-k) - min(k, n-k). - Peter Luschny, Jan 26 2018
Triangle t(n, k) = |n - 2*k| for n >= 0, k = 0..n. See the Maple and Mathematica programs. Hence t(n, k)= t(n, n-k). - Wolfdieter Lang, Feb 04 2018
a(n) = |t^2 - 2*n - 1|, where t = floor(sqrt(2*n+1) + 1/2). - Ridouane Oudra, Jun 07 2019; Dec 11 2020
As a rectangle, T(n,k) = |n-k| = max(n,k) - min(n,k). - Clark Kimberling, May 11 2020

A094053 Triangle read by rows: T(n,k) = k*(n-k), 1 <= k <= n.

Original entry on oeis.org

0, 1, 0, 2, 2, 0, 3, 4, 3, 0, 4, 6, 6, 4, 0, 5, 8, 9, 8, 5, 0, 6, 10, 12, 12, 10, 6, 0, 7, 12, 15, 16, 15, 12, 7, 0, 8, 14, 18, 20, 20, 18, 14, 8, 0, 9, 16, 21, 24, 25, 24, 21, 16, 9, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 11, 20, 27, 32, 35, 36, 35, 32, 27, 20, 11, 0, 12
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2004

Keywords

Comments

T(n,k) = A003991(n-1,k) for 1 <= k < n;
T(n,k) = T(n,n-1-k) for k < n;
T(n,1) = n-1; T(n,n) = 0; T(n,2) = A005843(n-2) for n > 1;
T(n,3) = A008585(n-3) for n>2; T(n,4) = A008586(n-4) for n > 3;
T(n,5) = A008587(n-5) for n>4; T(n,6) = A008588(n-6) for n > 5;
T(n,7) = A008589(n-7) for n>6; T(n,8) = A008590(n-8) for n > 7;
T(n,9) = A008591(n-9) for n>8; T(n,10) = A008592(n-10) for n > 9;
T(n,11) = A008593(n-11) for n>10; T(n,12) = A008594(n-12) for n > 11;
T(n,13) = A008595(n-13) for n>12; T(n,14) = A008596(n-14) for n > 13;
T(n,15) = A008597(n-15) for n>14; T(n,16) = A008598(n-16) for n > 15;
T(n,17) = A008599(n-17) for n>16; T(n,18) = A008600(n-18) for n > 17;
T(n,19) = A008601(n-19) for n>18; T(n,20) = A008602(n-20) for n > 19;
Row sums give A000292; triangle sums give A000332;
All numbers m > 0 occur A000005(m) times;
A002378(n) = T(A005408(n),n+1) = n*(n+1).
k-th columns are arithmetic progressions with step k, starting with 0. If a zero is prefixed to the sequence, then we get a new table where the columns are again arithmetic progressions with step k, but starting with k, k=0,1,2,...: 1st column = (0,0,0,...), 2nd column = (1,2,3,...), 3rd column = (2,4,6,8,...), etc. - M. F. Hasler, Feb 02 2013
Construct the infinite-dimensional matrix representation of angular momentum operators (J_1,J_2,J_3) in the Jordan-Schwinger form (cf. Harter, Klee, Schwinger). The triangle terms T(n,k) = T(2j,j+m) satisfy: (1/2)T(2j,j+m)^(1/2) = = = i = -i . Matrices for J_1 and J_2 are sparse. These equalities determine the only nonzero entries. - Bradley Klee, Jan 29 2016
T(n+1,k+1) is the number of degrees of freedom of a k-dimensional affine subspace within an n-dimensional vector space. This is most readily interpreted geometrically: e.g. in 3 dimensions a line (1-dimensional subspace) has T(4,2) = 4 degrees of freedom and a plane has T(4,3) = 3. T(n+1,1) = n indicates that points in n dimensions have n degrees of freedom. T(n,n) = 0 for any n as all n-dimensional spaces in an n-dimensional space are equivalent. - Daniel Leary, Apr 29 2020

Examples

			From _M. F. Hasler_, Feb 02 2013: (Start)
Triangle begins:
  0;
  1, 0;
  2, 2, 0;
  3, 4, 3, 0;
  4, 6, 6, 4, 0;
  5, 8, 9, 8, 5, 0;
  (...)
If an additional 0 was added at the beginning, this would become:
  0;
  0, 1;
  0, 2, 2;
  0, 3, 4; 3;
  0, 4, 6, 6, 4;
  0, 5, 8, 9, 8, 5;
  ... (End)
		

Crossrefs

J_3: A114327; J_1^2, J_2^2: A141387, A268759.
Cf. A000292 (row sums), A000332 (triangle sums).
T(n,k) for values of k:
A005843 (k=2), A008585 (k=3), A008586 (k=4), A008587 (k=5), A008588 (k=6), A008589 (k=7), A008590 (k=8), A008591 (k=9), A008592 (k=10), A008593 (k=11), A008594 (k=12), A008595 (k=13), A008596 (k=14), A008597 (k=15), A008598 (k=16), A008599 (k=17), A008600 (k=18), A008601 (k=19), A008602 (k=20).

Programs

  • Magma
    /* As triangle */ [[k*(n-k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Jan 30 2016
    
  • Mathematica
    Flatten[Table[(j - m) (j + m + 1), {j, 0, 10, 1/2}, {m, -j, j}]] (* Bradley Klee, Jan 29 2016 *)
  • PARI
    {for(n=1, 13, for(k=1, n, print1(k*(n - k)," ");); print(););} \\ Indranil Ghosh, Mar 12 2017

A141387 Triangle read by rows: T(n,m) = n + 2*m*(n - m) (0 <= m <= n).

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 3, 7, 7, 3, 4, 10, 12, 10, 4, 5, 13, 17, 17, 13, 5, 6, 16, 22, 24, 22, 16, 6, 7, 19, 27, 31, 31, 27, 19, 7, 8, 22, 32, 38, 40, 38, 32, 22, 8, 9, 25, 37, 45, 49, 49, 45, 37, 25, 9, 10, 28, 42, 52, 58, 60, 58, 52, 42, 28, 10
Offset: 0

Views

Author

Roger L. Bagula, Aug 03 2008

Keywords

Comments

Construct the infinite-dimensional matrix representation of angular momentum operators (J_1,J_2,J_3) in Jordan-Schwinger form (cf. Harter, Klee, Schwinger). The triangle terms T(n,k)=T(2j,j+m) satisfy:(1/4)T(2j,j+m) = = . Matrices for J_1^2 and J_2^2 are sparse. These diagonal equalities and the off-diagonal equalities of A268759 determine the only nonzero entries. Comments on A268759 provide a conjecture for the clear interpretation of these numbers in the context of binomial coefficients and other geometrical sequences. - Bradley Klee, Feb 20 2016
This sequence appears in the probability of the coin tossing "Gambler's Ruin". Call the probability of winning a coin toss = p, and the probability of losing the toss is 1-p = q, and call z = q/p. A gambler starts with $1, and tosses for $1 stakes till he has $0 (ruin) or has $n (wins). The average time T_win_lose(n) of a game (win OR lose) is a well-known function of z and n. The probability of the gambler winning P_win(n) is also known, and is equal to (1-z)/(1-z^n). T_win(n) defined as the average time it takes the gambler to win such a game is not so well known (I have not found it in the literature). I calculated T_win(n) and found it to be T_win(n) = P_win(n) * Sum_{m=0..n} T(n,m) * z^m. - Steve Newman, Oct 24 2016
As a square array A(n,m), gives the odd number's index of the product of n-th and m-th odd number. See formula. - Rainer Rosenthal, Sep 07 2022

Examples

			As a triangle:
  { 0},
  { 1,  1},
  { 2,  4,  2},
  { 3,  7,  7,  3},
  { 4, 10, 12, 10,  4},
  { 5, 13, 17, 17, 13,  5},
  { 6, 16, 22, 24, 22, 16,  6},
  { 7, 19, 27, 31, 31, 27, 19,  7},
  { 8, 22, 32, 38, 40, 38, 32, 22,  8},
  { 9, 25, 37, 45, 49, 49, 45, 37, 25,  9},
  {10, 28, 42, 52, 58, 60, 58, 52, 42, 28, 10}
From _Peter Munn_, Sep 28 2022: (Start)
Square array A(n,m) starts:
  0,  1,  2,  3,  4,  5,  6,  7, ...
  1,  4,  7, 10, 13, 16, 19, 22, ...
  2,  7, 12, 17, 22, 27, 32, 37, ...
  3, 10, 17, 24, 31, 38, 45, 52, ...
  4, 13, 22, 31, 40, 49, 58, 67, ...
  5, 16, 27, 38, 49, 60, 71, 82, ...
  6, 19, 32, 45, 58, 71, 84, 97, ...
...
(End)
		

References

  • R. N. Cahn, Semi-Simple Lie Algebras and Their Representations, Dover, NY, 2006, ISBN 0-486-44999-8, p. 139.

Crossrefs

[0, 0] together with the row sums give A007290.

Programs

  • Mathematica
    T[n_, m_] = n + 2* m *(-m + n);
    a = Table[Table[T[n, m], {m, 0, n}], {n, 0, 10}];
    Flatten[a]
    (* second program: *)
    Flatten[ Table[2 j + 2 j^2 - 2 m^2, {j, 0, 10, 1/2}, {m, -j, j}]] (* Bradley Klee, Feb 20 2016 *)
  • PARI
    {T(n, m) = if( m<0 || nMichael Somos, May 28 2017

Formula

T(n,m) = n + 2*m*(n-m).
Square array A(n,m) = 2*n*m + n + m, read by antidiagonals, satisfying 2*A(n,m) + 1 = (2*n+1)*(2*m+1) = A005408(n)*A005408(m) = A098353(n+1,m+1). - Rainer Rosenthal, Oct 01 2022

Extensions

Edited by N. J. A. Sloane, Feb 21 2016

A191360 Number of the diagonal of the Wythoff array that contains n.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Every integer occurs in this sequence (infinitely many times).
Represent the array as {g(i,j): i>=1, j>=1}. Then for m>=0, (diagonal #m) is the sequence (g(i,i+m)), i>=1; for m<0, (diagonal #m) is the sequence (g(i+m,i)), i>=1.

Examples

			The main diagonal of the Wythoff array is (1,7,16,...); that's diagonal #0, so that a(1)=0, a(7)=0, a(16)=0.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Fibonacci[n];
    g[i_,j_]:=f[j+1]*Floor[i*GoldenRatio]+(i-1) f[j];
    t=Table[g[i,j],{i,500},{j,100}];
    Map[#[[2]]-#[[1]]&,Most[Reap[NestWhileList[#+1&,1,Length[Sow[FirstPosition[t,#]]]>1&]][[2]][[1]]]]  (* Peter J. C. Moses, Feb 09 2023 *)

Extensions

Mathematica program replaced by Clark Kimberling, Feb 10 2023.

A191361 Number of the diagonal of the Wythoff difference array that contains n.

Original entry on oeis.org

0, 1, -1, -2, 2, -3, 0, -4, -5, -1, -6, -7, 3, -8, -2, -9, -10, 1, -11, -3, -12, -13, -4, -14, -15, 0, -16, -5, -17, -18, -6, -19, -20, 4, -21, -7, -22, -23, -1, -24, -8, -25, -26, -9, -27, -28, 2, -29, -10, -30, -31, -2, -32, -11, -33, -34, -12, -35, -36, -3
Offset: 1

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Every integer occurs in A191361 (infinitely many times).
Represent the array as {g(i,j): i>=1, j>=1}. Then for m>=0, (diagonal #m) is the sequence (g(i,i+m)), i>=1;
for m<0, (diagonal #m) is the sequence (g(i+m,i)), i>=1.

Examples

			Diagonal #0 (the main diagonal) of A080164 is (1,7,26,...), so a(1)=0, a(7)=0, a(26)=0.
		

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; f[n_] := Fibonacci[n];
    g[i_, j_] := f[2 j - 1]*Floor[i*r] + (i - 1) f[2 j - 2];
    TableForm[Table[g[i, j], {i, 1, 10}, {j, 1, 5}]]
    (* A080164, Wythoff difference array *)
    a = Flatten[Table[If[g[i, j] == n, j - i, {}], {n, 60}, {i, 50}, {j, 50}]]
    (* a=A191361 *)

A191362 Number of the diagonal of the dispersion of the even positive integers that contains n.

Original entry on oeis.org

0, -1, 1, -2, 2, 0, 3, -3, 4, 1, 5, -1, 6, 2, 7, -4, 8, 3, 9, 0, 10, 4, 11, -2, 12, 5, 13, 1, 14, 6, 15, -5, 16, 7, 17, 2, 18, 8, 19, -1, 20, 9, 21, 3, 22, 10, 23, -3, 24, 11, 25, 4, 26, 12, 27, 0, 28, 13, 29, 5, 30, 14, 31, -6, 32, 15, 33, 6, 34, 16, 35, 1, 36, 17, 37, 7, 38, 18, 39, -2, 40, 19, 41, 8, 42, 20, 43, 2, 44, 21, 45, 9, 46, 22, 47, -4, 48, 23, 49, 10
Offset: 1

Views

Author

Clark Kimberling, May 31 2011

Keywords

Comments

Every integer occurs in A191362 (infinitely many times).
Represent the array as {f(i,j): i>=1, j>=1}. Then for m>=0, (diagonal #m) is the sequence (f(i,i+m)), i>=1;
for m<0, (diagonal #m) is the sequence (f(i+m,i)), i>=1.

Crossrefs

Programs

  • Mathematica
    f[i_, j_] := (2 j - 1)*2^(i - 1);
    t=TableForm[Table[f[i, j], {i, 1, 10}, {j, 1, 8}]]
    (* t=A054582, the dispersion of the even positive integers *)
    a = Flatten[Table[If[f[i, j] == n, j - i, {}], {n, 100}, {i, 10}, {j, 80}]]
    (* a=A191362 *)

A268759 Triangle T(n,k) read by rows: T(n,k) = (1/4)*(1 + k)*(2 + k)*(k - n)*(1 + k - n).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 3, 3, 0, 0, 6, 9, 6, 0, 0, 10, 18, 18, 10, 0, 0, 15, 30, 36, 30, 15, 0, 0, 21, 45, 60, 60, 45, 21, 0, 0, 28, 63, 90, 100, 90, 63, 28, 0, 0, 36, 84, 126, 150, 150, 126, 84, 36, 0, 0, 45, 108, 168, 210, 225, 210, 168, 108, 45, 0, 0, 55, 135, 216, 280, 315
Offset: 0

Views

Author

Bradley Klee, Feb 20 2016

Keywords

Comments

Off-diagonal elements of angular momentum matrices J_1^2 and J_2^2.
Construct the infinite-dimensional matrix representation of angular momentum operators (J_1,J_2,J_3) in the block-diagonal, Jordan-Schwinger form (cf. Harter, Klee, Schwinger). The triangle terms T(n,k) satisfy:(1/2)T(n,k)^(1/2) = = = - = - . In the Dirac notation, we write elements m_{ij} of matrix M as =m_{ij}. Matrices for J_1^2 and J_2^2 are sparse. These equalities and the central-diagonal equalities of A141387 determine the only nonzero entries.
Notice that a(n) = T(n,k) is always a multiple of the triangular numbers, up to an offset. Conjecture: the triangle tabulating matrix elements is determined entirely by the coefficients: binomial(n,p) (cf. A094053). Various sequences along the diagonals of matrix J_1^p lead to other numbers with geometric interpretations (Cf. A000567, A100165).

Examples

			0;
0,  0;
1,  0,  0;
3,  3,  0,  0;
6,  9,  6,  0,  0;
10, 18, 18, 10, 0,  0;
15, 30, 36, 30, 15, 0, 0;
...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[(1/4) (1 + k) (2 + k) (k - n) (1 + k - n), {n, 0, 10, 1}, {k, 0, n, 1}]]

Formula

T(n,k) = (1/4)*(1 + k)*(2 + k)*(k - n)*(1 + k - n).
G.f.: x^2/((1-x)^3(1-x*y)^3)
Showing 1-10 of 11 results. Next