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.

A231717 After a(0)=0, a(n) = A231713(A219666(n),A219666(n-1)).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 1, 6, 3, 3, 3, 2, 1, 6, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 2, 3, 10, 3, 3, 3, 2, 1, 6, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 1, 3, 5, 5, 3, 10, 2, 3, 1, 3, 5, 3, 1, 3, 6, 2, 1, 2, 4, 2, 4, 5, 3, 3, 9, 3, 1, 3, 6, 2, 1, 2, 4, 2, 4, 5, 3, 2, 4, 3, 10
Offset: 0

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

For all n, a(A226061(n+1)) = A232095(n). This works because at the positions given by each x=A226061(n+1), it holds that A219666(x) = (n+1)!-1, which has a factorial base representation (A007623) of (n,n-1,n-2,...,3,2,1) whose digit sum (A034968) is the n-th triangular number, A000217(n). This in turn is always a new record as at those points, in each significant digit position so far employed, a maximal digit value (for factorial number system) is used, and thus the preceding term, A219666(x-1) cannot have any larger digits in its factorial base representation, and so the differences between their digits (in matching positions) are all nonnegative.

Crossrefs

A231718 gives the positions of ones.
Cf. also A230410, A231719, A232095.

Programs

Formula

a(0)=0, and for n>=1, a(n) = A231713(A219666(n),A219666(n-1)).

A231714 Lower triangular region of A231713; A triangular table read by rows: T(n,k) = sum of absolute values of digit differences in the factorial base representations (A007623) of n and k, where (n, k) = (0,0), (1,0), (1,1), (2,0), (2,1), (2,2), ..., n >= 0 and (0 <= k <= n).

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 2, 1, 1, 0, 2, 3, 1, 2, 0, 3, 2, 2, 1, 1, 0, 1, 2, 2, 3, 3, 4, 0, 2, 1, 3, 2, 4, 3, 1, 0, 2, 3, 1, 2, 2, 3, 1, 2, 0, 3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 3, 4, 2, 3, 1, 2, 2, 3, 1, 2, 0, 4, 3, 3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 2, 3, 3, 4, 4, 5, 1, 2, 2, 3, 3, 4, 0, 3, 2, 4, 3, 5, 4, 2, 1, 3, 2, 4, 3, 1, 0, 3, 4, 2, 3, 3, 4, 2, 3, 1, 2, 2, 3, 1, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Examples

			This triangular table begins as:
  0;
  1, 0;
  1, 2, 0;
  2, 1, 1, 0;
  2, 3, 1, 2, 0;
  3, 2, 2, 1, 1, 0;
  1, 2, 2, 3, 3, 4, 0;
  2, 1, 3, 2, 4, 3, 1, 0;
  ...
Please see A231713 for examples how the terms are computed.
		

Crossrefs

The leftmost column: A034968.
This is a lower, or equivalently, an upper triangular subregion of symmetric square array A231713. Cf. A230417.

Programs

  • Scheme
    (define (A231714 n) (A231713bi (A003056 n) (A002262 n)))
    (define (A231713bi x y) (let loop ((x x) (y y) (i 2) (d 0)) (cond ((and (zero? x) (zero? y)) d) (else (loop (floor->exact (/ x i)) (floor->exact (/ y i)) (+ i 1) (+ d (abs (- (modulo x i) (modulo y i)))))))))

Formula

a(n) = A231713(A003056(n),A002262(n)). [As a sequence, this is obtained by taking a subsection from array A231713.]
T(n,0) = A034968(n). [The leftmost column]
Each entry T(n,k) >= A230417(n,k).

A230415 Square array T(i,j) giving the number of differing digits in the factorial base representations of i and j, for i >= 0, j >= 0, read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 2, 2, 2, 2, 1, 1, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 0, 1, 2, 1, 2, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 2, 2, 1, 2, 2, 0, 2, 2, 1, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 1, 2, 2, 1, 2, 2, 0, 2, 2, 1, 2, 2, 1, 2, 2, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 2, 2, 2, 1, 2, 2, 1, 2, 1, 0, 1, 2, 1, 2, 2, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

This table relates to the factorial base representation (A007623) in a somewhat similar way as A101080 relates to the binary system. See A231713 for another analog.

Examples

			The top left corner of this square array begins as:
0, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, ...
1, 0, 2, 1, 2, 1, 2, 1, 3, 2, 3, ...
1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 2, ...
2, 1, 1, 0, 2, 1, 3, 2, 2, 1, 3, ...
1, 2, 1, 2, 0, 1, 2, 3, 2, 3, 1, ...
2, 1, 2, 1, 1, 0, 3, 2, 3, 2, 2, ...
1, 2, 2, 3, 2, 3, 0, 1, 1, 2, 1, ...
2, 1, 3, 2, 3, 2, 1, 0, 2, 1, 2, ...
2, 3, 1, 2, 2, 3, 1, 2, 0, 1, 1, ...
3, 2, 2, 1, 3, 2, 2, 1, 1, 0, 2, ...
2, 3, 2, 3, 1, 2, 1, 2, 1, 2, 0, ...
...
For example, T(1,2) = T(2,1) = 2 as 1 has factorial base representation '...0001' and 2 has factorial base representation '...0010', and they differ by their two least significant digits.
On the other hand, T(3,5) = T(5,3) = 1, as 3 has factorial base representation '...0011' and 5 has factorial base representation '...0021', and they differ only by their second rightmost digit.
Note that as A007623(6)='100' and A007623(10)='120', we have T(6,10) = T(10,6) = 1 (instead of 2 as in A231713, cf. also its Example section), as here we count only the number of differing digit positions, but ignore the magnitudes of their differences.
		

Crossrefs

The topmost row and the leftmost column: A060130.
Only the lower triangular region: A230417. Related arrays: A230419, A231713. Cf. also A101080, A084558, A230410.

Programs

  • Mathematica
    nn = 14; m = 1; While[m! < nn, m++]; m; Table[Function[w, Count[Subtract @@ Map[PadLeft[#, Max@ Map[Length, w]] &, w], k_ /; k != 0]]@ Map[IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, {i - j, j}], {i, 0, nn}, {j, 0, i}] // Flatten (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
  • Scheme
    (define (A230415 n) (A230415bi (A025581 n) (A002262 n)))
    (define (A230415bi x y) (let loop ((x x) (y y) (i 2) (d 0)) (cond ((and (zero? x) (zero? y)) d) (else (loop (floor->exact (/ x i)) (floor->exact (/ y i)) (+ i 1) (+ d (if (= (modulo x i) (modulo y i)) 0 1)))))))

Formula

T(n,0) = T(0,n) = A060130(n).
Each entry T(i,j) <= A231713(i,j).

A230419 Square array A(n,k) = difference of digit sums in factorial base representations (A007623) of n and k, n>=0, k>=0, read by antidiagonals; A(n,k) = A034968(n)-A034968(k).

Original entry on oeis.org

0, 1, -1, 1, 0, -1, 2, 0, 0, -2, 2, 1, 0, -1, -2, 3, 1, 1, -1, -1, -3, 1, 2, 1, 0, -1, -2, -1, 2, 0, 2, 0, 0, -2, 0, -2, 2, 1, 0, 1, 0, -1, 0, -1, -2, 3, 1, 1, -1, 1, -1, 1, -1, -1, -3, 3, 2, 1, 0, -1, 0, 1, 0, -1, -2, -3, 4, 2, 2, 0, 0, -2, 2, 0, 0, -2, -2, -4
Offset: 0

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Comments

Equivalently, A(n,k) = the sum of differences of digits in matching positions of the factorial base representations (A007623) of n and k.

Examples

			The top left corner array is:
   0,  1,  1,  2,  2,  3,  1,  2,  2,  3,  3, ...
  -1,  0,  0,  1,  1,  2,  0,  1,  1,  2,  2, ...
  -1,  0,  0,  1,  1,  2,  0,  1,  1,  2,  2, ...
  -2, -1, -1,  0,  0,  1, -1,  0,  0,  1,  1, ...
  -2, -1, -1,  0,  0,  1, -1,  0,  0,  1,  1, ...
  -3, -2, -2, -1, -1,  0, -2, -1, -1,  0,  0, ...
  -1,  0,  0,  1,  1,  2,  0,  1,  1,  2,  2, ...
  -2, -1, -1,  0,  0,  1, -1,  0,  0,  1,  1, ...
  -2, -1, -1,  0,  0,  1, -1,  0,  0,  1,  1, ...
  -3, -2, -2, -1, -1,  0, -2, -1, -1,  0,  0, ...
  -3, -2, -2, -1, -1,  0, -2, -1, -1,  0,  0, ...
  ...
		

Crossrefs

The topmost row: A034968 (and also the leftmost column negated).
Cf. A230415 (similar array which gives the number of differing digits).
Cf. A231713 (similar array which gives the sum of absolute differences).

Formula

A(col,row) = A034968(col)-A034968(row). [Where col is the column and row the row index of entry A(col,row)]
Equally, as a sequence, a(n) = A034968(A025581(n)) - A034968(A002262(n)).
For each entry, A(j,i) = -A(i,j), or as a sequence, a(A061579(n)) = -a(n). [The array is symmetric up to the sign of entries]
Also, for each entry A(i,j), abs(A(i,j)) <= A231713(i,j).
Showing 1-4 of 4 results.