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.

A124010 Triangle in which first row is 0, n-th row (n>1) lists the exponents of distinct prime factors ("ordered prime signature") in the prime factorization of n.

This page as a plain text file.
%I A124010 #66 Jun 15 2025 09:57:42
%S A124010 0,1,1,2,1,1,1,1,3,2,1,1,1,2,1,1,1,1,1,1,4,1,1,2,1,2,1,1,1,1,1,1,3,1,
%T A124010 2,1,1,3,2,1,1,1,1,1,1,5,1,1,1,1,1,1,2,2,1,1,1,1,1,3,1,1,1,1,1,1,2,1,
%U A124010 2,1,1,1,1,4,1,2,1,2,1,1,2,1,1,1,3,1,1,3,1,1,1,1,1,1,2,1,1,1,1,1,2,1,6,1,1,1,1,1,1,2,1,1,1,1,1,1,1,3,2,1
%N A124010 Triangle in which first row is 0, n-th row (n>1) lists the exponents of distinct prime factors ("ordered prime signature") in the prime factorization of n.
%C A124010 A001222(n) = Sum(T(n,k), 1 <= k <= A001221(n)); A005361(n) = Product(T(n,k), 1 <= k <= A001221(n)), n>1; A051903(n) = Max(T(n,k): 1 <= k <= A001221(n)); A051904(n) = Min(T(n,k), 1 <= k <= A001221(n)); A067029(n) = T(n,1); A071178(n) = T(n,A001221(n)); A064372(n)=Sum(A064372(T(n,k)), 1 <= k <= A001221(n)). - _Reinhard Zumkeller_, Aug 27 2011
%C A124010 Any finite sequence of natural numbers appears as consecutive terms. - _Paul Tek_, Apr 27 2013
%C A124010 For n > 1: n-th row = n-th row of A067255 without zeros. - _Reinhard Zumkeller_, Jun 11 2013
%C A124010 Most often the prime signature is given as a sorted representative of the multiset of the nonzero exponents, either in increasing order, which yields A118914, or, most commonly, in decreasing order, which yields A212171. - _M. F. Hasler_, Oct 12 2018
%H A124010 Reinhard Zumkeller, <a href="/A124010/b124010.txt">Rows n = 1..10000 of triangle, flattened</a>
%H A124010 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F A124010 n = Product_k A027748(n,k)^a(n,k).
%e A124010 Initial values of exponents are:
%e A124010 1, [0]
%e A124010 2, [1]
%e A124010 3, [1]
%e A124010 4, [2]
%e A124010 5, [1]
%e A124010 6, [1, 1]
%e A124010 7, [1]
%e A124010 8, [3]
%e A124010 9, [2]
%e A124010 10, [1, 1]
%e A124010 11, [1]
%e A124010 12, [2, 1]
%e A124010 13, [1]
%e A124010 14, [1, 1]
%e A124010 15, [1, 1]
%e A124010 16, [4]
%e A124010 17, [1]
%e A124010 18, [1, 2]
%e A124010 19, [1]
%e A124010 20, [2, 1]
%e A124010 ...
%p A124010 expts:=proc(n) local t1,t2,t3,t4,i; if n=1 then RETURN([0]); fi; if isprime(n) then RETURN([1]); fi; t1:=ifactor(n); if nops(factorset(n))=1 then RETURN([op(2,t1)]); fi; t2:=nops(t1); t3:=[]; for i from 1 to t2 do t4:=op(i,t1); if nops(t4) = 1 then t3:=[op(t3),1]; else t3:=[op(t3),op(2,t4)]; fi; od; RETURN(t3); end; # _N. J. A. Sloane_, Dec 20 2007
%p A124010 PrimeSignature := proc(n) local F, e, k; F := ifactors(n)[2]; [seq(e, e = seq(F[k][2], k = 1..nops(F)))] end:
%p A124010 ListTools:-Flatten([[0], seq(PrimeSignature(n), n = 1..73)]); # _Peter Luschny_, Jun 15 2025
%t A124010 row[1] = {0}; row[n_] := FactorInteger[n][[All, 2]] // Flatten; Table[row[n], {n, 1, 80}] // Flatten (* _Jean-François Alcover_, Aug 19 2013 *)
%o A124010 (Haskell)
%o A124010 a124010 n k = a124010_tabf !! (n-1) !! (k-1)
%o A124010 a124010_row 1 = [0]
%o A124010 a124010_row n = f n a000040_list where
%o A124010    f 1 _      = []
%o A124010    f u (p:ps) = h u 0 where
%o A124010      h v e | m == 0 = h v' (e + 1)
%o A124010            | m /= 0 = if e > 0 then e : f v ps else f v ps
%o A124010            where (v',m) = divMod v p
%o A124010 a124010_tabf = map a124010_row [1..]
%o A124010 -- _Reinhard Zumkeller_, Jun 12 2013, Aug 27 2011
%o A124010 (PARI) print1(0); for(n=2,50, f=factor(n)[,2]; for(i=1,#f,print1(", "f[i]))) \\ _Charles R Greathouse IV_, Nov 07 2014
%o A124010 (PARI) A124010_row(n)=if(n,factor(n)[,2]~,[0]) \\ _M. F. Hasler_, Oct 12 2018
%o A124010 (Python)
%o A124010 from sympy import factorint
%o A124010 def a(n):
%o A124010     f=factorint(n)
%o A124010     return [0] if n==1 else [f[i] for i in f]
%o A124010 for n in range(1, 21): print(a(n)) # _Indranil Ghosh_, May 16 2017
%Y A124010 Cf. A027748, A001221 (row lengths, n>1), A001222 (row sums), A027746, A020639, A064372, A067029 (first column).
%Y A124010 Sorted rows: A118914, A212171.
%K A124010 easy,nonn,tabf
%O A124010 1,4
%A A124010 _Franklin T. Adams-Watters_, Nov 01 2006
%E A124010 Name edited by _M. F. Hasler_, Apr 08 2022