Task

Show the first   30   positive integers which are squares but not cubes of such integers.

Optionally, show also the first   3   positive integers which are both squares and cubes,   and mark them as such.




 
# Emit an unbounded stream
def squares_not_cubes:
  def icbrt: pow(10; log10/3) | round;
  range(1; infinite)
  | (.*.)
  | icbrt as $c
  | select( ($c*$c*$c) != .);
 
limit(30; squares_not_cubes)
 