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.

A286234 Square array A(n,k) = P(A000010(k), floor((n+k-1)/k)), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc. Here P is a two-argument form of sequence A000027 used as a pairing function N x N -> N.

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 3, 3, 2, 7, 10, 3, 3, 2, 11, 3, 10, 3, 5, 4, 16, 21, 3, 10, 3, 5, 4, 22, 10, 21, 3, 10, 5, 5, 7, 29, 21, 10, 21, 3, 10, 5, 8, 7, 37, 10, 21, 10, 21, 3, 14, 5, 8, 11, 46, 55, 10, 21, 10, 21, 3, 14, 5, 8, 11, 56, 10, 55, 10, 21, 10, 21, 5, 14, 8, 12, 16, 67, 78, 10, 55, 10, 21, 10, 21, 5, 14, 8, 12, 16, 79, 21, 78, 10, 55, 10, 21, 10, 27, 5, 14, 8, 12, 22, 92
Offset: 1

Views

Author

Antti Karttunen, May 05 2017

Keywords

Comments

Transpose of A286235.

Examples

			The top left 12 X 12 corner of the array:
   1,  1,  3, 3, 10, 3, 21, 10, 21, 10, 55, 10
   2,  1,  3, 3, 10, 3, 21, 10, 21, 10, 55, 10
   4,  2,  3, 3, 10, 3, 21, 10, 21, 10, 55, 10
   7,  2,  5, 3, 10, 3, 21, 10, 21, 10, 55, 10
  11,  4,  5, 5, 10, 3, 21, 10, 21, 10, 55, 10
  16,  4,  5, 5, 14, 3, 21, 10, 21, 10, 55, 10
  22,  7,  8, 5, 14, 5, 21, 10, 21, 10, 55, 10
  29,  7,  8, 5, 14, 5, 27, 10, 21, 10, 55, 10
  37, 11,  8, 8, 14, 5, 27, 14, 21, 10, 55, 10
  46, 11, 12, 8, 14, 5, 27, 14, 27, 10, 55, 10
  56, 16, 12, 8, 19, 5, 27, 14, 27, 14, 55, 10
  67, 16, 12, 8, 19, 5, 27, 14, 27, 14, 65, 10
The first fifteen rows when viewed as a triangle:
   1
   1  2
   3  1  4
   3  3  2  7
  10  3  3  2 11
   3 10  3  5  4 16
  21  3 10  3  5  4 22
  10 21  3 10  5  5  7 29
  21 10 21  3 10  5  8  7 37
  10 21 10 21  3 14  5  8 11 46
  55 10 21 10 21  3 14  5  8 11 56
  10 55 10 21 10 21  5 14  8 12 16 67
  78 10 55 10 21 10 21  5 14  8 12 16 79
  21 78 10 55 10 21 10 27  5 14  8 12 22 92
  36 21 78 10 55 10 21 10 27  5 19  8 17 22 106
		

Crossrefs

Programs

  • Mathematica
    Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ Reverse@ # &, Table[{EulerPhi@ k, Floor[n/k]}, {n, 14}, {k, n}]] // Flatten (* Michael De Vlieger, May 06 2017 *)
  • Python
    from sympy import totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def t(n, k): return T(totient(k), n//k)
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)][::-1]) # Indranil Ghosh, May 11 2017
  • Scheme
    (define (A286234 n) (A286234bi (A002260 n) (A004736 n)))
    (define (A286234bi row col) (let ((a (A000010 col)) (b (quotient (+ row col -1) col))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2))))
    

A286245 Triangular table T(n,k) = P(A046523(k), floor(n/k)), read by rows as T(1,1), T(2,1), T(2,2), etc. Here P is sequence A000027 used as a pairing function N x N -> N.

Original entry on oeis.org

1, 2, 3, 4, 3, 3, 7, 5, 3, 10, 11, 5, 3, 10, 3, 16, 8, 5, 10, 3, 21, 22, 8, 5, 10, 3, 21, 3, 29, 12, 5, 14, 3, 21, 3, 36, 37, 12, 8, 14, 3, 21, 3, 36, 10, 46, 17, 8, 14, 5, 21, 3, 36, 10, 21, 56, 17, 8, 14, 5, 21, 3, 36, 10, 21, 3, 67, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78, 79, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78, 3
Offset: 1

Views

Author

Antti Karttunen, May 06 2017

Keywords

Comments

Equally: square array A(n,k) = P(A046523(n), floor((n+k-1)/n)), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc. Here P is a two-argument form of sequence A000027 used as a pairing function N x N -> N.

