login
Largest prime power < prime(n).
14

%I #12 Nov 17 2024 02:39:05

%S 1,2,4,5,9,11,16,17,19,27,29,32,37,41,43,49,53,59,64,67,71,73,81,83,

%T 89,97,101,103,107,109,125,128,131,137,139,149,151,157,163,169,173,

%U 179,181,191,193,197,199,211,223,227,229,233,239,243,256,257,263,269,271

%N Largest prime power < prime(n).

%t lpp[n_]:=Module[{k=n-1},While[!PrimePowerQ[k],k--];k]; Join[{1},Table[ lpp[ n],{n,Prime[Range[2,60]]}]] (* _Harvey P. Dale_, Nov 24 2018 *)

%o (Python)

%o from sympy import factorint, prime

%o def A065514(n): return next(filter(lambda m:len(factorint(m))<=1, range(prime(n)-1,0,-1))) # _Chai Wah Wu_, Oct 25 2024

%Y Cf. A000040, A000961.

%K nonn,changed

%O 1,2

%A _Reinhard Zumkeller_, Nov 27 2001