8 deleted 1 character in body
source | link

Perl, 78 bytes

#!perl -nl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$_-=print$i**3+1while$_

Brute force approach. Couting the shebang as two, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online.Try it online!

Perl, 78 bytes

#!perl -nl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$_-=print$i**3+1while$_

Brute force approach. Couting the shebang as two, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online.

Perl, 78 bytes

#!perl -nl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$_-=print$i**3+1while$_

Brute force approach. Couting the shebang as two, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online!

7 deleted 3 characters in body
source | link

Perl, 8178 bytes

#!perl -lnl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$n$i++and$_-=print$i**3+1while$n+=<>=print$i**3+1while$_

Brute force approach. Couting the shebang as onetwo, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online.

Perl, 81 bytes

#!perl -l
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$n-=print$i**3+1while$n+=<>

Brute force approach. Couting the shebang as one, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Perl, 78 bytes

#!perl -nl
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$_-=print$i**3+1while$_

Brute force approach. Couting the shebang as two, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Try it online.

6 added 67 characters in body
source | link

Perl, 8381 bytes

#!perl -l
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$n-=print$i**3+1,$/while$n+=<>=print$i**3+1while$n+=<>

Brute force approach. Couting the shebang as one, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Perl, 83 bytes

grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$n-=print$i**3+1,$/while$n+=<>

Brute force approach.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497

Perl, 81 bytes

#!perl -l
grep$_<(($_+2)**(1/3)|0)**3,map$i**3-$_**3,2..$i++and$n-=print$i**3+1while$n+=<>

Brute force approach. Couting the shebang as one, input is taken from stdin.

Sample Usage

$ echo 10 | perl fermat-near-miss.pl
1729
1092728
3375001
15438250
121287376
401947273
3680797185
6352182209
7856862273
12422690497
5 slightly more efficient
source | link
4 deleted 2 characters in body
source | link
3 deleted 51 characters in body
source | link
2 deleted 4 characters in body
source | link
1
source | link