A112798 Table where n-th row is factorization of n, with each prime p_i replaced by i.
1, 2, 1, 1, 3, 1, 2, 4, 1, 1, 1, 2, 2, 1, 3, 5, 1, 1, 2, 6, 1, 4, 2, 3, 1, 1, 1, 1, 7, 1, 2, 2, 8, 1, 1, 3, 2, 4, 1, 5, 9, 1, 1, 1, 2, 3, 3, 1, 6, 2, 2, 2, 1, 1, 4, 10, 1, 2, 3, 11, 1, 1, 1, 1, 1, 2, 5, 1, 7, 3, 4, 1, 1, 2, 2, 12, 1, 8, 2, 6, 1, 1, 1, 3, 13, 1, 2, 4, 14, 1, 1, 5, 2, 2, 3, 1, 9, 15, 1, 1, 1, 1
Offset: 2
Examples
Row 20 is 1,1,3 because the prime factors of 20, namely 2,2,5 are the 1st, 1st, 3rd primes. Table begins: 1; 2; 1, 1; 3; 1, 2; 4; 1, 1, 1; ... The sequence of all finite multisets of positive integers begins: (), (1), (2), (11), (3), (12), (4), (111), (22), (13), (5), (112), (6), (14), (23), (1111), (7), (122), (8), (113), (24), (15), (9), (1112), (33), (16), (222), (114). - _Gus Wiseman_, Dec 12 2016
Links
- Alois P. Heinz, Rows n = 2..3275, flattened
- Emeric Deutsch, Rooted tree statistics from Matula numbers, arXiv:1111.4288 [math.CO], 2011.
- Emeric Deutsch, Rooted tree statistics from Matula numbers, Discrete Appl. Math., 160, 2012, 2314-2322.
- F. Goebel, On a 1-1-correspondence between rooted trees and natural numbers, J. Combin. Theory, B 29 (1980), 141-143.
- I. Gutman and A. Ivic, On Matula numbers, Discrete Math., 150, 1996, 131-142.
- I. Gutman and Yeong-Nan Yeh, Deducing properties of trees from their Matula numbers, Publ. Inst. Math., 53 (67), 1993, 17-22.
- D. W. Matula, A natural rooted tree enumeration by prime factorization, SIAM Rev. 10 (1968) 273.
- Index entries for sequences related to Matula-Goebel numbers
- Index entries for sequences computed from indices in prime factorization
Crossrefs
Programs
-
Haskell
a112798 n k = a112798_tabf !! (n-2) !! (n-1) a112798_row n = a112798_tabf !! (n-2) a112798_tabf = map (map a049084) $ tail a027746_tabf -- Reinhard Zumkeller, Aug 04 2014
-
Maple
T:= n-> sort([seq(numtheory[pi](i[1])$i[2], i=ifactors(n)[2])])[]: seq(T(n), n=2..50); # Alois P. Heinz, Aug 09 2012 with(numtheory): B := proc (n) local nn, j, m: nn := op(2, ifactors(n)); for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: # Emeric Deutsch, Jun 04 2015. (This is equivalent to the first Maple program.)
-
Mathematica
PrimePi /@ Flatten[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 60 // Flatten // Rest (* Michael De Vlieger, May 09 2015 *)
-
PARI
row(n)=my(v=List(),f=factor(n)); for(i=1,#f~,for(j=1,f[i,2], listput(v,primepi(f[i,1])))); Vec(v) \\ Charles R Greathouse IV, Nov 09 2021
Comments