OFFSET
1,1
COMMENTS
The greatest prime factor (see A006530) of 1 is 1 by convention. The definitions for m[i, j] where j >= i and j <= i give no contradiction for j = i.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10011 (first 142 rows flattened.)
FORMULA
for n > 1, m[n, n] = A014085(n).
EXAMPLE
Let i = 2 and sqrtint(n) = the square root of n rounded down to an integer. The integers c such that i^2 = 2^2 <= c < 3^2 = (i+1)^2 are 4, 5, 6, 7 and 8. The greatest prime factors h of these terms are 2, 5, 3, 7 and 2 respectively. sqrtint(h) are 1, 2, 1, 2 and 1 respectively. 1 occurs thrice here, 2 occurs twice, giving m[2, 1] = 3 and m[2, 2] = 2.
m[1, 2] = 7 because the prime factorizations of 4, 5, 6, 7 and 8 are 2^2, 5, 2*3, 7, 2^3. The prime 2 occurs 6 times and sqrtint(2) = 1. The prime factor 3 occurs once and sqrtint(3) = 1. Therefore m[1, 2] = 6 + 1 = 7. p = 5 and p = 7 each occur once and each have sqrtint(p) = 2. Therefore m[2, 2] = 2 as found earlier.
The first block of m of 10 by 10 is:
[3 7 8 15 15 21 19 27 29 31]
[3 2 3 2 6 3 8 7 7 9]
[2 3 2 1 2 2 2 4 3 3]
[3 2 1 3 1 2 2 3 3 4]
[2 4 2 1 2 0 2 0 2 1]
[2 3 2 2 0 4 0 1 3 1]
[1 5 2 2 2 0 3 0 0 2]
[2 3 4 3 0 1 0 4 0 0]
[2 3 3 3 2 3 0 0 3 0]
[1 4 3 4 1 1 2 0 0 5]
PROG
(PARI) squaremat(n) = {my(m=matrix(n, n)); m[1, 1] = 3; for(i=2, n, for(c = i^2, (i+1)^2-1, f=factor(c); for(j=1, matsize(f)[1], m[sqrtint(f[j, 1]), i] += f[j, 2]); m[i, sqrtint(f[matsize(f)[1], 1])]++)); for(i=2, n, m[i, i] = m[i, i] >> 1); m}
\\ Diagonals m[i, j] where i + j <= n.
upto(n) = {my(v=vector(binomial(n+1, 2)), m = squaremat(n), t = 0); for(i=1, n, for(j=0, i-1, t++; v[t] = m[j+1, i-j])); v}
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
David A. Corneth, May 02 2017 and May 17 2017
STATUS
approved