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 12 results. Next

A286158 Lower triangular region of array A286156.

Original entry on oeis.org

1, 3, 1, 6, 4, 1, 10, 3, 4, 1, 15, 7, 8, 4, 1, 21, 6, 3, 8, 4, 1, 28, 11, 7, 13, 8, 4, 1, 36, 10, 12, 3, 13, 8, 4, 1, 45, 16, 6, 7, 19, 13, 8, 4, 1, 55, 15, 11, 12, 3, 19, 13, 8, 4, 1, 66, 22, 17, 18, 7, 26, 19, 13, 8, 4, 1, 78, 21, 10, 6, 12, 3, 26, 19, 13, 8, 4, 1, 91, 29, 16, 11, 18, 7, 34, 26, 19, 13, 8, 4, 1, 105, 28, 23, 17, 25, 12, 3, 34, 26, 19, 13, 8, 4, 1
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Examples

			The first ten rows of this triangular array:
   1,
   3,  1,
   6,  4,  1,
  10,  3,  4,  1,
  15,  7,  8,  4,  1,
  21,  6,  3,  8,  4,  1,
  28, 11,  7, 13,  8,  4,  1,
  36, 10, 12,  3, 13,  8,  4,  1,
  45, 16,  6,  7, 19, 13,  8,  4,  1,
  55, 15, 11, 12,  3, 19, 13,  8,  4,  1.
		

Crossrefs

Transpose: A286159.
Cf. A000217 (left edge), A000012 (right edge).
Cf. A286156.

