login
Largest number with n prime factors where all factors are less than or equal to n.
0

%I #11 Sep 24 2020 11:37:54

%S 0,4,27,81,3125,15625,823543,5764801,40353607,282475249,285311670611,

%T 3138428376721,302875106592253,3937376385699289,51185893014090757,

%U 665416609183179841,827240261886336764177,14063084452067724991009

%N Largest number with n prime factors where all factors are less than or equal to n.

%F a(n) = A007917(n)^n for n>1. - _Michel Marcus_, Sep 24 2020

%e a(2) = 4 (4=2*2 has 2 factors and 2 is the largest prime number <= 2).

%e a(3) = 27 (27=3*3*3 has 3 factors and 3 is the largest prime number <= 3).

%e a(4) = 81 (81=3*3*3*3 has 4 factors and 3 is the largest prime number <= 4).

%t a[n_] := If[n == 1, 0, If[PrimeQ[n], n, NextPrime[n, -1]]^n];

%t Array[a, 18] (* _Jean-François Alcover_, Sep 24 2020 *)

%o (PARI) a(n) = if (n==1, 0, precprime(n)^n); \\ _Michel Marcus_, Sep 24 2020

%Y Cf. A007917 (largest prime <= n).

%K easy,nonn

%O 1,2

%A Jostein Trondal (jallamekk(AT)hotmail.com), May 13 2002