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.

A167184 Smallest prime power >= n that is not prime.

This page as a plain text file.
%I A167184 #16 Oct 25 2024 14:17:02
%S A167184 1,4,4,4,8,8,8,8,9,16,16,16,16,16,16,16,25,25,25,25,25,25,25,25,25,27,
%T A167184 27,32,32,32,32,32,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
%U A167184 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,81,81,81,81,81,81,81,81
%N A167184 Smallest prime power >= n that is not prime.
%H A167184 Robert Price, <a href="/A167184/b167184.txt">Table of n, a(n) for n = 1..2000</a>
%e A167184 For a(12), 12, 14, and 15 are not prime powers, and 13 is a prime power but it is prime. Since 16 = 2^4 is a prime power, a(12) = 16.
%t A167184 Module[{ppwrs=Join[{1},Sort[Flatten[Table[Prime[Range[5]]^p,{p,2,10}]]]]}, Flatten[ Table[Select[ppwrs,#>=n&,1],{n,90}]]] (* _Harvey P. Dale_, Oct 06 2014 *)
%o A167184 (PARI) isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
%o A167184 A167184(n) = {local(m);m=n;while(!isA025475(m),m++);m}
%o A167184 (Python)
%o A167184 from itertools import count
%o A167184 from sympy import factorint
%o A167184 def A167184(n): return next(filter(lambda m:len(f:=factorint(m))<=1 and max(f.values(),default=2)>1, count(n))) # _Chai Wah Wu_, Oct 25 2024
%Y A167184 List of nonprime prime powers: A025475.
%Y A167184 Previous nonprime prime power: A167185.
%Y A167184 Next prime power including primes: A000015.
%K A167184 easy,nonn
%O A167184 1,2
%A A167184 _Michael B. Porter_, Oct 29 2009