Programs

  • Mathematica
    Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Reverse@ QuotientRemainder[n, k], {n, 14}, {k, n, 1, -1}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def a(n, k): return T(n%k, n//k)
    for n in range(1, 21): print([a(n, k) for k in range(1, n + 1)])  # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286158 n) (A286156bi (A002024 n) (A002260 n))) ;; For A286156bi see A286156.
    

Formula

A(n,k) = A286158(n,k) listed for n >= 1, k = 1 .. n.

A286159 Lower triangular region of array A286156, transposed.

Original entry on oeis.org

1, 1, 3, 1, 4, 6, 1, 4, 3, 10, 1, 4, 8, 7, 15, 1, 4, 8, 3, 6, 21, 1, 4, 8, 13, 7, 11, 28, 1, 4, 8, 13, 3, 12, 10, 36, 1, 4, 8, 13, 19, 7, 6, 16, 45, 1, 4, 8, 13, 19, 3, 12, 11, 15, 55, 1, 4, 8, 13, 19, 26, 7, 18, 17, 22, 66, 1, 4, 8, 13, 19, 26, 3, 12, 6, 10, 21, 78, 1, 4, 8, 13, 19, 26, 34, 7, 18, 11, 16, 29, 91, 1, 4, 8, 13, 19, 26, 34, 3, 12, 25, 17, 23, 28, 105
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Examples

			The first ten rows of this triangular array:
  1,
  1, 3,
  1, 4, 6,
  1, 4, 3, 10,
  1, 4, 8,  7, 15,
  1, 4, 8,  3,  6, 21,
  1, 4, 8, 13,  7, 11, 28,
  1, 4, 8, 13,  3, 12, 10, 36,
  1, 4, 8, 13, 19,  7,  6, 16, 45,
  1, 4, 8, 13, 19,  3, 12, 11, 15, 55
		

Crossrefs

Transpose: A268158.
Rows converge towards A034856.

Programs

  • Mathematica
    Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Reverse@ QuotientRemainder[n, k], {n, 14}, {k, n}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def a(n, k): return T(n%k, n//k)
    for n in range(1, 21): print([a(n , k) for k in range(1, n + 1)][::-1])  # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286159 n) (A286156bi (A002024 n) (A004736 n))) ;; For A286156bi see A286156.
    

A286157 Transpose of square array A286156.

Original entry on oeis.org

1, 3, 2, 6, 1, 2, 10, 4, 5, 2, 15, 3, 1, 5, 2, 21, 7, 4, 9, 5, 2, 28, 6, 8, 1, 9, 5, 2, 36, 11, 3, 4, 14, 9, 5, 2, 45, 10, 7, 8, 1, 14, 9, 5, 2, 55, 16, 12, 13, 4, 20, 14, 9, 5, 2, 66, 15, 6, 3, 8, 1, 20, 14, 9, 5, 2, 78, 22, 11, 7, 13, 4, 27, 20, 14, 9, 5, 2, 91, 21, 17, 12, 19, 8, 1, 27, 20, 14, 9, 5, 2, 105, 29, 10, 18, 3, 13, 4, 35, 27, 20, 14, 9, 5, 2
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Comments

See A286156.

Examples

			The top left 15 X 15 corner of the array:
  1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78,  91, 105, 120
  2, 1, 4,  3,  7,  6, 11, 10, 16, 15, 22, 21,  29,  28,  37
  2, 5, 1,  4,  8,  3,  7, 12,  6, 11, 17, 10,  16,  23,  15
  2, 5, 9,  1,  4,  8, 13,  3,  7, 12, 18,  6,  11,  17,  24
  2, 5, 9, 14,  1,  4,  8, 13, 19,  3,  7, 12,  18,  25,   6
  2, 5, 9, 14, 20,  1,  4,  8, 13, 19, 26,  3,   7,  12,  18
  2, 5, 9, 14, 20, 27,  1,  4,  8, 13, 19, 26,  34,   3,   7
  2, 5, 9, 14, 20, 27, 35,  1,  4,  8, 13, 19,  26,  34,  43
  2, 5, 9, 14, 20, 27, 35, 44,  1,  4,  8, 13,  19,  26,  34
  2, 5, 9, 14, 20, 27, 35, 44, 54,  1,  4,  8,  13,  19,  26
  2, 5, 9, 14, 20, 27, 35, 44, 54, 65,  1,  4,   8,  13,  19
  2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77,  1,   4,   8,  13
  2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90,   1,   4,   8
  2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104,   1,   4
  2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119,   1
		

Crossrefs

Transpose: A286156.

Programs

  • Mathematica
    Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Function[m, Reverse@ QuotientRemainder[m, k]][n - k + 1], {n, 14}, {k, n, 1, -1}]] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(a, b): return ((a + b)**2 + 3*a + b)//2
    def A(n, k): return T(n%k, int(n//k))
    for n in range(1, 21): print([A(n - k + 1, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286157 n) (A286156bi (A004736 n) (A002260 n))) ;; For A286156bi see A286156.
    

Formula

A(n,k) = A286156(k,n).

A286561 Square array A(n,k): A(n,1) = 1, and for k > 1, A(n,k) = the highest exponent e such that k^e divides n, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2017

Keywords

Examples

			The top left 18 X 18 corner of the array:
  n \k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18
     .-----------------------------------------------------
   1 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   2 | 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   3 | 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   4 | 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   5 | 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   6 | 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   7 | 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   8 | 1, 3, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
   9 | 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
  10 | 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
  11 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
  12 | 1, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
  13 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
  14 | 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
  15 | 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
  16 | 1, 4, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0
  17 | 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
  18 | 1, 1, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
  ---------------------------------------------------------
A(18,2) = 1, because 2^1 divides 18, but 2^2 does not. A(18,3) = 2, because 3^2 divides 18 (but 3^3 does not). A(18,4) = 0, because 4^0 (= 1) divides 18, but 4^1 does not. A(18,18) = 1, because 18^1 divides 18, but 18^2 does not.
A(2,18) = 0, because 18^0 divides 2, but 18^1 does not.
		

Crossrefs

Cf. A286562 (transpose), A286563 (lower triangular region), A286564 (lower triangular region reversed).
Cf. A169594 (row sums), also A168512, A178638, A186643.
Cf. also array A286156.

Programs

  • Mathematica
    Table[Function[m, If[k == 1, 1, IntegerExponent[m, k]]][n - k + 1], {n, 15}, {k, n}] // TableForm (* Michael De Vlieger, May 20 2017 *)
  • PARI
    A286561(n,k) = if(1==k, 1, valuation(n, k)); \\ Antti Karttunen, May 27 2017
    
  • Python
    def a(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286561 n) (A286561bi (A002260 n) (A004736 n)))
    (define (A286561bi row col) (if (= 1 col) 1 (let loop ((i 1)) (if (not (zero? (modulo row (expt col i)))) (- i 1) (loop (+ 1 i))))))
    

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))))
    

A286235 Triangular table T(n,k) = P(phi(k), floor(n/k)), where P is sequence A000027 used as a pairing function N x N -> N, and phi is Euler totient function, A000010. Table is read by rows as T(1,1), T(2,1), T(2,2), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 05 2017

Keywords

Comments

