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

A285723 Transpose of square array A285722.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

See A285722.

Examples

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

Crossrefs

Transpose: A285722.
Cf. A000217 (row 1), A000124 (column 1, from 1 onward).
Cf. also A285733.

Programs

  • Mathematica
    A[n_, n_] = 0;
    A[n_, k_] /; k == n - 1 := (k^2 - k + 2)/2;
    A[1, k_] := (k^2 - 3 k + 4)/2;
    A[n_, k_] /; 1 <= k <= n - 2 := A[n, k] = A[n, k + 1] + 1;
    A[n_, k_] /; k > n := A[n, k] = A[n - 1, k] + 1;
    T[n_, k_] := A[k, n];
    Table[T[n - k + 1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 19 2019 *)
  • Python
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def A(n, k): return 0 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 (A285723 n) (A285722bi (A004736 n) (A002260 n))) ;; For A285722bi see A285722.
    

Formula

A(n,k) = A285722(k,n).

A331307 Lexicographically earliest infinite sequence such that for all i, j: a(i) = a(j) => f(i) = f(j), where f(n) = A285722(n), except f(1) = -1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 19 2020

Keywords

Comments

Restricted growth sequence transform of function: f(1) = -1, and for n>1, f(n) = A285722(n), when the latter is considered as an one-dimensional sequence.
For all i, j:
A331306(i) = A331306(j) => a(i) = a(j) => A072030(i) = A072030(j).

Crossrefs

Cf. also A331305, A331306.

Programs

  • PARI
    up_to = 25425; \\ = binomial(225+1,2)
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A000027pairton(a,b) = ((2+((a+b)^2 - a) - (3*b))/2);
    A285722sq(n, k) = if(n==k,0,if(n>k,A000027pairton(n-k,k),A000027pairton(n,k-n)));
    A285722list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A285722sq(col,(a-(col-1))))); (v); };
    v285722 = A285722list(up_to);
    A285722(n) = v285722[n];
    A331307aux(n) = if(1==n,-n,A285722(n));
    v331307 = rgs_transform(vector(up_to, n, A331307aux(n)));
    A331307(n) = v331307[n];

A286156 A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, square array read by descending antidiagonals.

Original entry on oeis.org

1, 2, 3, 2, 1, 6, 2, 5, 4, 10, 2, 5, 1, 3, 15, 2, 5, 9, 4, 7, 21, 2, 5, 9, 1, 8, 6, 28, 2, 5, 9, 14, 4, 3, 11, 36, 2, 5, 9, 14, 1, 8, 7, 10, 45, 2, 5, 9, 14, 20, 4, 13, 12, 16, 55, 2, 5, 9, 14, 20, 1, 8, 3, 6, 15, 66, 2, 5, 9, 14, 20, 27, 4, 13, 7, 11, 22, 78, 2, 5, 9, 14, 20, 27, 1, 8, 19, 12, 17, 21, 91, 2, 5, 9, 14, 20, 27, 35, 4, 13, 3, 18, 10, 29, 105
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Examples

			The top left 15 X 15 corner of the array:
    1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,   2,   2
    3,  1,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,   5,   5
    6,  4,  1,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,   9,   9
   10,  3,  4,  1, 14, 14, 14, 14, 14, 14, 14, 14, 14,  14,  14
   15,  7,  8,  4,  1, 20, 20, 20, 20, 20, 20, 20, 20,  20,  20
   21,  6,  3,  8,  4,  1, 27, 27, 27, 27, 27, 27, 27,  27,  27
   28, 11,  7, 13,  8,  4,  1, 35, 35, 35, 35, 35, 35,  35,  35
   36, 10, 12,  3, 13,  8,  4,  1, 44, 44, 44, 44, 44,  44,  44
   45, 16,  6,  7, 19, 13,  8,  4,  1, 54, 54, 54, 54,  54,  54
   55, 15, 11, 12,  3, 19, 13,  8,  4,  1, 65, 65, 65,  65,  65
   66, 22, 17, 18,  7, 26, 19, 13,  8,  4,  1, 77, 77,  77,  77
   78, 21, 10,  6, 12,  3, 26, 19, 13,  8,  4,  1, 90,  90,  90
   91, 29, 16, 11, 18,  7, 34, 26, 19, 13,  8,  4,  1, 104, 104
  105, 28, 23, 17, 25, 12,  3, 34, 26, 19, 13,  8,  4,   1, 119
  120, 37, 15, 24,  6, 18,  7, 43, 34, 26, 19, 13,  8,   4,   1
		

