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.

A027748 Irregular triangle in which first row is 1, n-th row (n > 1) lists distinct prime factors of n.

This page as a plain text file.
%I A027748 #54 Feb 16 2025 08:32:35
%S A027748 1,2,3,2,5,2,3,7,2,3,2,5,11,2,3,13,2,7,3,5,2,17,2,3,19,2,5,3,7,2,11,
%T A027748 23,2,3,5,2,13,3,2,7,29,2,3,5,31,2,3,11,2,17,5,7,2,3,37,2,19,3,13,2,5,
%U A027748 41,2,3,7,43,2,11,3,5,2,23,47,2,3,7,2,5,3,17,2,13,53,2,3,5,11,2,7,3,19,2,29,59,2,3,5,61,2,31
%N A027748 Irregular triangle in which first row is 1, n-th row (n > 1) lists distinct prime factors of n.
%C A027748 Number of terms in n-th row is A001221(n) for n > 1.
%C A027748 From _Reinhard Zumkeller_, Aug 27 2011: (Start)
%C A027748 A008472(n) = Sum_{k=1..A001221(n)} T(n,k), n>1;
%C A027748 A007947(n) = Product_{k=1..A001221(n)} T(n,k);
%C A027748 A006530(n) = Max_{k=1..A001221(n)} T(n,k).
%C A027748 A020639(n) = Min_{k=1..A001221(n)} T(n,k).
%C A027748 (End)
%C A027748 Subsequence of A027750 that lists the divisors of n. - _Michel Marcus_, Oct 17 2015
%H A027748 T. D. Noe, <a href="/A027748/b027748.txt">Rows n=1..2048 of triangle, flattened</a>
%H A027748 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DistinctPrimeFactors.html">Distinct Prime Factors</a>.
%e A027748 Triangle begins:
%e A027748    1;
%e A027748    2;
%e A027748    3;
%e A027748    2;
%e A027748    5;
%e A027748    2, 3;
%e A027748    7;
%e A027748    2;
%e A027748    3;
%e A027748    2, 5;
%e A027748   11;
%e A027748    2, 3;
%e A027748   13;
%e A027748    2, 7;
%e A027748   ...
%p A027748 with(numtheory): [ seq(factorset(n), n=1..100) ];
%t A027748 Flatten[ Table[ FactorInteger[n][[All, 1]], {n, 1, 62}]](* _Jean-François Alcover_, Oct 10 2011 *)
%o A027748 (Haskell)
%o A027748 import Data.List (unfoldr)
%o A027748 a027748 n k = a027748_tabl !! (n-1) !! (k-1)
%o A027748 a027748_tabl = map a027748_row [1..]
%o A027748 a027748_row 1 = [1]
%o A027748 a027748_row n = unfoldr fact n where
%o A027748    fact 1 = Nothing
%o A027748    fact x = Just (p, until ((> 0) . (`mod` p)) (`div` p) x)
%o A027748             where p = a020639 x  -- smallest prime factor of x
%o A027748 -- _Reinhard Zumkeller_, Aug 27 2011
%o A027748 (PARI) print1(1);for(n=2,20,f=factor(n)[,1];for(i=1,#f,print1(", "f[i]))) \\ _Charles R Greathouse IV_, Mar 20 2013
%o A027748 (Python)
%o A027748 from sympy import primefactors
%o A027748 for n in range(2, 101):
%o A027748     print([i for i in primefactors(n)]) # _Indranil Ghosh_, Mar 31 2017
%Y A027748 Cf. A000027, A001221, A001222 (with repetition), A027746, A141809, A141810.
%Y A027748 a(A013939(A000040(n))+1) = A000040(n).
%Y A027748 Cf. A020639, A027750.
%Y A027748 A284411 gives column medians.
%K A027748 nonn,easy,tabf,nice
%O A027748 1,2
%A A027748 _N. J. A. Sloane_
%E A027748 More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)