0
$\begingroup$

I'm trying to get the list of numbers using this query:

WolframAlpha[
  "integers | perfect square and having 9 digits", {{"Result", 1}, "NumberData"}]

By default it only returns 10 numbers. How do I get the whole list (something like 23000 entries)?

$\endgroup$
2
  • 1
    $\begingroup$ You'll be better off working with plain Mathematica code for things like this (where it certainly is possible to do so) $\endgroup$ Commented Jan 11, 2019 at 20:55
  • 1
    $\begingroup$ Replacing and having 9 digits with and greater than 100160064 will return the next 10. Repeat as needed. Or perhaps the paid subscription to WolframAlpha will return more data. I've never seen a sufficiently detailed description of the features to coax me into paying for that. $\endgroup$ Commented Jan 11, 2019 at 21:03

2 Answers 2

2
$\begingroup$

Clicking the 'More' button on the WolframAlpha[] output, then obtain the Number data (see GIF below). The call we get is

WolframAlpha["integers | perfect square and having 9 digits", 
  {{"Result", 1}, "NumberData"}, PodStates -> {"Result__More"}]
{100000000, 100020001, 100040004, 100060009, 100080016, 100100025, 100120036, 
 100140049, 100160064, 100180081, 100200100, 100220121, 100240144, 100260169, 
 100280196, 100300225, 100320256, 100340289, 100360324, 100380361}

We can simulate multiple button clicks. Here's two:

Length @ WolframAlpha["integers | perfect square and having 9 digits", 
  {{"Result", 1}, "NumberData"}, PodStates -> {"Result__More", "Result__More"}]
20

Unfortunately there's either a timeout or a memory limit was hit and we can only get up to 9 button clicks:

Length@WolframAlpha["integers | perfect square and having 9 digits", 
  {{"Result", 1}, "NumberData"}, PodStates -> ConstantArray["Result__More", 9]]
5120
WolframAlpha["integers | perfect square and having 9 digits", 
  {{"Result", 1}, "NumberData"}, PodStates -> ConstantArray["Result__More", 10]]
Missing["NotAvailable"]

enter image description here

$\endgroup$
1
$\begingroup$

Use Mathematica:

Select[Table[i, {i, 10^9, 10^10 - 1}], Sqrt[#] \[Element] Integers &]

or...

Table[j^2, {j, Floor[Sqrt[10^9]], Ceiling[Sqrt[10^10 - 1]]}]
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.