OFFSET
2,6
LINKS
Alois P. Heinz, Antidiagonals n = 2..142, flattened
FORMULA
For k=p prime: T(n,p) = [n/p] + [n/p^2] + [n/p^3] + .... For k = p^m a prime power: T(n,p^m) = [T(n,p)/m]. For k = b*c with b and c coprime: T(n,a*b) = min(T(n,a), T(n,b)). T(n,k) is close to, but below, n/A090624(k).
EXAMPLE
Square array starts:
1, 0, 0, 0, 0, 0, 0, ...
1, 1, 0, 0, 1, 0, 0, ...
3, 1, 1, 0, 1, 0, 1, ...
3, 1, 1, 1, 1, 0, 1, ...
4, 2, 2, 1, 2, 0, 1, ...
4, 2, 2, 1, 2, 1, 1, ...
7, 2, 3, 1, 2, 1, 2, ...
MAPLE
f:= proc(n, p) local c, k; c, k:= 0, p;
while n>=k do c:= c+iquo(n, k); k:= k*p od; c
end:
T:= (n, k)-> min(seq(iquo(f(n, i[1]), i[2]), i=ifactors(k)[2])):
seq(seq(T(n, 2+d-n), n=2..d), d=2..20); # Alois P. Heinz, Oct 04 2012
MATHEMATICA
f[n_, p_] := Module[{c = 0, k = p}, While[n >= k , c = c + Quotient[n, k]; k = k*p ]; c ]; t[n_, k_] := Min[ Table[ Quotient[f[n, i[[1]]], i[[2]]], {i, FactorInteger[k]}]]; Table[ Table[t[n, 2 + d - n], {n, 2, d}], {d, 2, 20}] // Flatten (* Jean-François Alcover, Oct 03 2013, translated from Alois P. Heinz's Maple program *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Henry Bottomley, Dec 06 2003
STATUS
approved