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.
%I A162247 #14 Mar 25 2025 15:03:15 %S A162247 1,2,3,4,2,2,5,6,2,3,7,8,2,4,2,2,2,9,3,3,10,2,5,11,12,2,6,3,4,2,2,3, %T A162247 13,14,2,7,15,3,5,16,2,8,4,4,2,2,4,2,2,2,2,17,18,2,9,3,6,2,3,3,19,20, %U A162247 2,10,4,5,2,2,5,21,3,7,22,2,11,23,24,2,12,3,8,4,6,2,2,6,2,3,4,2,2,2,3,25,5,5 %N A162247 Irregular triangle in which row n lists all factorizations of n, sorted by the number of factors in each factorization. %C A162247 Row n begins with n because it is a factorization of length 1. In each factorization, the factors are in nondecreasing order. This sequence is A056472 with the factorizations in a different order. Sequence A001055(n) gives the number of factorizations of n; A066637(n) gives the number of numbers in row n. In the Mathematica program, the function f returns a list of the factorizations of n. %C A162247 These factorizations are useful in determining the forms of numbers that have a given number of divisors. For example, to find the forms of numbers that have 12 divisors, we look at the four factorizations of 12 (12, 2*6, 3*4, 2*2*3), subtract 1 from each factor, and find the forms to be p^11, p q^5, p^2 q^3, and p q r^2, where p, q, and r are prime numbers. %D A162247 See A001055. %H A162247 T. D. Noe, <a href="/A162247/b162247.txt">Rows n=1..1000 of triangle, flattened</a> %H A162247 R. J. Mathar, <a href="/A162247/a162247.txt">Factorizations of n=1..1100</a> %e A162247 1; %e A162247 2; %e A162247 3; %e A162247 4,2*2; %e A162247 5; %e A162247 6,2*3; %e A162247 7; %e A162247 8,2*4,2*2*2; %e A162247 9,3*3; %e A162247 10,2*5; %e A162247 11; %e A162247 12,2*6,3*4,2*2*3; %t A162247 g[lst_,p_] := Module[{t,i,j}, Union[Flatten[Table[t=lst[[i]]; t[[j]]=p*t[[j]]; Sort[t], {i,Length[lst]}, {j,Length[lst[[i]]]}], 1], Table[Sort[Append[lst[[i]],p]], {i,Length[lst]}]]]; f[n_] := Module[{i,j,p,e,lst={{}}}, {p,e}=Transpose[FactorInteger[n]]; Do[lst=g[lst,p[[i]]], {i,Length[p]}, {j,e[[i]]}]; lst]; Flatten[Table[f[n], {n,25}]] %o A162247 (Haskell) %o A162247 import Data.List (sortBy) %o A162247 import Data.Ord (comparing) %o A162247 a162247 n k = a162247_tabl !! (n-1) !! (k-1) %o A162247 a162247_row n = a162247_tabl !! (n-1) %o A162247 a162247_tabl = map (concat . sortBy (comparing length)) $ tail fss where %o A162247 fss = [] : map fact [1..] where %o A162247 fact x = [x] : [d : fs | d <- [2..x], let (x',r) = divMod x d, %o A162247 r == 0, fs <- fss !! x', d <= head fs] %o A162247 -- _Reinhard Zumkeller_, Jan 08 2013 %Y A162247 Cf. A001055, A056472, A066637, A316439. %K A162247 nice,tabf,nonn %O A162247 1,2 %A A162247 _T. D. Noe_, Jun 28 2009