Crossrefs

Cf. A286157 (transpose), A286158 (lower triangular region), A286159 (lower triangular region transposed).
Cf. A000217 (column 1), A000012 (the main diagonal), A000096 (superdiagonal), A034856.

Programs

  • Mathematica
    Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Function[m, Reverse@ QuotientRemainder[m, k]][n - k + 1], {n, 14}, {k, n}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n%k, n//k)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)])  # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286156 n) (A286156bi (A002260 n) (A004736 n)))
    (define (A286156bi row col) (if (zero? col) -1 (let ((a (remainder row col)) (b (quotient row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))))
    

Formula

A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...]. This sequence lists only values for indices n >= 1, k >= 1.

A285721 Square array read by antidiagonals: A(n,k) = number of steps in simple Euclidean algorithm for gcd(n,k) to reach the termination test n=k, read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 03 2017

Keywords

Examples

			The top left 18 X 18 corner of the array:
   0, 1, 2, 3, 4, 5, 6, 7, 8,  9, 10, 11, 12, 13, 14, 15, 16, 17
   1, 0, 2, 1, 3, 2, 4, 3, 5,  4,  6,  5,  7,  6,  8,  7,  9,  8
   2, 2, 0, 3, 3, 1, 4, 4, 2,  5,  5,  3,  6,  6,  4,  7,  7,  5
   3, 1, 3, 0, 4, 2, 4, 1, 5,  3,  5,  2,  6,  4,  6,  3,  7,  5
   4, 3, 3, 4, 0, 5, 4, 4, 5,  1,  6,  5,  5,  6,  2,  7,  6,  6
   5, 2, 1, 2, 5, 0, 6, 3, 2,  3,  6,  1,  7,  4,  3,  4,  7,  2
   6, 4, 4, 4, 4, 6, 0, 7, 5,  5,  5,  5,  7,  1,  8,  6,  6,  6
   7, 3, 4, 1, 4, 3, 7, 0, 8,  4,  5,  2,  5,  4,  8,  1,  9,  5
   8, 5, 2, 5, 5, 2, 5, 8, 0,  9,  6,  3,  6,  6,  3,  6,  9,  1
   9, 4, 5, 3, 1, 3, 5, 4, 9,  0, 10,  5,  6,  4,  2,  4,  6,  5
  10, 6, 5, 5, 6, 6, 5, 5, 6, 10,  0, 11,  7,  6,  6,  7,  7,  6
  11, 5, 3, 2, 5, 1, 5, 2, 3,  5, 11,  0, 12,  6,  4,  3,  6,  2
  12, 7, 6, 6, 5, 7, 7, 5, 6,  6,  7, 12,  0, 13,  8,  7,  7,  6
  13, 6, 6, 4, 6, 4, 1, 4, 6,  4,  6,  6, 13,  0, 14,  7,  7,  5
  14, 8, 4, 6, 2, 3, 8, 8, 3,  2,  6,  4,  8, 14,  0, 15,  9,  5
  15, 7, 7, 3, 7, 4, 6, 1, 6,  4,  7,  3,  7,  7, 15,  0, 16,  8
  16, 9, 7, 7, 6, 7, 6, 9, 9,  6,  7,  6,  7,  7,  9, 16,  0, 17
  17, 8, 5, 5, 6, 2, 6, 5, 1,  5,  6,  2,  6,  5,  5,  8, 17,  0
		

Crossrefs

One less than A072030.
Row 2 & column 2: A028242 (but with starting offset 1).
Row 3 & column 3 (from zero onward) seems to be A226576.
Compare also to arrays A049834, A113881, A219158.

Programs

  • Python
    def A(n, k): return 0 if n==k else 1 + A(abs(n - k), min(n, k))
    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 (A285721 n) (A285721bi (A002260 n) (A004736 n)))
    (define (A285721bi row col) (cond ((= row col) 0) ((> row col) (+ 1 (A285721bi (- row col) col))) (else (+ 1 (A285721bi row (- col row))))))
    ;; Alternatively:
    (define (A285721bi row col) (if (= row col) 0 (+ 1 (A285721bi (abs (- row col)) (min col row)))))
    ;; Another implementation, as an one-dimensional sequence:
    (definec (A285721 n) (if (zero? (A285722 n)) 0 (+ 1 (A285721 (A285722 n)))))
    

