Skip to main content
added 2 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, 72 6565 62 bytes

r=i=1:2e3 for(a in r)for(b in a+r)i[(b+r)*(a+b)+a*b]=F;which(!!i)+a*b]=F;r[i[r]] 

Try it online!Try it online!

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; herehere is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

R, 72 65 bytes

r=i=1:2e3 for(a in r)for(b in a+r)i[(b+r)*(a+b)+a*b]=F;which(!!i) 

Try it online!

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; here is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

R, 72 65 62 bytes

r=i=1:2e3 for(a in r)for(b in a+r)i[(b+r)*(a+b)+a*b]=F;r[i[r]] 

Try it online!

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; here is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

deleted 52 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, 7272 65 bytes

r=i=1:2e3 f=`for` ffor(a, in r,f)for(b, in a+r,f)i[(c,b+r,(i[a*b+b*c+c*a]=F)))*(a+b);which+a*b]=F;which(!!i) 

Try it online! (but times-out: see below)Try it online!

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; herehere is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

R, 72 bytes

r=i=1:2e3 f=`for` f(a,r,f(b,a+r,f(c,b+r,(i[a*b+b*c+c*a]=F))));which(!!i) 

Try it online! (but times-out: see below)

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; here is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

R, 72 65 bytes

r=i=1:2e3 for(a in r)for(b in a+r)i[(b+r)*(a+b)+a*b]=F;which(!!i) 

Try it online!

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; here is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).

Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

R, 72 bytes

r=i=1:2e3 f=`for` f(a,r,f(b,a+r,f(c,b+r,(i[a*b+b*c+c*a]=F))));which(!!i) 

Try it online! (but times-out: see below)

Outputs all idoneal numbers in ascending order.

The TIO link will time-out, since r is needlessly set to 1...2000 to save bytes; here is a link to a version with r initialized to 1...99 instead, which doesn't time-out (and still gives the right output).