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-10 of 213 results. Next

A318457 a(n) = n XOR A001065(n), where XOR is bitwise-xor (A003987) and A001065 = sum of proper divisors.

Original entry on oeis.org

1, 3, 2, 7, 4, 0, 6, 15, 13, 2, 10, 28, 12, 4, 6, 31, 16, 7, 18, 2, 30, 24, 22, 60, 31, 10, 22, 0, 28, 52, 30, 63, 46, 54, 46, 19, 36, 48, 54, 26, 40, 28, 42, 4, 12, 52, 46, 124, 57, 25, 38, 26, 52, 116, 38, 120, 46, 26, 58, 80, 60, 28, 22, 127, 82, 12, 66, 126, 94, 12, 70, 51, 72, 98, 122, 12, 94, 20, 78, 58, 121, 126, 82, 216, 66
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Cf. A000396 (positions of zeros).

Programs

  • Mathematica
    Array[BitXor[#, DivisorSigma[1, #] - #] &, 100] (* Paolo Xausa, Dec 16 2024 *)
  • PARI
    A318457(n) = bitxor(n,sigma(n)-n);

Formula

a(n) = A003987(n, A001065(n)).
a(n) = A000203(n) - 2*A318458(n).

A318467 a(n) = 2*n XOR A000203(n), where XOR is bitwise-xor (A003987) and A000203 = sum of divisors.

Original entry on oeis.org

3, 7, 2, 15, 12, 0, 6, 31, 31, 6, 26, 4, 20, 4, 6, 63, 48, 3, 50, 2, 10, 8, 54, 12, 45, 30, 30, 0, 36, 116, 30, 127, 114, 114, 118, 19, 108, 112, 118, 10, 120, 52, 122, 12, 20, 20, 110, 28, 91, 57, 46, 10, 92, 20, 38, 8, 34, 46, 74, 208, 68, 28, 22, 255, 214, 20, 194, 246, 234, 28, 198, 83, 216, 230, 234, 20, 250, 52, 206, 26
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Cf. A000396 (positions of zeros), A378227 (XOR-Moebius transform), A379234 (fixed points), A379236.
Cf. also A294899, A318457, A378988.

Programs

  • Mathematica
    Table[BitXor[2n,DivisorSigma[1,n]],{n,80}] (* Harvey P. Dale, Oct 30 2022 *)
  • PARI
    A318467(n) = bitxor(2*n,sigma(n));

Formula

a(n) = A003987(2*n, A000203(n)).
a(n) = A224880(n) - 2*A318468(n).
a(n) = 2*n XOR (A318457(n)+2*A318458(n)). - Antti Karttunen, Jan 08 2025

A294899 a(n) = A000203(n) XOR A005187(n), where XOR is bitwise-XOR, A003987.

Original entry on oeis.org

0, 0, 0, 0, 14, 6, 3, 0, 29, 0, 31, 10, 25, 1, 2, 0, 50, 5, 55, 12, 7, 13, 50, 18, 48, 27, 26, 13, 40, 112, 25, 0, 112, 116, 115, 29, 97, 117, 114, 20, 101, 49, 126, 1, 24, 16, 105, 34, 102, 60, 42, 7, 80, 16, 33, 21, 62, 42, 77, 220, 75, 23, 16, 0, 212, 18, 199, 248, 231, 25, 194, 77, 197, 227, 238, 25, 246, 48, 201, 36
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2017

Keywords

Crossrefs

Cf. A000203, A003987, A005187, A294898, A295296 (positions of zeros), A295297 (parity of a(n)).
Cf. also A169813, A279357, A283997.

Programs

Formula

a(n) = A000203(n) XOR A005187(n).

A286151 Square array read by descending antidiagonals: If n > k, A(n,k) = T(n XOR k, k), and otherwise A(n,k) = T(n, n XOR k), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 6, 11, 13, 9, 10, 7, 5, 8, 14, 15, 22, 8, 7, 26, 20, 21, 16, 38, 9, 42, 19, 27, 28, 37, 47, 58, 62, 52, 43, 35, 36, 29, 23, 48, 14, 51, 25, 34, 44, 45, 56, 30, 39, 19, 16, 41, 33, 64, 54, 55, 46, 80, 31, 25, 20, 23, 32, 88, 53, 65, 66, 79, 93, 108, 32, 41, 39, 31, 116, 102, 89, 77, 78, 67, 57, 94, 140, 33, 27, 30, 148, 101, 63, 76, 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,   1,   3,   6,  10,  15,  21,  28,  36,  45,  55,  66,  78
   2,   2,  11,   7,  22,  16,  37,  29,  56,  46,  79,  67, 106
   5,  13,   5,   8,  38,  47,  23,  30,  80,  93,  57,  68, 138
   9,   8,   7,   9,  58,  48,  39,  31, 108,  94,  81,  69, 174
  14,  26,  42,  62,  14,  19,  25,  32, 140, 157, 175, 194,  82
  20,  19,  52,  51,  16,  20,  41,  33, 176, 158, 215, 195, 110
  27,  43,  25,  41,  23,  39,  27,  34, 216, 237, 177, 196, 142
  35,  34,  33,  32,  31,  30,  29,  35, 260, 238, 217, 197, 178
  44,  64,  88, 116, 148, 184, 224, 268,  44,  53,  63,  74,  86
  54,  53, 102, 101, 166, 165, 246, 245,  46,  54,  87,  75, 114
  65,  89,  63,  87, 185, 225, 183, 223,  57,  81,  65,  76, 146
  77,  76,  75,  74, 205, 204, 203, 202,  69,  68,  67,  77, 182
  90, 118, 150, 186,  86, 114, 146, 182,  82, 110, 142, 178,  90
		

Crossrefs

Cf. A000217 (row 0), A000096 (column 0 and the main diagonal).
Cf. A286153 (same array without row 0 and column 0).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=If[n>k, T[BitXor[n, k], k], T[n, 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(n^k, k) if n>k else T(n, 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 (A286151 n) (A286151bi (A002262 n) (A025581 n)))
    (define (A286151bi row col) (define (pairA001477bi a b) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2)) (cond ((> row col) (pairA001477bi (A003987bi row col) col)) (else (pairA001477bi row (A003987bi col row))))) ;; Where A003987bi implements bitwise-xor (A003987).
    

Formula

If n > k, A(n,k) = T(A003987(n,k),k), otherwise A(n,k) = T(n,A003987(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, and XOR is bitwise-xor (A003987).

A275808 a(0) = 0, for n >= 1, a(n) = A275736(n) XOR a(A257684(n)), where XOR is given by A003987.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Crossrefs

Cf. A275809 (positions of zeros), A275810 (and their first differences).
Cf. also A275728.

Formula

a(0) = 0, for n >= 1, a(n) = A275736(n) XOR a(A257684(n)), where 2-argument function XOR is given by A003987.
a(n) = A248663(A275734(n)).

A283987 a(n) = A002487(n-1) XOR A002487(n), where XOR is bitwise-xor (A003987).

Original entry on oeis.org

1, 0, 3, 3, 2, 1, 1, 2, 5, 7, 6, 7, 7, 6, 7, 5, 4, 1, 3, 4, 11, 13, 2, 5, 5, 2, 13, 11, 4, 3, 1, 4, 7, 3, 12, 13, 15, 12, 13, 9, 8, 3, 5, 8, 9, 11, 14, 11, 11, 14, 11, 9, 8, 5, 3, 8, 9, 13, 12, 15, 13, 12, 3, 7, 6, 1, 13, 14, 11, 7, 4, 9, 11, 4, 25, 21, 22, 27, 7, 14, 13, 5, 24, 27, 29, 24, 31, 23, 20, 29, 31, 20, 23, 25, 2, 9, 9, 2, 25, 23, 20, 31, 29, 20, 23
Offset: 1

Views

Author

Antti Karttunen, Mar 21 2017

Keywords

Crossrefs

Odd bisection of A283977.
Cf. A283973 (positions where coincides with A007306, or equally, with A283986).

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Table[BitXor[a[n - 1], a@ n], {n, 120}] (* Michael De Vlieger, Mar 22 2017 *)
  • PARI
    A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
    for(n=1, 120, print1(bitxor(A(n - 1), A(n)), ", ")) \\ Indranil Ghosh, Mar 23 2017
    
  • Python
    from functools import reduce
    def A283987(n): return sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n)[-1:2:-1],(1,0)))^sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(n-1)[-1:2:-1],(1,0))) if n>1 else 1 # Chai Wah Wu, May 05 2023
  • Scheme
    (define (A283987 n) (A003987bi (A002487 (- n 1)) (A002487 n))) ;; Where A003987bi implements bitwise-XOR (A003987).
    

