Try this online!

# Regex (ECMAScript or better), 50 bytes

^((?=(xx+?)\2+$)((?=\2+$)(?=(x+)(\4+$))\5){2,})*x$


Try it online! - ECMAScript
Try it online! - Perl
Try it online! - Java
Try it online! - Python
Try it online! - Ruby
Try it online! - PCRE
Try it online! - .NET

I adapted this on 2018-12-26, as a slight modification to the regex that matches numbers of the form $$\n^k\$$, where $$\k\$$ is a constant. In its implementation, that regex actually matches numbers that are either $$\0\$$ or of the form $$\n^k=\prod_{i=0}^{q} p_i^{k_i}=p_0^{k_0}p_1^{k_1}p_2^{k_2}...p_q^{k_q}\$$ where all $$\p_m\$$ are distinct primes, all $$\k_m=k\$$, and $$\q\ge 0\$$.

The only changes here, to match powerful numbers instead, are to make $$\k_m\ge 2\$$ (which takes 1 extra byte), and not to match $$\0\$$ (which saves 1 byte).

In other words, this regex works by dividing away each prime factor, from smallest to largest, asserting along the way that each distinct prime is divided away at least twice, with an end result of $$\1\$$.

^                     # N = input number (initial value of tail)
(                     # Loop/iterate the following:
(?=(xx+?)\2+$) # \2 = smallest prime factor of tail ( # Loop/iterate the following: (?=\2+$)              # Assert tail is still divisible by \2
(?=(x+)(\4+$)) # \4 = largest proper divisor of tail = tail / \2 (implicitly); # \5 = tail - \4 (a tool to make tail = \4) \5 # tail -= \5, i.e. tail = \4 ){2,} # Iterate the above at least 2 times )* # Iterate the above any number of times, minimum 0 x$                    # Assert tail == 1


# Retina 0.8.2, 56 bytes

.+
$* ^((?=(11+?)\2+$)((?=\2+$)(?=(1+)(\4+$))\5){2,})*1$ Try it online! # Retina 0.8.2, 64 bytes .+$*
^((.){2,})(?<!^\3+(..+))\1*$(?<!^\4*(?(2)$)(((?<-2>)\1)+))


Try it online! Link includes test cases. Outputs 0 for a powerful number, 1 if not. Explanation:

.+
$*  Convert to unary. ^((.){2,})  Search for a nontrival integer... (?<!^\3+(..+))  ... that is not composite... \1*$


... and is a factor of the input...

(?<!^\4*(?(2)$)(((?<-2>)\1)+))  ... and whose square is not a factor of the input. # Charcoal, 25 bytes Ｎθ⊙…·²θ∧∧¬﹪θι﹪θ×ιι⬤…²ι﹪ιλ  Try it online! Link is to verbose version of code. Outputs an inverted Charcoal boolean, i.e. - if the input is not a powerful number, nothing if it is. Explanation: Ｎθ Input as an integer …· Inclusive range from ² Literal integer 2 to θ Input integer ⊙ Any value satisfies θ Input integer ¬﹪ Is divisible by ι Current value ∧ Logical And θ Input integer ﹪ Is not divisible by ×ιι Current value squared ∧ Logical And … Range from ² Literal integer 2 to ι Current value ⬤ All satisfy ι Outer value ﹪ Is not divisible by λ Inner value Implicitly print  # Desmos, 47 bytes f(k)=0^{∏_{n=1}^{k^{.5}}mod((k/n^2)^{1/3},1)}  In case it bothers anyone, k/n^2 can't be shortened to k/nn because k/nn is parsed as k/n * n when we actually want k/(n*n). Try It On Desmos! Try It On Desmos! - Prettified # Perl 5-ap, 43 bytes //&map$\+=$_**2*$'**3=="@F",@;for@;=1..\$_}{


Try it online!

# Vyxalg, 23 bitsv2, 2.875 bytes

∆Ǐċ


Try it Online!

Bitstring:

00010101110001100111100


Prime exponents, check if not equal to one, minimum of that list (will always be greater than one for a powerful number)