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

A124258 Triangle whose rows are sequences of increasing and decreasing squares: 1; 1,4,1; 1,4,9,4,1; ...

Original entry on oeis.org

1, 1, 4, 1, 1, 4, 9, 4, 1, 1, 4, 9, 16, 9, 4, 1, 1, 4, 9, 16, 25, 16, 9, 4, 1, 1, 4, 9, 16, 25, 36, 25, 16, 9, 4, 1, 1, 4, 9, 16, 25, 36, 49, 36, 25, 16, 9, 4, 1, 1, 4, 9, 16, 25, 36, 49, 64, 49, 36, 25, 16, 9, 4, 1, 1, 4, 9, 16, 25, 36, 49, 64, 81, 64, 49, 36, 25, 16, 9, 4, 1, 1, 4, 9, 16
Offset: 1

Views

Author

Jonathan Vos Post, Dec 16 2006

Keywords

Comments

The triangle A003983 with individual entries squared and each 2nd row skipped.
Analogous to A004737. - Peter Bala, Sep 25 2007
T(n,k) = min(n,k)^2. The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013

Examples

			Triangle starts
  1;
  1, 4, 1;
  1, 4, 9, 4, 1:
  1, 4, 9, 16, 9, 4, 1:
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1...1...
  1...4...4...4...4...4...
  1...4...9...9...9...9...
  1...4...9..16..16..16...
  1...4...9..16..25..25...
  1...4...9..16..25..36...
  ...
The start of the sequence as triangle array read by rows:
  1;
  1, 4, 1;
  1, 4, 9,  4,  1;
  1, 4, 9, 16,  9,  4,  1;
  1, 4, 9, 16, 25, 16,  9,  4, 1;
  1, 4, 9, 16, 25, 36, 25, 16, 9, 4, 1;
  ...
Row number k contains 2*k-1 numbers 1,4,...,(k-1)^2,k^2,(k-1)^2,...,4,1. (End)
		

Crossrefs

Programs

  • Maple
    A003983 := proc(n,k) min(n,k) ; end: A124258 := proc(n,k) A003983(n,k)^2 ; end: for d from 1 to 20 by 2 do for c from 1 to d do printf("%d, ",A124258(d+1-c,c)) ; od: od: # R. J. Mathar, Sep 21 2007
    # second Maple program:
    T:= n-> i^2$i=1..n, (n-i)^2$i=1..n-1:
    seq(T(n), n=1..10);  # Alois P. Heinz, Feb 15 2022
  • Mathematica
    Flatten[Table[Join[Range[n]^2,Range[n-1,1,-1]^2],{n,10}]] (* Harvey P. Dale, Jun 14 2015 *)

Formula

O.g.f.: (1+qx)^2/((1-x)(1-qx)^2(1-q^2x)) = 1 + x(1 + 4q + q^2) + x^2(1 + 4q + 9q^2 + 4q^3 + q^4) + ... . - Peter Bala, Sep 25 2007
From Boris Putievskiy, Jan 13 2013: (Start)
a(n) = (A004737(n))^2.
a(n) = (floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1)^2. (End)

Extensions

More terms from R. J. Mathar, Sep 21 2007
Edited by N. J. A. Sloane, Jun 30 at the suggestion of R. J. Mathar

A133826 Triangle whose rows are sequences of increasing and decreasing tetrahedral numbers: 1; 1,4,1; 1,4,10,4,1; ... .

Original entry on oeis.org

1, 1, 4, 1, 1, 4, 10, 4, 1, 1, 4, 10, 20, 10, 4, 1, 1, 4, 10, 20, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 84, 56, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 84, 120, 84, 56, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 120, 84, 56, 35, 20, 10, 4, 1
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,4,1,1,4,10,4,1,..., analogous to A004737.
T(n,k) = min(n*(n+1)*(n+2)/6, k*(k+1)*(k+2)/6) n, k > 0. The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013

Examples

			Triangle T(n,k) starts:
  1;
  1,  4,  1;
  1,  4, 10,  4,  1;
  1,  4, 10, 20, 10,  4,  1;
  1,  4, 10, 20, 35, 20, 10,  4,  1;
  1,  4, 10, 20, 35, 56, 35, 20, 10,  4,  1;
  1,  4, 10, 20, 35, 56, 84, 56, 35, 20, 10,  4,  1;
  ...
		

Crossrefs

Cf. A000292, A002415 (row sums), A004737, A124258, A133825.

Programs

  • Maple
    T:= n-> (f-> (f(i)$i=1..n, f(n-i)$i=1..n-1))(t-> t*(t+1)*(t+2)/6):
    seq(T(n), n=1..10);  # Alois P. Heinz, Feb 17 2022
  • Mathematica
    Module[{nn=10,tet},tet=Table[(n(n+1)(n+2))/6,{n,nn}];Table[Join[Take[ tet,k], Reverse[ Take[tet,k-1]]],{k,nn}]]//Flatten (* Harvey P. Dale, Oct 22 2017 *)
    Table[Series[(1-h^(2*N+4))^2/(1-h^2)^4-((2+N)^2 *h^(2N+2))/(1-h^2)^2, {h, 0, 4*N}], {N,0,5}] // Normal (* Sergii Voloshyn, Sep 09 2022 *)

Formula

O.g.f.: (1+q*x)/((1-x)*(1-q*x)^3*(1-q^2x)) = 1 + x*(1 + 4*q + q^2) + x^2*(1 + 4*q + 10*q^2 + 4*q^3 + q^4) + ... .
From Boris Putievskiy, Jan 13 2013: (Start)
a(n) = A004737(n)*(A004737(n)+1)*(A004737(n)+2)/2.
a(n) = z*(z+1)*(z+2)/6, where z = floor(sqrt(n-1)) - |n - floor(sqrt(n-1))^2 - floor(sqrt(n-1)) - 1| + 1. (End)
Showing 1-2 of 2 results.