cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A060175 Square array A(n,k) = exponent of the largest power of k-th prime which divides n, read by falling antidiagonals.

This page as a plain text file.
%I A060175 #44 Jan 16 2025 11:30:56
%S A060175 0,0,1,0,0,0,0,0,1,2,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,
%T A060175 0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
%U A060175 0,0,0,0,0,0,0,1,0,2,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,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
%N A060175 Square array A(n,k) = exponent of the largest power of k-th prime which divides n, read by falling antidiagonals.
%H A060175 Antti Karttunen, <a href="/A060175/b060175.txt">Table of n, a(n) for n = 1..22155; the first 210 antidiagonals</a>
%F A060175 A(n, k) = log(A060176(n, k))/log(A000040(k)) = k-th digit from right of A054841(n).
%e A060175 a(12,1) = 2 since 4 = 2^2 = p_1^2 divides 12 but 8 = 2^3 does not.
%e A060175 a(12,2) = 1 since 3 = p_2 divides 12 but 9 = 3^2 does not.
%e A060175 See also examples in A249344, which is transpose of this array.
%e A060175 The top-left corner of the array:
%e A060175 n\k | 1  2  3  4  5  6  7  8
%e A060175 ----+------------------------
%e A060175 1   | 0, 0, 0, 0, 0, 0, 0, 0,
%e A060175 2   | 1, 0, 0, 0, 0, 0, 0, 0,
%e A060175 3   | 0, 1, 0, 0, 0, 0, 0, 0,
%e A060175 4   | 2, 0, 0, 0, 0, 0, 0, 0,
%e A060175 5   | 0, 0, 1, 0, 0, 0, 0, 0,
%e A060175 6   | 1, 1, 0, 0, 0, 0, 0, 0,
%e A060175 7   | 0, 0, 0, 1, 0, 0, 0, 0,
%e A060175 8   | 3, 0, 0, 0, 0, 0, 0, 0,
%e A060175 9   | 0, 2, 0, 0, 0, 0, 0, 0,
%e A060175 10  | 1, 0, 1, 0, 0, 0, 0, 0,
%e A060175 11  | 0, 0, 0, 0, 1, 0, 0, 0,
%e A060175 12  | 2, 1, 0, 0, 0, 0, 0, 0,
%e A060175 ...
%t A060175 T[n_, k_] := IntegerExponent[n, Prime[k]];
%t A060175 Table[T[n-k+1, k], {n, 1, 15}, {k, n, 1, -1}] // Flatten (* _Jean-François Alcover_, Nov 18 2019 *)
%o A060175 (Scheme)
%o A060175 (define (A060175 n) (A249344bi (A004736 n) (A002260 n)))
%o A060175 (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 A060175 ;; _Antti Karttunen_, Oct 28 2014
%o A060175 (Python)
%o A060175 from sympy import prime
%o A060175 def a(n, k):
%o A060175     p=prime(n)
%o A060175     i=z=0
%o A060175     while p**i<=k:
%o A060175         if k%(p**i)==0: z=i
%o A060175         i+=1
%o A060175     return z
%o A060175 for n in range(1, 10): print([a(n - k + 1, k) for k in range(1, n + 1)]) # _Indranil Ghosh_, Jun 24 2017
%o A060175 (PARI) a(n, k) = valuation(n, prime(k)); \\ _Michel Marcus_, Jun 24 2017
%Y A060175 Transpose: A249344.
%Y A060175 Column 1: A007814.
%Y A060175 Column 2: A007949.
%Y A060175 Column 3: A112765.
%Y A060175 Column 4: A214411.
%Y A060175 Row sums: A001222.
%Y A060175 Cf. also A002260, A004736, A054841, A060176, A085604, A090622, A115627, A249421, A249422.
%K A060175 easy,nonn,tabl
%O A060175 1,10
%A A060175 _Henry Bottomley_, Mar 14 2001
%E A060175 Erroneous example corrected and more terms computed by _Antti Karttunen_, Oct 28 2014
%E A060175 Name clarified by _Antti Karttunen_, Jan 16 2025