Hi...
When using the Table[Solve[...]] command, the format of the returned data is not what I was expecting (the actual integer value solution), but instead some sort of {m -> value} format for each of the roots. For example:
p = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89,
107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423,
9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049,
216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011,
24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161, 74207281, 77232917,
82589933, 136279841};
numElements=10;
Do[
mp[[nn]] = 2^p[[nn]] - 1;
pn[[nn]] = mp[[nn]]*(mp[[nn]] + 1)/2;
, {nn, 1, numElements}]
cs = Table[Solve[(m^2*(2 m^2 - 1) - pn[[ii]]) == 0 && m > 0, m, Integers], {ii, 1, numElements}];
And if I try and see the elements of the cs array, I don't get the expected numbers, and then if I try to use IntegerLength[] function to see how many digits in an individual item in the cs array is, I get the following:
In[473]:= cs[[1 ;; 10]]
IntegerLength[cs[[5]]]
Out[473]= {{}, {{m -> 2}}, {{m -> 4}}, {{m -> 8}}, {{m -> 64}}, {{m ->
256}}, {{m -> 512}}, {{m -> 32768}}, {{m -> 1073741824}}, {{m ->
17592186044416}}}
Out[474]= {{IntegerLength[m -> 64]}}
So, rather than the expected "2" (which is the number of digits in 64), I get something I don't see how to further process.
So, what exactly do you call what the Table[Solve[]] command returns and how to save the returned integer roots for other work??
This is on Mathematica 14.3 on macOS.
Thanks very much...
-bob