login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249344 A(n,k) = exponent of the largest power of n-th prime which divides k, square array read by antidiagonals. 7

%I #34 Oct 01 2023 02:41:46

%S 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,

%T 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,

%U 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

%N A(n,k) = exponent of the largest power of n-th prime which divides k, square array read by antidiagonals.

%C Square array A(n,k), where n = row, k = column, read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ... (transpose of array A060175).

%C A(n,k) is the (p_n)-adic valuation of k, where p_n is the n-th prime, A000040(n).

%C Each row is effectively a ruler function, s, with s(1) = 0. - _Peter Munn_, Apr 30 2022

%F 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

%F Sum_{k=1..m} A(n,k) ~ (1/(prime(n)-1) * m. - _Amiram Eldar_, Oct 01 2023

%e The top-left corner of the array:

%e 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ...

%e 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, ...

%e 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ...

%e 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, ...

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, ...

%e 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ...

%e ...

%e A(1,8) = 3, because 2^3 is the largest power of 2 (= p_1 = A000040(1)) that divides 8.

%e a(2,9) = 2, because 3^2 is the largest power of 3 (= p_2) that divides 9.

%e a(3,15) = 1, because 5^1 is the largest power of 5 (= p_3) that divides 15.

%t 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 *)

%o (Scheme)

%o (define (A249344 n) (A249344bi (A002260 n) (A004736 n)))

%o (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)))))))

%o (Python)

%o from sympy import prime

%o def a(n, k):

%o p=prime(n)

%o i=z=0

%o while p**i<=k:

%o if k%(p**i)==0: z=i

%o i+=1

%o return z

%o for n in range(1, 10): print([a(k, n - k + 1) for k in range(1, n + 1)]) # _Indranil Ghosh_, Jun 24 2017

%o (PARI) a(n, k) = valuation(k, prime(n)); \\ _Michel Marcus_, Jun 24 2017

%Y Transpose: A060175.

%Y Row 1: A007814.

%Y Row 2: A007949.

%Y Row 3: A112765.

%Y Row 4: A214411.

%Y Cf. also A000040, A002260, A004736, A085604, A090622, A115627, A249421.

%Y Completely additive sequences where more than one prime is mapped to 1, all other primes to 0: A065339, A083025, A087436, A169611.

%Y Ruler functions, s, with s(1) = 0 that are not rows here: A122840, A122841, A235127, A244413.

%K nonn,tabl,easy

%O 1,7

%A _Antti Karttunen_, Oct 28 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 15:13 EDT 2024. Contains 374923 sequences. (Running on oeis4.)