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, 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.
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 *)
PROG
(Scheme)
(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))))))
(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
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 20 2017
STATUS
approved