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

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.

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

A286098 Square array read by antidiagonals: A(n,k) = T(n AND k, n OR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986).

Original entry on oeis.org

0, 1, 1, 3, 4, 3, 6, 6, 6, 6, 10, 11, 12, 11, 10, 15, 15, 17, 17, 15, 15, 21, 22, 21, 24, 21, 22, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 37, 38, 37, 40, 37, 38, 37, 36, 45, 45, 47, 47, 49, 49, 47, 47, 45, 45, 55, 56, 55, 58, 59, 60, 59, 58, 55, 56, 55, 66, 66, 66, 66, 70, 70, 70, 70, 66, 66, 66, 66, 78, 79, 80, 79, 78, 83, 84, 83, 78, 79, 80, 79, 78
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

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

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,  1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
   1,  4,   6,  11,  15,  22,  28,  37,  45,  56,  66,  79,  91
   3,  6,  12,  17,  21,  28,  38,  47,  55,  66,  80,  93, 105
   6, 11,  17,  24,  28,  37,  47,  58,  66,  79,  93, 108, 120
  10, 15,  21,  28,  40,  49,  59,  70,  78,  91, 105, 120, 140
  15, 22,  28,  37,  49,  60,  70,  83,  91, 106, 120, 137, 157
  21, 28,  38,  47,  59,  70,  84,  97, 105, 120, 138, 155, 175
  28, 37,  47,  58,  70,  83,  97, 112, 120, 137, 155, 174, 194
  36, 45,  55,  66,  78,  91, 105, 120, 144, 161, 179, 198, 218
  45, 56,  66,  79,  91, 106, 120, 137, 161, 180, 198, 219, 239
  55, 66,  80,  93, 105, 120, 138, 155, 179, 198, 220, 241, 261
  66, 79,  93, 108, 120, 137, 155, 174, 198, 219, 241, 264, 284
  78, 91, 105, 120, 140, 157, 175, 194, 218, 239, 261, 284, 312
		

Crossrefs

Cf. A000217 (row 0 & column 0), A084263 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286099, A286101, A286102, A286108.

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitAnd[n, k],BitOr[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 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(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286098 n) (A286098bi (A002262 n) (A025581 n)))
    (define (A286098bi row col) (let ((a (A004198bi row col)) (b (A003986bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
    

Formula

A(n,k) = T(A004198(n,k), A003986(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, ...].

A286099 Square array read by antidiagonals: A(n,k) = T(n OR k, n AND k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and OR is bitwise-or (A003986).

Original entry on oeis.org

0, 2, 2, 5, 4, 5, 9, 9, 9, 9, 14, 13, 12, 13, 14, 20, 20, 18, 18, 20, 20, 27, 26, 27, 24, 27, 26, 27, 35, 35, 35, 35, 35, 35, 35, 35, 44, 43, 42, 43, 40, 43, 42, 43, 44, 54, 54, 52, 52, 50, 50, 52, 52, 54, 54, 65, 64, 65, 62, 61, 60, 61, 62, 65, 64, 65, 77, 77, 77, 77, 73, 73, 73, 73, 77, 77, 77, 77, 90, 89, 88, 89, 90, 85, 84, 85, 90, 89, 88, 89, 90
Offset: 0

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

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

Examples

			The top left 0 .. 12 x 0 .. 12 corner of the array:
   0,   2,   5,   9,  14,  20,  27,  35,  44,  54,  65,  77,  90
   2,   4,   9,  13,  20,  26,  35,  43,  54,  64,  77,  89, 104
   5,   9,  12,  18,  27,  35,  42,  52,  65,  77,  88, 102, 119
   9,  13,  18,  24,  35,  43,  52,  62,  77,  89, 102, 116, 135
  14,  20,  27,  35,  40,  50,  61,  73,  90, 104, 119, 135, 148
  20,  26,  35,  43,  50,  60,  73,  85, 104, 118, 135, 151, 166
  27,  35,  42,  52,  61,  73,  84,  98, 119, 135, 150, 168, 185
  35,  43,  52,  62,  73,  85,  98, 112, 135, 151, 168, 186, 205
  44,  54,  65,  77,  90, 104, 119, 135, 144, 162, 181, 201, 222
  54,  64,  77,  89, 104, 118, 135, 151, 162, 180, 201, 221, 244
  65,  77,  88, 102, 119, 135, 150, 168, 181, 201, 220, 242, 267
  77,  89, 102, 116, 135, 151, 168, 186, 201, 221, 242, 264, 291
  90, 104, 119, 135, 148, 166, 185, 205, 222, 244, 267, 291, 312
		

Crossrefs

Cf. A000096 (row 0 & column 0), A162761 (seems to be row 1 & column 1), A046092 (main diagonal).
Cf. also arrays A286098, A286101, A286102, A286109.

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitOr[n, k],BitAnd[n,  k]]; Table[A[n - k, k], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 21 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(0, 21): print([A(k, n - k) for k in range(0, n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286099 n) (A286099bi (A002262 n) (A025581 n)))
    (define (A286099bi row col) (let ((a (A003986bi row col)) (b (A004198bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003986bi and A004198bi implement bitwise-OR (A003986) and bitwise-AND (A004198).
    

Formula

A(n,k) = T(A003986(n,k), A004198(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, ...].

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