Equally: square array A(n,k) = P(A000010(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 the triangle:
    1,
    2,  1,
    4,  1,  3,
    7,  2,  3, 3,
   11,  2,  3, 3, 10,
   16,  4,  5, 3, 10, 3,
   22,  4,  5, 3, 10, 3, 21,
   29,  7,  5, 5, 10, 3, 21, 10,
   37,  7,  8, 5, 10, 3, 21, 10, 21,
   46, 11,  8, 5, 14, 3, 21, 10, 21, 10,
   56, 11,  8, 5, 14, 3, 21, 10, 21, 10, 55,
   67, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10,
   79, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10, 78,
   92, 22, 12, 8, 14, 5, 27, 10, 21, 10, 55, 10, 78, 21,
  106, 22, 17, 8, 19, 5, 27, 10, 21, 10, 55, 10, 78, 21, 36
		

Crossrefs

Transpose: A286234.
Cf. A286237 (same triangle but with zeros in positions where k does not divide n).

Programs

  • Mathematica
    Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ # &, 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), int(n//k))
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 11 2017
  • Scheme
    (define (A286235 n) (A286235bi (A002260 n) (A004736 n)))
    (define (A286235bi row col) (let ((a (A000010 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 + ((A000010(k)+floor(n/k))^2) - A000010(k) - 3*floor(n/k)).

A286236 Square array A(n,k) = P(A000010(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, 1, 2, 3, 0, 4, 3, 0, 2, 7, 10, 0, 0, 0, 11, 3, 0, 0, 5, 4, 16, 21, 0, 0, 0, 0, 0, 22, 10, 0, 0, 0, 5, 0, 7, 29, 21, 0, 0, 0, 0, 0, 8, 0, 37, 10, 0, 0, 0, 0, 14, 0, 0, 11, 46, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10, 0, 0, 0, 0, 0, 5, 0, 8, 12, 16, 67, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 21, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 22, 92, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 17, 0, 106
Offset: 1

Views

Author

Antti Karttunen, May 05 2017

Keywords

Comments

This is transpose of A286237, see comments there.

Examples

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

Crossrefs

Programs

  • Mathematica
    T[n_, m_] := ((n + m)^2 - n - 3*m + 2)/2
    t[n_, k_] := If[Mod[n, k] != 0, 0, T[EulerPhi[k], n/k]]
    Table[Reverse[t[n, #] & /@ Range[n]], {n, 1, 20}] (* David Radcliffe, Jun 12 2025 *)
  • Python
    from sympy import totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def t(n, k): return 0 if n%k!=0 else 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 10 2017
  • Scheme
    (define (A286236 n) (A286236bi (A002260 n) (A004736 n)))
    (define (A286236bi row col) (if (not (zero? (modulo (+ row col -1) col))) 0 (let ((a (A000010 col)) (b (/ (+ row col -1) col))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    ;; Alternatively, with triangular indexing:
    (define (A286236 n) (A286236tr (A002024 n) (A002260 n)))
    (define (A286236tr n k) (A286236bi k (+ 1 (- n k))))
    

Formula

T(n,k) = A113998(n,k) * A286234(n,k).

A286239 Triangular table: T(n,k) = 0 if k does not divide n, otherwise T(n,k) = P(A000010(n/k), k), where P is sequence A000027 used as a pairing function N x N -> N. Table is read by rows as T(1,1), T(2,1), T(2,2), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 06 2017

Keywords

Comments

This sequence packs the values of phi(n/k) and k (whenever k divides n) to a single value, with the pairing function A000027. The two "components" can be accessed with functions A002260 & A004736, which allows us generate from this sequence various sums related to necklace enumeration (among other things).
For example, we have:
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * A002260(a(i)) * 2^(A004736(a(i))) = A053635(n).
and
Sum_{i=A000217(n-1) .. A000217(n)} [a(i) > 0] * A002260(a(i)) * 3^(A004736(a(i))) = A054610(n)
Triangle A286237 has the same property.

Examples

			The first fifteen rows of triangle:
   1,
   1,  2,
   3,  0,  4,
   3,  2,  0,  7,
  10,  0,  0,  0, 11,
   3,  5,  4,  0,  0, 16,
  21,  0,  0,  0,  0,  0, 22,
  10,  5,  0,  7,  0,  0,  0, 29,
  21,  0,  8,  0,  0,  0,  0,  0, 37,
  10, 14,  0,  0, 11,  0,  0,  0,  0, 46,
  55,  0,  0,  0,  0,  0,  0,  0,  0,  0, 56,
  10,  5,  8, 12,  0, 16,  0,  0,  0,  0,  0, 67,
  78,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 79,
  21, 27,  0,  0,  0,  0, 22,  0,  0,  0,  0,  0,  0, 92,
  36,  0, 19,  0, 17,  0,  0,  0,  0,  0,  0,  0,  0,  0, 106
   -------------------------------------------------------------
Note how triangle A286237 contains on each row the same numbers in the same "divisibility-allotted" positions, but in reverse order.
		

Crossrefs

Transpose: A286238.
Cf. A000124 (the right edge of the triangle).

Programs

  • Python
    from sympy import totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def t(n, k): return 0 if n%k!=0 else T(totient(n//k), 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 (A286239 n) (A286239tr (A002024 n) (A002260 n)))
    (define (A286239tr n k) (if (not (zero? (modulo n k))) 0 (let ((a (A000010 (/ n k))) (b k)) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
    

Formula

As a triangle (with n >= 1, 1 <= k <= n):
T(n,k) = 0 if k does not divide n, otherwise T(n,k) = (1/2)*(2 + ((A000010(n/k)+k)^2) - A000010(n/k) - 3*k).

A286244 Square array A(n,k) = P(A046523(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, 3, 2, 3, 3, 4, 10, 3, 5, 7, 3, 10, 3, 5, 11, 21, 3, 10, 5, 8, 16, 3, 21, 3, 10, 5, 8, 22, 36, 3, 21, 3, 14, 5, 12, 29, 10, 36, 3, 21, 3, 14, 8, 12, 37, 21, 10, 36, 3, 21, 5, 14, 8, 17, 46, 3, 21, 10, 36, 3, 21, 5, 14, 8, 17, 56, 78, 3, 21, 10, 36, 3, 27, 5, 19, 12, 23, 67, 3, 78, 3, 21, 10, 36, 3, 27, 5, 19, 12, 23, 79
Offset: 1

Views

Author

Antti Karttunen, May 06 2017

Keywords

Comments

Transpose of A286245.

Examples

			The top left 12 X 12 corner of the array:
   1,  3,  3, 10, 3, 21, 3, 36, 10, 21, 3, 78
   2,  3,  3, 10, 3, 21, 3, 36, 10, 21, 3, 78
   4,  5,  3, 10, 3, 21, 3, 36, 10, 21, 3, 78
   7,  5,  5, 10, 3, 21, 3, 36, 10, 21, 3, 78
  11,  8,  5, 14, 3, 21, 3, 36, 10, 21, 3, 78
  16,  8,  5, 14, 5, 21, 3, 36, 10, 21, 3, 78
  22, 12,  8, 14, 5, 27, 3, 36, 10, 21, 3, 78
  29, 12,  8, 14, 5, 27, 5, 36, 10, 21, 3, 78
  37, 17,  8, 19, 5, 27, 5, 44, 10, 21, 3, 78
  46, 17, 12, 19, 5, 27, 5, 44, 14, 21, 3, 78
  56, 23, 12, 19, 8, 27, 5, 44, 14, 27, 3, 78
  67, 23, 12, 19, 8, 27, 5, 44, 14, 27, 5, 78
The first fifteen rows when viewed as a triangle:
   1,
   3,  2,
   3,  3,  4,
  10,  3,  5,  7,
   3, 10,  3,  5, 11,
  21,  3, 10,  5,  8, 16,
   3, 21,  3, 10,  5,  8, 22,
  36,  3, 21,  3, 14,  5, 12, 29,
  10, 36,  3, 21,  3, 14,  8, 12, 37,
  21, 10, 36,  3, 21,  5, 14,  8, 17, 46,
   3, 21, 10, 36,  3, 21,  5, 14,  8, 17, 56,
  78,  3, 21, 10, 36,  3, 27,  5, 19, 12, 23, 67,
   3, 78,  3, 21, 10, 36,  3, 27,  5, 19, 12, 23, 79,
  21,  3, 78,  3, 21, 10, 36,  5, 27,  5, 19, 12, 30, 92,
  21, 21,  3, 78,  3, 21, 10, 36,  5, 27,  8, 19, 17, 30, 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 T(a046523(k), int((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 (A286244 n) (A286244bi (A002260 n) (A004736 n)))
    (define (A286244bi row col) (let ((a (A046523 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)).
Showing 1-10 of 12 results. Next