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.

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