Historical context
At the 1912 International Congress of Mathematicians, Edmund Landau listed four basic problems about prime numbers. These problems were characterised in his speech as "unattackable at the present state of mathematics" and are now known as Landau's problems (source : Wiki)
Problem statement
The 4th Landau's problem aalso known as the 'near square primes' asked whether there are infinitely many primes which are of the form . Your task here is to list such primes below a given input integer m.
Examples
  • m = 20 => p = [2, 5, 17] ;
  • m = 200 => p = [2, 5, 17, 37, 101, 197] ;
  • m = 2000 => p = [2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601] ;
Fobidden functions
  • regexp
  • str2num
  • assignin
  • echo
See also

Solution Stats

94 Solutions

52 Solvers

Last Solution submitted on Jan 25, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...