Formula

If n = k, then A(n,k) = 0, if n > k, then A(n,k) = 1 + A(n-k,k), otherwise [when n < k], A(n,k) = 1 + A(n,k-n).
Or alternatively, when n <> k, A(n,k) = 1 + A(abs(n-k),min(n,k)).
A(n,k) = A072030(n,k)-1.
As an one-dimensional sequence:
a(n) = 0 if A285722(n) = 0, otherwise a(n) = 1 + a(A285722(n)). [Here A285722 is also used as an one-dimensional sequence.]

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).

A286101 Square array A(n,k) read by antidiagonals: A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 7, 16, 16, 7, 11, 12, 13, 12, 11, 16, 46, 67, 67, 46, 16, 22, 23, 106, 25, 106, 23, 22, 29, 92, 31, 191, 191, 31, 92, 29, 37, 38, 211, 80, 41, 80, 211, 38, 37, 46, 154, 277, 379, 436, 436, 379, 277, 154, 46, 56, 57, 58, 59, 596, 61, 596, 59, 58, 57, 56, 67, 232, 436, 631, 781, 862, 862, 781, 631, 436, 232, 67, 79, 80, 529, 212, 991, 302, 85, 302, 991, 212, 529, 80, 79
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 12 X 12 corner of the array:
   1,   2,   4,   7,   11,   16,   22,   29,   37,   46,   56,   67
   2,   5,  16,  12,   46,   23,   92,   38,  154,   57,  232,   80
   4,  16,  13,  67,  106,   31,  211,  277,   58,  436,  529,   94
   7,  12,  67,  25,  191,   80,  379,   59,  631,  212,  947,  109
  11,  46, 106, 191,   41,  436,  596,  781,  991,   96, 1486, 1771
  16,  23,  31,  80,  436,   61,  862,  302,  193,  467, 2146,  142
  22,  92, 211, 379,  596,  862,   85, 1541, 1954, 2416, 2927, 3487
  29,  38, 277,  59,  781,  302, 1541,  113, 2557,  822, 3829,  355
  37, 154,  58, 631,  991,  193, 1954, 2557,  145, 4006, 4852,  706
  46,  57, 436, 212,   96,  467, 2416,  822, 4006,  181, 5996, 1832
  56, 232, 529, 947, 1486, 2146, 2927, 3829, 4852, 5996,  221, 8647
  67,  80,  94, 109, 1771,  142, 3487,  355,  706, 1832, 8647,  265
		

Crossrefs

Cf. A000124 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(gcd(n,k), lcm(n,k)), 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) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