Formula

a(n) = A002487(n-1) XOR A002487(n), where XOR is bitwise-xor (A003987).
a(n) = A283986(n) - A283988(n).
a(n) = A007306(n) - 2*A283988(n).
a(n) = A283977((2*n)-1).

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

A286109 Square array read by antidiagonals: A(n,k) = T(n XOR k, 2*(n AND 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, 2, 2, 5, 3, 5, 9, 9, 9, 9, 14, 12, 10, 12, 14, 20, 20, 16, 16, 20, 20, 27, 25, 27, 21, 27, 25, 27, 35, 35, 35, 35, 35, 35, 35, 35, 44, 42, 40, 42, 36, 42, 40, 42, 44, 54, 54, 50, 50, 46, 46, 50, 50, 54, 54, 65, 63, 65, 59, 57, 55, 57, 59, 65, 63, 65, 77, 77, 77, 77, 69, 69, 69, 69, 77, 77, 77, 77, 90, 88, 86, 88, 90, 80, 78, 80, 90, 88, 86, 88, 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,   3,   9,  12,  20,  25,  35,  42,  54,  63,  77,  88, 104
   5,   9,  10,  16,  27,  35,  40,  50,  65,  77,  86, 100, 119
   9,  12,  16,  21,  35,  42,  50,  59,  77,  88, 100, 113, 135
  14,  20,  27,  35,  36,  46,  57,  69,  90, 104, 119, 135, 144
  20,  25,  35,  42,  46,  55,  69,  80, 104, 117, 135, 150, 162
  27,  35,  40,  50,  57,  69,  78,  92, 119, 135, 148, 166, 181
  35,  42,  50,  59,  69,  80,  92, 105, 135, 150, 166, 183, 201
  44,  54,  65,  77,  90, 104, 119, 135, 136, 154, 173, 193, 214
  54,  63,  77,  88, 104, 117, 135, 150, 154, 171, 193, 212, 236
  65,  77,  86, 100, 119, 135, 148, 166, 173, 193, 210, 232, 259
  77,  88, 100, 113, 135, 150, 166, 183, 193, 212, 232, 253, 283
  90, 104, 119, 135, 144, 162, 181, 201, 214, 236, 259, 283, 300
		

Crossrefs

Cf. A000096 (row 0 & column 0), A014105 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitXor[n, k], 2*BitAnd[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(n^k, 2*(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 (A286109 n) (A286109bi (A002262 n) (A025581 n)))
    (define (A286109bi row col) (let ((a (A003987bi row col)) (b (* 2 (A004198bi 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(A003987(n,k), 2*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, ...].

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

Original entry on oeis.org

0, 4, 2, 12, 1, 5, 24, 18, 13, 9, 40, 17, 3, 8, 14, 60, 50, 11, 7, 26, 20, 84, 49, 61, 6, 42, 19, 27, 112, 98, 85, 73, 62, 52, 43, 35, 144, 97, 59, 72, 10, 51, 25, 34, 44, 180, 162, 83, 71, 22, 16, 41, 33, 64, 54, 220, 161, 181, 70, 38, 15, 23, 32, 88, 53, 65, 264, 242, 221, 201, 58, 48, 39, 31, 116, 102, 89, 77, 312, 241, 179, 200, 222, 47, 21, 30, 148, 101, 63, 76, 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,   4,  12,  24,  40,  60,  84, 112, 144, 180, 220, 264, 312
   2,   1,  18,  17,  50,  49,  98,  97, 162, 161, 242, 241, 338
   5,  13,   3,  11,  61,  85,  59,  83, 181, 221, 179, 219, 365
   9,   8,   7,   6,  73,  72,  71,  70, 201, 200, 199, 198, 393
  14,  26,  42,  62,  10,  22,  38,  58, 222, 266, 314, 366, 218
  20,  19,  52,  51,  16,  15,  48,  47, 244, 243, 340, 339, 240
  27,  43,  25,  41,  23,  39,  21,  37, 267, 315, 265, 313, 263
  35,  34,  33,  32,  31,  30,  29,  28, 291, 290, 289, 288, 287
  44,  64,  88, 116, 148, 184, 224, 268,  36,  56,  80, 108, 140
  54,  53, 102, 101, 166, 165, 246, 245,  46,  45,  94,  93, 158
  65,  89,  63,  87, 185, 225, 183, 223,  57,  81,  55,  79, 177
  77,  76,  75,  74, 205, 204, 203, 202,  69,  68,  67,  66, 197
  90, 118, 150, 186,  86, 114, 146, 182,  82, 110, 142, 178,  78
		

Crossrefs

Transpose: A286147.
Cf. A046092 (row 0), A000096 (column 0), A000217 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitXor[n, k], k]; Table[A[k, n - 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, k)
    for n in range(21): print([A(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286145 n) (A286145bi (A002262 n) (A025581 n)))
    (define (A286145bi row col) (let ((a (A003987bi row col)) (b col)) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Where A003987bi implements bitwise-xor (A003987).
    

Formula

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

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

Original entry on oeis.org

0, 2, 4, 5, 1, 12, 9, 13, 18, 24, 14, 8, 3, 17, 40, 20, 26, 7, 11, 50, 60, 27, 19, 42, 6, 61, 49, 84, 35, 43, 52, 62, 73, 85, 98, 112, 44, 34, 25, 51, 10, 72, 59, 97, 144, 54, 64, 33, 41, 16, 22, 71, 83, 162, 180, 65, 53, 88, 32, 23, 15, 38, 70, 181, 161, 220, 77, 89, 102, 116, 31, 39, 48, 58, 201, 221, 242, 264, 90, 76, 63, 101, 148, 30, 21, 47, 222, 200, 179, 241, 312
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
    4,   1,  13,   8,  26,  19,  43,  34,  64,  53,  89,  76, 118
   12,  18,   3,   7,  42,  52,  25,  33,  88, 102,  63,  75, 150
   24,  17,  11,   6,  62,  51,  41,  32, 116, 101,  87,  74, 186
   40,  50,  61,  73,  10,  16,  23,  31, 148, 166, 185, 205,  86
   60,  49,  85,  72,  22,  15,  39,  30, 184, 165, 225, 204, 114
   84,  98,  59,  71,  38,  48,  21,  29, 224, 246, 183, 203, 146
  112,  97,  83,  70,  58,  47,  37,  28, 268, 245, 223, 202, 182
  144, 162, 181, 201, 222, 244, 267, 291,  36,  46,  57,  69,  82
  180, 161, 221, 200, 266, 243, 315, 290,  56,  45,  81,  68, 110
  220, 242, 179, 199, 314, 340, 265, 289,  80,  94,  55,  67, 142
  264, 241, 219, 198, 366, 339, 313, 288, 108,  93,  79,  66, 178
  312, 338, 365, 393, 218, 240, 263, 287, 140, 158, 177, 197,  78
		

Crossrefs

Transpose: A286145.
Cf. A000096 (row 0), A046092 (column 0), A000217 (main diagonal).

Programs

  • Mathematica
    T[a_, b_]:=((a + b)^2 + 3a + b)/2; A[n_, k_]:=T[BitXor[n, k], 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, k)
    for n in range(21): print([A(n - k, k) for k in range(n + 1)]) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286147 n) (A286147bi (A002262 n) (A025581 n)))
    (define (A286147bi row col) (let ((a (A003987bi row col)) (b row)) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2))) ;; Where A003987bi implements bitwise-xor (A003987).
    

Formula

A(n,k) = T(A003987(n,k), n), 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-10 of 213 results. Next