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

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

A286108 Square array read by antidiagonals: A(n,k) = T(2*(n AND k), n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, AND is bitwise-and (A004198) and XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 1, 1, 3, 5, 3, 6, 6, 6, 6, 10, 12, 14, 12, 10, 15, 15, 19, 19, 15, 15, 21, 23, 21, 27, 21, 23, 21, 28, 28, 28, 28, 28, 28, 28, 28, 36, 38, 40, 38, 44, 38, 40, 38, 36, 45, 45, 49, 49, 53, 53, 49, 49, 45, 45, 55, 57, 55, 61, 63, 65, 63, 61, 55, 57, 55, 66, 66, 66, 66, 74, 74, 74, 74, 66, 66, 66, 66, 78, 80, 82, 80, 78, 88, 90, 88, 78, 80, 82, 80, 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,  5,   6,  12,  15,  23,  28,  38,  45,  57,  66,  80,  91
   3,  6,  14,  19,  21,  28,  40,  49,  55,  66,  82,  95, 105
   6, 12,  19,  27,  28,  38,  49,  61,  66,  80,  95, 111, 120
  10, 15,  21,  28,  44,  53,  63,  74,  78,  91, 105, 120, 144
  15, 23,  28,  38,  53,  65,  74,  88,  91, 107, 120, 138, 161
  21, 28,  40,  49,  63,  74,  90, 103, 105, 120, 140, 157, 179
  28, 38,  49,  61,  74,  88, 103, 119, 120, 138, 157, 177, 198
  36, 45,  55,  66,  78,  91, 105, 120, 152, 169, 187, 206, 226
  45, 57,  66,  80,  91, 107, 120, 138, 169, 189, 206, 228, 247
  55, 66,  82,  95, 105, 120, 140, 157, 187, 206, 230, 251, 269
  66, 80,  95, 111, 120, 138, 157, 177, 206, 228, 251, 275, 292
  78, 91, 105, 120, 144, 161, 179, 198, 226, 247, 269, 292, 324
		

Crossrefs

Cf. A000217 (row 0 & column 0), A014106 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[2*BitAnd[n, k], BitXor[n, k]]; Table[A[k, n - k ], {n, 0, 20}, {k, 0, n}] // Flatten (* Indranil Ghosh, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(2*(n&k), n^k)
    for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286108 n) (A286108bi (A002262 n) (A025581 n)))
    (define (A286108bi row col) (let ((a (* 2 (A004198bi row col))) (b (A003987bi row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Here A003987bi and A004198bi implement bitwise-xor (A003987) and bitwise-and (A004198).
    

Formula

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

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

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, ...].
Showing 1-4 of 4 results.