OFFSET
1,7
COMMENTS
T(n,k) = number of occurrences of prime(k) as factor in numbers <= n (with repetitions);
Sum{T(n,k): 1<=k<=n} = A022559(n);
LINKS
Reinhard Zumkeller, Rows n = 1..125 of triangle, flattened
EXAMPLE
0;
1,0;
1,1,0;
3,1,0,0;
3,1,1,0,0;
4,2,1,0,0,0;
4,2,1,1,0,0,0;
7,2,1,1,0,0,0,0;
7,4,1,1,0,0,0,0,0;
8,4,2,1,0,0,0,0,0,0;
MATHEMATICA
T[n_, k_] := Module[{p = Prime[k], jm}, jm = Floor[Log[p, n]]; Sum[Quotient[n, p^j], {j, 1, jm}]];
Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 19 2021 *)
PROG
(Haskell)
a085604 n k = a085604_tabl !! (n-2) !! (k-1)
a085604_row 1 = [0]
a085604_row n = a115627_row n ++ (take $ a062298 $ fromIntegral n) [0, 0..]
a085604_tabl = map a085604_row [1..]
-- Reinhard Zumkeller, Nov 01 2013
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Jul 07 2003
STATUS
approved