A286102 Square array A(n,k) read by antidiagonals: A(n,k) = T(lcm(n,k), gcd(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 3, 3, 6, 5, 6, 10, 21, 21, 10, 15, 14, 13, 14, 15, 21, 55, 78, 78, 55, 21, 28, 27, 120, 25, 120, 27, 28, 36, 105, 34, 210, 210, 34, 105, 36, 45, 44, 231, 90, 41, 90, 231, 44, 45, 55, 171, 300, 406, 465, 465, 406, 300, 171, 55, 66, 65, 64, 63, 630, 61, 630, 63, 64, 65, 66, 78, 253, 465, 666, 820, 903, 903, 820, 666, 465, 253, 78, 91, 90, 561, 230, 1035, 324, 85, 324, 1035, 230, 561, 90, 91
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 12 X 12 corner of the array:
   1,   3,   6,  10,   15,   21,   28,   36,   45,   55,   66,   78
   3,   5,  21,  14,   55,   27,  105,   44,  171,   65,  253,   90
   6,  21,  13,  78,  120,   34,  231,  300,   64,  465,  561,  103
  10,  14,  78,  25,  210,   90,  406,   63,  666,  230,  990,  117
  15,  55, 120, 210,   41,  465,  630,  820, 1035,  101, 1540, 1830
  21,  27,  34,  90,  465,   61,  903,  324,  208,  495, 2211,  148
  28, 105, 231, 406,  630,  903,   85, 1596, 2016, 2485, 3003, 3570
  36,  44, 300,  63,  820,  324, 1596,  113, 2628,  860, 3916,  375
  45, 171,  64, 666, 1035,  208, 2016, 2628,  145, 4095, 4950,  739
  55,  65, 465, 230,  101,  495, 2485,  860, 4095,  181, 6105, 1890
  66, 253, 561, 990, 1540, 2211, 3003, 3916, 4950, 6105,  221, 8778
  78,  90, 103, 117, 1830,  148, 3570,  375,  739, 1890, 8778,  265
		

Crossrefs

Cf. A000217 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(lcm(n,k), gcd(n,k)), 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) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

A285724 Square array read by descending antidiagonals: If n > k, A(n,k) = T(lcm(n,k), gcd(n,k)), otherwise A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 16, 21, 10, 11, 12, 13, 14, 15, 16, 46, 67, 78, 55, 21, 22, 23, 106, 25, 120, 27, 28, 29, 92, 31, 191, 210, 34, 105, 36, 37, 38, 211, 80, 41, 90, 231, 44, 45, 46, 154, 277, 379, 436, 465, 406, 300, 171, 55, 56, 57, 58, 59, 596, 61, 630, 63, 64, 65, 66, 67, 232, 436, 631, 781, 862, 903, 820, 666, 465, 253, 78, 79, 80, 529, 212, 991, 302, 85, 324, 1035, 230, 561, 90, 91
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 12 X 12 corner of the array:
   1,   2,   4,   7,   11,   16,   22,   29,   37,   46,   56,   67
   3,   5,  16,  12,   46,   23,   92,   38,  154,   57,  232,   80
   6,  21,  13,  67,  106,   31,  211,  277,   58,  436,  529,   94
  10,  14,  78,  25,  191,   80,  379,   59,  631,  212,  947,  109
  15,  55, 120, 210,   41,  436,  596,  781,  991,   96, 1486, 1771
  21,  27,  34,  90,  465,   61,  862,  302,  193,  467, 2146,  142
  28, 105, 231, 406,  630,  903,   85, 1541, 1954, 2416, 2927, 3487
  36,  44, 300,  63,  820,  324, 1596,  113, 2557,  822, 3829,  355
  45, 171,  64, 666, 1035,  208, 2016, 2628,  145, 4006, 4852,  706
  55,  65, 465, 230,  101,  495, 2485,  860, 4095,  181, 5996, 1832
  66, 253, 561, 990, 1540, 2211, 3003, 3916, 4950, 6105,  221, 8647
  78,  90, 103, 117, 1830,  148, 3570,  375,  739, 1890, 8778,  265
		

Crossrefs

Cf. A000124 (row 1), A000217 (column 1), A001844 (main diagonal).

Programs

  • Scheme
    (define (A285724 n) (A285724bi (A002260 n) (A004736 n)))
    (define (A285724bi row col) (if (> row col) (A000027bi (lcm row col) (gcd row col)) (A000027bi (gcd row col) (lcm row col))))
    (define (A000027bi row col) (* (/ 1 2) (+ (expt (+ row col) 2) (- row) (- (* 3 col)) 2)))

Formula

If n > k, A(n,k) = T(lcm(n,k),gcd(n,k)), otherwise A(n,k) = T(gcd(n,k),lcm(n,k)), 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.
If n < k, A(n,k) = A286101(n,k), otherwise A(n,k) = A286102(n,k).
Showing 1-8 of 8 results.