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.

Previous Showing 11-13 of 13 results.

A110570 Triangle read by rows: T(n,0) = T(n,n) = 1 and for 0

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 28 2005

Keywords

Comments

T(n,k) = T(n,n-k);
row sums give A110571;
T(n,2) = A030451(n) for n>1;
T(n,k)=(1-0^A004197(n,k))*T(n-A004197(n,k),A004197(n,k))+1.

Examples

			. . . . . . . . . . 1 . . . . . . . . . . . .
. . . . . . . . . 1 . 1 . . . . . . . . . . .
. . . . . . . . 1 . x . 1 . . . . B = 1 + A .
. . . . . . . 1 . x . x . 1 . . . . . . . . .
. . . . . . 1 . x . x . x . 1 . . F = E + 1 .
. . . . . 1 . x . E . - . - . 1 . . . . . . .
. . . . 1 . x . x . \ . x . / . 1 . . . . . .
. . . 1 . x . x . x . \ . / . x . 1 . . . . .
. . 1 . - . A . x . x . F . x . x . 1 . . . .
. 1 . \ . / . x . x . x . x . x . x . 1 . . .
1 . x . B . x . x . x . x . x . x . x . 1 . .
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = If[Min[k, n - k] == 0, 1, 1 + T[n - Min[k, n - k], Min[k, n - k]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Aug 31 2017 *)

Formula

T(n, k) = if s=0 then 1 else T(n-s, s)+1, where s=Min{k, n-k}.

A238392 Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 4, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 4, 6, 4, 2, 1, 1, 2, 4, 6, 6, 4, 2, 1, 1, 2, 4, 6, 10, 6, 4, 2, 1, 1, 2, 4, 6, 10, 10, 6, 4, 2, 1, 1, 2, 4, 6, 10, 14, 10, 6, 4, 2, 1, 1, 2, 4, 6, 10, 14, 14, 10, 6, 4, 2, 1, 1, 2, 4, 6, 10, 14, 20, 14, 10, 6, 4, 2, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 26 2014

Keywords

Comments

Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.

Examples

			Triangle begins:
  1;
  1, 1;
  1, 2, 1;
  1, 2, 2, 1;
  1, 2, 4, 2,  1;
  1, 2, 4, 4,  2,  1;
  1, 2, 4, 6,  4,  2,  1;
  1, 2, 4, 6,  6,  4,  2,  1;
  1, 2, 4, 6, 10,  6,  4,  2,  1;
  1, 2, 4, 6, 10, 10,  6,  4,  2,  1;
  1, 2, 4, 6, 10, 14, 10,  6,  4,  2, 1;
  1, 2, 4, 6, 10, 14, 14, 10,  6,  4, 2, 1;
  1, 2, 4, 6, 10, 14, 20, 14, 10,  6, 4, 2, 1;
  1, 2, 4, 6, 10, 14, 20, 20, 14, 10, 6, 4, 2, 1;
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n==0,  1, a[n - 1] + a[Floor[n/2]]]; Flatten[Table[a[Min[k, n - k]], {n, 0, 13}, {k, 0, n}]] (* Indranil Ghosh, Mar 14 2017 *)
  • PARI
    a(n) = if(n==0, 1, a(n-1) + a(floor(n/2)));
    tabl(nn) = {for(n=0, nn, for(k=0, n, print1(a(min(k, n - k)),", ");); print(););};
    tabl(13); \\ Indranil Ghosh, Mar 14 2017
    
  • Python
    def a(n): return 1 if n==0 else a(n - 1) + a(n//2)
    i=0
    for n in range(0, 126):
        for k in range(0, n+1):
            print(str(i)+" "+str(a(min(k, n - k))))
            i+=1 # Indranil Ghosh, Mar 14 2017

Formula

T(n,k) = A000123(min(k,n-k)).
Sum_{k=0..n} T(n,k) = A000123(n).
T(2*n,n) = A000123(n).

A342955 Array T(n,k), n, k >= 0, read by antidiagonals; the i-th decimal digit of T(n, k) is the smallest of the i-th digits of n and of k.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 03 2021

Keywords

Comments

This sequence has similarities with lunar addition (A087061); here we take the smallest, there the largest digits. It is "lunar multiplication" of corresponding digits.
The bitwise AND operator (A004198) is the binary analog.

Examples

			Array T(n, k) begins:
  n\k|  0  1  2  3  4  5  6  7  8  9  10  11  12  13
  ---+----------------------------------------------
    0|  0  0  0  0  0  0  0  0  0  0   0   0   0   0
    1|  0  1  1  1  1  1  1  1  1  1   0   1   1   1
    2|  0  1  2  2  2  2  2  2  2  2   0   1   2   2
    3|  0  1  2  3  3  3  3  3  3  3   0   1   2   3
    4|  0  1  2  3  4  4  4  4  4  4   0   1   2   3
    5|  0  1  2  3  4  5  5  5  5  5   0   1   2   3
    6|  0  1  2  3  4  5  6  6  6  6   0   1   2   3
    7|  0  1  2  3  4  5  6  7  7  7   0   1   2   3
    8|  0  1  2  3  4  5  6  7  8  8   0   1   2   3
    9|  0  1  2  3  4  5  6  7  8  9   0   1   2   3
   10|  0  0  0  0  0  0  0  0  0  0  10  10  10  10
   11|  0  1  1  1  1  1  1  1  1  1  10  11  11  11
   12|  0  1  2  2  2  2  2  2  2  2  10  11  12  12
   13|  0  1  2  3  3  3  3  3  3  3  10  11  12  13
		

Crossrefs

Cf. A004197 (numerical minimum), A004198 (bitwise minimum), A087061 (digit-wise maximum).

Programs

  • PARI
    T(n,k,base=10) = if (n==0 || k==0, 0, T(n\base,k\base)*base + min(n%base, k%base))

Formula

T(n, k) = T(k, n).
T(m, T(n, k)) = T(T(m, n), k).
T(n, n) = n.
T(n, 0) = 0.
T(n, k) + A087061(n, k) = n + k.
Previous Showing 11-13 of 13 results.