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.

A268714 Square array A(i,j) = A006068(i) + A006068(j), read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 2, 4, 4, 2, 7, 3, 6, 3, 7, 6, 8, 5, 5, 8, 6, 4, 7, 10, 4, 10, 7, 4, 5, 5, 9, 9, 9, 9, 5, 5, 15, 6, 7, 8, 14, 8, 7, 6, 15, 14, 16, 8, 6, 13, 13, 6, 8, 16, 14, 12, 15, 18, 7, 11, 12, 11, 7, 18, 15, 12, 13, 13, 17, 17, 12, 10, 10, 12, 17, 17, 13, 13, 8, 14, 15, 16, 22, 11, 8, 11, 22, 16, 15, 14, 8, 9, 9, 16, 14, 21, 21, 9, 9, 21, 21, 14, 16, 9, 9
Offset: 0

Views

Author

Antti Karttunen, Feb 12 2016

Keywords

Examples

			The top left [0 .. 15] x [0 .. 15] section of the array:
   0,  1,  3,  2,  7,  6,  4,  5, 15, 14, 12, 13,  8,  9, 11, 10
   1,  2,  4,  3,  8,  7,  5,  6, 16, 15, 13, 14,  9, 10, 12, 11
   3,  4,  6,  5, 10,  9,  7,  8, 18, 17, 15, 16, 11, 12, 14, 13
   2,  3,  5,  4,  9,  8,  6,  7, 17, 16, 14, 15, 10, 11, 13, 12
   7,  8, 10,  9, 14, 13, 11, 12, 22, 21, 19, 20, 15, 16, 18, 17
   6,  7,  9,  8, 13, 12, 10, 11, 21, 20, 18, 19, 14, 15, 17, 16
   4,  5,  7,  6, 11, 10,  8,  9, 19, 18, 16, 17, 12, 13, 15, 14
   5,  6,  8,  7, 12, 11,  9, 10, 20, 19, 17, 18, 13, 14, 16, 15
  15, 16, 18, 17, 22, 21, 19, 20, 30, 29, 27, 28, 23, 24, 26, 25
  14, 15, 17, 16, 21, 20, 18, 19, 29, 28, 26, 27, 22, 23, 25, 24
  12, 13, 15, 14, 19, 18, 16, 17, 27, 26, 24, 25, 20, 21, 23, 22
  13, 14, 16, 15, 20, 19, 17, 18, 28, 27, 25, 26, 21, 22, 24, 23
   8,  9, 11, 10, 15, 14, 12, 13, 23, 22, 20, 21, 16, 17, 19, 18
   9, 10, 12, 11, 16, 15, 13, 14, 24, 23, 21, 22, 17, 18, 20, 19
  11, 12, 14, 13, 18, 17, 15, 16, 26, 25, 23, 24, 19, 20, 22, 21
  10, 11, 13, 12, 17, 16, 14, 15, 25, 24, 22, 23, 18, 19, 21, 20
		

Crossrefs

Cf. A006068 (row 0, column 0).
Cf. A066194 (row 1, column 1).
Cf. A268716 (main diagonal).
Cf. also A268724.

