A067255 Irregular triangle read by rows: row n gives exponents in prime factorization of n.
0, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0, 0, 0, 1, 3, 0, 2, 1, 0, 1, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 4, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Examples
1 = 2^0 2 = 2^1 3 = 2^0 3^1 4 = 2^2 5 = 2^0 3^0 5^1 6 = 2^1 3^1 ... and reading the exponents gives the sequence. Since for example 99=2^0*3^2*5^0*7^0*11^1, we use this symbol for ninety-nine: 99: {0,2,0,0,1}. Concatenating all the symbols for 1,2,3,4,5,6,..., we get the sequence.
Links
- Reinhard Zumkeller, Rows n = 1..250 of triangle, flattened
- Jeppe Stig Nielsen, See this explanation.
Crossrefs
Cf. A133457.
Programs
-
Haskell
a067255 n k = a067255_tabf !! (n-1) !! (k-1) a067255_row 1 = [0] a067255_row n = f n a000040_list where f 1 _ = [] f u (p:ps) = g u 0 where g v e = if m == 0 then g v' (e + 1) else e : f v ps where (v',m) = divMod v p a067255_tabf = map a067255_row [1..] -- Reinhard Zumkeller, Jun 11 2013
-
Mathematica
f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; Array[f, 29] // Flatten (* Michael De Vlieger, Mar 08 2019 *)
Comments