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

A285732 Square array A(n,k) read by antidiagonals, A(n,n) = -n, otherwise, if n > k, A(n,k) = T(n-k,k), else A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 14 X 14 corner of the array:
  -1,  1,  2,  4,  7, 11, 16, 22, 29,  37,  46,  56,  67,  79
   1, -2,  3,  5,  8, 12, 17, 23, 30,  38,  47,  57,  68,  80
   3,  2, -3,  6,  9, 13, 18, 24, 31,  39,  48,  58,  69,  81
   6,  5,  4, -4, 10, 14, 19, 25, 32,  40,  49,  59,  70,  82
  10,  9,  8,  7, -5, 15, 20, 26, 33,  41,  50,  60,  71,  83
  15, 14, 13, 12, 11, -6, 21, 27, 34,  42,  51,  61,  72,  84
  21, 20, 19, 18, 17, 16, -7, 28, 35,  43,  52,  62,  73,  85
  28, 27, 26, 25, 24, 23, 22, -8, 36,  44,  53,  63,  74,  86
  36, 35, 34, 33, 32, 31, 30, 29, -9,  45,  54,  64,  75,  87
  45, 44, 43, 42, 41, 40, 39, 38, 37, -10,  55,  65,  76,  88
  55, 54, 53, 52, 51, 50, 49, 48, 47,  46, -11,  66,  77,  89
  66, 65, 64, 63, 62, 61, 60, 59, 58,  57,  56, -12,  78,  90
  78, 77, 76, 75, 74, 73, 72, 71, 70,  69,  68,  67, -13,  91
  91, 90, 89, 88, 87, 86, 85, 84, 83,  82,  81,  80,  79, -14
		

Crossrefs

Transpose: A285733.
Cf. A000124 (row 1, after -1), A000217 (column 1, after -1).

Programs

  • Python
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def A(n, k): return -n if n == k else T(n - k, k) if n>k else T(n, k - n)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 03 2017
  • Scheme
    (define (A285732 n) (A285732bi (A002260 n) (A004736 n)))
    (define (A285732bi row col) (cond ((= row col) (- row)) ((> row col) (A000027bi (- row col) col)) (else (A000027bi row (- col row)))))
    

Formula

If n = k, A(n,k) = -n, if n > k, A(n,k) = T(n-k,k), otherwise [when n < k], A(n,k) = T(n,k-n), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N X N to N.
A(n,k) = A285722(n,k) - A286100(n,k).

A003982 Table read by rows: 1 if x = y, 0 otherwise, where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Also called the delta function.
From Clark Kimberling, Feb 07 2011: (Start)
In rectangular format, the infinite identity matrix and the weight array of A003783(n,k)=min{n,k}; in the accumulation chain
... < A003982 < A003783 < A115262 < A185957 < ... . See A144112 for definitions of weight array and accumulation array. (End)

Examples

			Table begins
  1;
  0, 0;
  0, 1, 0;
  0, 0, 0, 0;
  0, 0, 1, 0, 0;
  ....
Northwest corner when formatted as a rectangular array:
  1 0 0 0 0 0 0 0
  0 1 0 0 0 0 0 0
  0 0 1 0 0 0 0 0
  0 0 0 1 0 0 0 0
  0 0 0 0 1 0 0 0
		

Crossrefs

Characteristic function of A001844. Antidiagonal sums and main diagonal is A000012.
Cf. also A286100.

Programs

  • Mathematica
    f[n_,k_]:=0; f[n_,n_]:=1;
    TableForm[Table[f[n,k],{n,1,10},{k,1,10}]] (* array *)
    Table[f[n-k+1,k],{n,10},{k,n,1,-1}]//Flatten (*sequence *)
    Table[Join[{1},Table[0,4n-1]],{n,10}]//Flatten (* Harvey P. Dale, Dec 21 2016 *)
  • PARI
    {a(n) = issquare(2*n + 1)}; /* Michael Somos, Apr 13 2005 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^8 + A)^2 / eta(x^4 + A), n))};
    
  • PARI
    A(i,j)=i==j

Formula

n-th 1 is followed by 4*n-1 0's. In the sequence with flattened indices, the 1's are at positions listed in A046092.
G.f.: 1/(1 - x*y). E.g.f.: exp(x*y).
Considered as a linear sequence, expansion of q^(-1/2)*eta(q^8)^2/eta(q^4) in powers of q. If A(x) is the g.f., then B(a) = (q*A(a^2))^2 satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = u^2*w - v^3 - 4*v*w^2. Also, given g.f. A(x), then B(q) = q*A(q^2) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u2^2*u6 - u1*u6^3 - u3^3*u2. - Michael Somos, Apr 13 2005
a(n) = b(2*n + 1) where b(n) is multiplicative and b(2^e) = 0^e, b(p^e) = (1 + (-1)^e)/2 if p>2. - Michael Somos, Jun 06 2005
a(n) = floor(sqrt(2*n+1)) - floor(sqrt(2*n)). - Ridouane Oudra, Oct 09 2020

A285733 Transpose of square array A285732.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

See A285732.

Examples

			The top left 9 X 9 corner of the array:
  -1,  1,  3,  6, 10, 15, 21, 28, 36
   1, -2,  2,  5,  9, 14, 20, 27, 35
   2,  3, -3,  4,  8, 13, 19, 26, 34
   4,  5,  6, -4,  7, 12, 18, 25, 33
   7,  8,  9, 10, -5, 11, 17, 24, 32
  11, 12, 13, 14, 15, -6, 16, 23, 31
  16, 17, 18, 19, 20, 21, -7, 22, 30
  22, 23, 24, 25, 26, 27, 28, -8, 29
  29, 30, 31, 32, 33, 34, 35, 36, -9
		

Crossrefs

Transpose: A285732.

Programs

  • Python
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def A(n, k): return -n if n == k else T(n - k, k) if n>k else T(n, k - n)
    for n in range(1, 21): print([A(n - k + 1, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 03 2017
  • Scheme
    (define (A285733 n) (A285732bi (A004736 n) (A002260 n))) ;; For A285732bi see under A285732.
    

Formula

A(n,k) = A285732(k,n) = A285723(n,k) - A286100(n,k).
Showing 1-3 of 3 results.