A249344 A(n,k) = exponent of the largest power of n-th prime which divides k, square array read by antidiagonals.
0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Examples
The top-left corner of the array: 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ... 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, ... 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ... 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ... ... A(1,8) = 3, because 2^3 is the largest power of 2 (= p_1 = A000040(1)) that divides 8. a(2,9) = 2, because 3^2 is the largest power of 3 (= p_2) that divides 9. a(3,15) = 1, because 5^1 is the largest power of 5 (= p_3) that divides 15.
Crossrefs
Programs
-
Mathematica
A[n_, k_] := IntegerExponent[k, Prime[n]]; Table[A[k, n - k + 1], {n, 1, 15}, {k, 1, n}] // Flatten (* Amiram Eldar, Oct 01 2023 *)
-
PARI
a(n, k) = valuation(k, prime(n)); \\ Michel Marcus, Jun 24 2017
-
Python
from sympy import prime def a(n, k): p=prime(n) i=z=0 while p**i<=k: if k%(p**i)==0: z=i i+=1 return z for n in range(1, 10): print([a(k, n - k + 1) for k in range(1, n + 1)]) # Indranil Ghosh, Jun 24 2017
-
Scheme
(define (A249344 n) (A249344bi (A002260 n) (A004736 n))) (define (A249344bi row col) (let ((p (A000040 row))) (let loop ((n col) (i 0)) (cond ((not (zero? (modulo n p))) i) (else (loop (/ n p) (+ i 1)))))))
Formula
Row n, as a sequence, is completely additive with A(n, prime(n)) = 1, A(n, prime(m)) = 0 for m <> n. - Peter Munn, Apr 30 2022
Sum_{k=1..m} A(n,k) ~ (1/(prime(n)-1)) * m. - Amiram Eldar, Oct 01 2023
Comments