Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,6 @@
main (p):+
q = 269696 \ ending to be found
m = 1000000 \ corresponding modulus
for i = from 1 upto m^2
if i^2 %% m = q: break
print i, i^2, q

View file

@ -0,0 +1,39 @@
main (p):+
q =: string p.1 as integer else 269696
debug enable
debug print "Sets:"
\ central loop: calculate new set of endings for powers of 10
set =: new row size 1 init 0
m =: 1
while m < q && set.Count > 0
set =: new set set mod m find q
debug print join set
m =*10
rounds += 1
debug print ''
\ show result
print format "Result for %_;:" q
if set.Count < 1
print "NO SOLUTION"
return
row set sort ascending
for x =: row set give values
print format '%6;^2 = %16_;', x, x^2
print rounds, "rounds, ", $tally, "square/mod calculations"
$tally =: ()
\ calculate new set of endings mod m from m-1
new set (old) mod (m) find (q):
new =: new row
mm =: 10 * m
qm =: q %% mm
for i =: give values old
for j =: from 0 upto 9*m step m
k =: i + j
l =: k^2 %% mm
$tally += 1 \ global to count calculations
if l = qm
new[] =: k
return new