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.

A273751 Triangle of the natural numbers written by decreasing antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 10, 13, 9, 11, 14, 17, 21, 12, 15, 18, 22, 26, 31, 16, 19, 23, 27, 32, 37, 43, 20, 24, 28, 33, 38, 44, 50, 57, 25, 29, 34, 39, 45, 51, 58, 65, 73, 30, 35, 40, 46, 52, 59, 66, 74, 82, 91, 36, 41, 47, 53, 60, 67, 75, 83, 92, 101, 111
Offset: 1

Views

Author

Paul Curtz, May 30 2016

Keywords

Comments

A permutation of the natural numbers.
a(n) and A091995(n) are different at the ninth term.
Antidiagonal sums: 1, 2, 7, 11, ... = A235355(n+1). Same idea.
Row sums: 1, 5, 16, 37, 72, 124, 197, 294, ... = 7*n^3/12 -n^2/8 +5*n/12 +1/16 -1/16*(-1)^n with g.f. x*(1+2*x+3*x^2+x^3) / ( (1+x)*(x-1)^4 ). The third difference is of period 2: repeat [3, 4].
Indicates the order in which electrons fill the different atomic orbitals (s,p,d,f,g,h). - Alexander Goebel, May 12 2020

Examples

			1,
2,   3,
4,   5,  7,
6,   8, 10, 13,
9,  11, 14, 17, 21,
12, 15, 18, 22, 26, 31,
16, 19, 23, 27, 32, 37, 43,
20, etc.
		

Crossrefs

Cf. A002061 (right diagonal), A002620 (first column), A033638, A091995, A234305 (antidiagonals of the triangle).

Programs

  • Maple
    A273751 := proc(n,k)
        option remember;
        if k = n then
            A002061(n) ;
        elif k > n or k < 0 then
            0;
        elif k = n-1 then
            procname(n-1,k)+k ;
        else
            procname(n-1,k+1)+1 ;
        end if;
    end proc: # R. J. Mathar, Jun 13 2016
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k == n, n(n-1) + 1, k == n-1, (n-1)^2 + 1, k == 1, n + T[n-2, 1], 1 < k < n-1, T[n-1, k+1] + 1,True, 0];
    Table[T[n, k], {n, 12}, {k, n}] // Flatten (* Jean-François Alcover, Jun 10 2016 *)

Formula

T(n, k) = (2 * (n+k)^2 + 7 + (-1)^(n-k)) / 8 - k. - Werner Schulte, Sep 27 2024
G.f.: x*y*(1 + x^4*y + x^2*(y - 1)*y + x^5*y^2 - x^3*y*(y + 2))/((1 - x)^3*(1 + x)*(1 - x*y)^3). - Stefano Spezia, Sep 28 2024

A271647 Irregular triangle read by rows: the natural numbers from right to left.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Apr 11 2016

Keywords

Comments

A permutation of the natural numbers. Mentioned as d(n) in A269837.
Difference table:
1, 2, 4, 3, 6, 5, 9, 8, 7, 12, 11, 10, 16, 15, 14, 13, 20, 19, 18, ...
1, 2, -1, 3, -1, 4, -1, -1, 5, -1, -1, 6, -1, -1, -1, 7, -1, -1, -1, ...
1, -3, 4, -4, 5, -5, 0, 6, -6, 0, 7, -7, 0, 0, 8, -8, 0, 0, 9, ...
etc.

Examples

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

Crossrefs

Programs

  • Maple
    count:= 0:
    for r from 1 to 20 do
      d:= ceil(r/2);
      for i from 0 to d-1 do A[r,i]:= count+ d-i od;
      count:= count+d;
    od:
    seq(seq(A[r,i],i=0..ceil(r/2)-1),r=1..20); # Robert Israel, Apr 11 2016
  • Mathematica
    Table[Reverse@ Range[Floor[n/2]] + Floor[(n - 1)^2/4], {n, 16}] // Flatten (* Michael De Vlieger, Apr 11 2016 *)

Formula

With offset=0, a(n) = A271584(n) + A269837(n)
Empirical g.f. as triangle: (1-y*x^3+y^2*x^4-2*y*x^4-y^2*x^5+y*x^5+y^2*x^7)*x/((1+x)*(1-x)^3*(1-y*x^2)^3). - Robert Israel, Apr 11 2016
Showing 1-2 of 2 results.