Programs

  • Mathematica
    A006068[n_] := BitXor @@ Table[Floor[n/2^m], {m, 0, Log[2, n]}]; A006068[0] = 0; A[i_, j_] := A006068[i] + A006068[j]; Table[A[i-j, j], {i, 0, 13}, {j, 0, i}] // Flatten (* Jean-François Alcover, Feb 17 2016 *)
  • PARI
    \\ Produces the triangle when the array is read by antidiagonals
    a(n) = if(n<2, n, 2*a(floor(n/2)) + (n%2 + a(floor(n/2))%2)%2); /* A006068 */
    T(i,j) = a(i) + a(j);
    for(i=0, 13, for(j=0, i, print1(T(i - j, j),", "););print();); \\ Indranil Ghosh, Mar 23 2017
    
  • Python
    # Produces the triangle when the array is read by antidiagonals
    def A006068(n):
        return n if n<2 else 2*A006068(n//2) + (n%2 + A006068(n//2)%2)%2
    def T(i,j): return A006068(i) + A006068(j)
    for i in range(14):
        print([T(i - j, j) for j in range(i + 1)]) # Indranil Ghosh, Mar 23 2017
  • Scheme
    (define (A268714 n) (A268714bi (A002262 n) (A025581 n)))
    (define (A268714bi row col) (+ (A006068 row) (A006068 col)))
    

Formula

A(i,j) = A006068(i) + A006068(j).
A(i,j) = A006068(A268715(i,j)). - Corrected Mar 23 2017

A268724 Square array A(i,j) = A006068(i) * A006068(j), read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 3, 3, 2, 9, 2, 7, 6, 6, 7, 6, 21, 4, 21, 6, 4, 18, 14, 14, 18, 4, 5, 12, 12, 49, 12, 12, 5, 15, 15, 8, 42, 42, 8, 15, 15, 14, 45, 10, 28, 36, 28, 10, 45, 14, 12, 42, 30, 35, 24, 24, 35, 30, 42, 12, 13, 36, 28, 105, 30, 16, 30, 105, 28, 36, 13, 8, 39, 24, 98, 90, 20, 20, 90, 98, 24, 39, 8, 9, 24, 26, 84, 84, 60, 25, 60, 84, 84, 26, 24, 9
Offset: 1

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Examples

			The top left [1 .. 15] x [1 .. 15] section of the array:
   1,  3,  2,  7,   6,  4,  5,  15,  14,  12,  13,   8,   9,  11,  10
   3,  9,  6,  21, 18, 12, 15,  45,  42,  36,  39,  24,  27,  33,  30
   2,  6,  4,  14, 12,  8, 10,  30,  28,  24,  26,  16,  18,  22,  20
   7, 21, 14,  49, 42, 28, 35, 105,  98,  84,  91,  56,  63,  77,  70
   6, 18, 12,  42, 36, 24, 30,  90,  84,  72,  78,  48,  54,  66,  60
   4, 12,  8,  28, 24, 16, 20,  60,  56,  48,  52,  32,  36,  44,  40
   5, 15, 10,  35, 30, 20, 25,  75,  70,  60,  65,  40,  45,  55,  50
  15, 45, 30, 105, 90, 60, 75, 225, 210, 180, 195, 120, 135, 165, 150
  14, 42, 28,  98, 84, 56, 70, 210, 196, 168, 182, 112, 126, 154, 140
  12, 36, 24,  84, 72, 48, 60, 180, 168, 144, 156,  96, 108, 132, 120
  13, 39, 26,  91, 78, 52, 65, 195, 182, 156, 169, 104, 117, 143, 130
   8, 24, 16,  56, 48, 32, 40, 120, 112,  96, 104,  64,  72,  88,  80
   9, 27, 18,  63, 54, 36, 45, 135, 126, 108, 117,  72,  81,  99,  90
  11, 33, 22,  77, 66, 44, 55, 165, 154, 132, 143,  88,  99, 121, 110
  10, 30, 20,  70, 60, 40, 50, 150, 140, 120, 130,  80,  90, 110, 100
		

Crossrefs

Cf. A268725.
Cf. A006068 (row 1, column 1).
Cf. A268716 (row 3, column 3).
Cf. A268721 (the antidiagonal sums).
Cf. also A268714.

Programs

Formula

A(i,j) = A006068(i) * A006068(j)
A(i,j) = A006068(A268725(i,j)).

A268836 Antidiagonal sums of array A268714: a(n) = Sum_{k=0..n} A006068(n)+A006068(n-k).

Original entry on oeis.org

0, 2, 8, 12, 26, 38, 46, 56, 86, 114, 138, 164, 180, 198, 220, 240, 302, 362, 418, 476, 524, 574, 628, 680, 712, 746, 784, 820, 866, 910, 950, 992, 1118, 1242, 1362, 1484, 1596, 1710, 1828, 1944, 2040, 2138, 2240, 2340, 2450, 2558, 2662, 2768, 2832, 2898, 2968, 3036, 3114, 3190, 3262, 3336, 3430, 3522, 3610, 3700
Offset: 0

Views

Author

Antti Karttunen, Feb 15 2016

Keywords

Crossrefs

Cf. also A268837, A268721.
Partial sums of A268716.

Programs

  • Scheme
    (define (A268836 n) (add (lambda (k) (+ (A006068 k) (A006068 (- (+ n 0) k)))) 0 n))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))

Formula

a(n) = Sum_{k=0..n} A006068(n)+A006068(n-k).
Showing 1-3 of 3 results.