Examples

			The first fifteen rows of triangle:
    1,
    2,  3,
    4,  3,  3,
    7,  5,  3, 10,
   11,  5,  3, 10, 3,
   16,  8,  5, 10, 3, 21,
   22,  8,  5, 10, 3, 21, 3,
   29, 12,  5, 14, 3, 21, 3, 36,
   37, 12,  8, 14, 3, 21, 3, 36, 10,
   46, 17,  8, 14, 5, 21, 3, 36, 10, 21,
   56, 17,  8, 14, 5, 21, 3, 36, 10, 21, 3,
   67, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78,
   79, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78, 3,
   92, 30, 12, 19, 5, 27, 5, 36, 10, 21, 3, 78, 3, 21,
  106, 30, 17, 19, 8, 27, 5, 36, 10, 21, 3, 78, 3, 21, 21
		

Crossrefs

Transpose: A286244.
Cf. A286247 (same triangle but with zeros in positions where k does not divide n), A286235.

Programs

  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def t(n, k): return T(a046523(k), int(n//k))
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286245 n) (A286245bi (A002260 n) (A004736 n)))
    (define (A286245bi row col) (let ((a (A046523 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2))))
    

Formula

As a triangle (with n >= 1, 1 <= k <= n):
T(n,k) = (1/2)*(2 + ((A046523(k)+floor(n/k))^2) - A046523(k) - 3*floor(n/k)).

A286246 Square array A(n,k) = P(A046523(k), (n+k-1)/k) if k divides (n+k-1), 0 otherwise, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc. Here P is a two-argument form of sequence A000027 used as a pairing function N x N -> N.

Original entry on oeis.org

1, 3, 2, 3, 0, 4, 10, 0, 5, 7, 3, 0, 0, 0, 11, 21, 0, 0, 5, 8, 16, 3, 0, 0, 0, 0, 0, 22, 36, 0, 0, 0, 14, 0, 12, 29, 10, 0, 0, 0, 0, 0, 8, 0, 37, 21, 0, 0, 0, 0, 5, 0, 0, 17, 46, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 78, 0, 0, 0, 0, 0, 27, 0, 19, 12, 23, 67, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 21, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 30, 92, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 17, 0, 106
Offset: 1

Views

Author

Antti Karttunen, May 06 2017

Keywords

Examples

			The top left 12 X 12 corner of the array:
   1,  3,  3, 10,  3, 21,  3, 36, 10, 21,  3, 78
   2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
   4,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
   7,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0
  11,  8,  0, 14,  0,  0,  0,  0,  0,  0,  0,  0
  16,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0
  22, 12,  8,  0,  0, 27,  0,  0,  0,  0,  0,  0
  29,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0
  37, 17,  0, 19,  0,  0,  0, 44,  0,  0,  0,  0
  46,  0, 12,  0,  0,  0,  0,  0, 14,  0,  0,  0
  56, 23,  0,  0,  8,  0,  0,  0,  0, 27,  0,  0
  67,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0
The first fifteen rows of triangle:
   1,
   3, 2,
   3, 0, 4,
  10, 0, 5, 7,
   3, 0, 0, 0, 11,
  21, 0, 0, 5,  8, 16,
   3, 0, 0, 0,  0,  0, 22,
  36, 0, 0, 0, 14,  0, 12, 29,
  10, 0, 0, 0,  0,  0,  8,  0, 37,
  21, 0, 0, 0,  0,  5,  0,  0, 17, 46,
   3, 0, 0, 0,  0,  0,  0,  0,  0,  0, 56,
  78, 0, 0, 0,  0,  0, 27,  0, 19, 12, 23, 67,
   3, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, 79,
  21, 0, 0, 0,  0,  0,  0,  5,  0,  0,  0,  0, 30, 92,
  21, 0, 0, 0,  0,  0,  0,  0,  0,  0,  8,  0, 17,  0, 106
		

Crossrefs

Programs

  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k): return 0 if (n + k - 1)%k!=0 else T(a046523(k), (n + k - 1)//k)
    for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286246 n) (A286246bi (A002260 n) (A004736 n)))
    (define (A286246bi row col) (if (not (zero? (modulo (+ row col -1) col))) 0 (let ((a (A046523 col)) (b (/ (+ row col -1) col))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    ;; Alternatively, with triangular indexing:
    (define (A286246 n) (A286246tr (A002024 n) (A002260 n)))
    (define (A286246tr n k) (A286246bi k (+ 1 (- n k))))
    

Formula

T(n,k) = A113998(n,k) * A286244(n,k).
Showing 1-3 of 3 results.