Am I a Secondary Taxicab?
Jelly, 9 bytes
Credits to Erik the Outgolfer.
Œċ*3S€ċ>1
Try it online!
This is too slow that it won't even work for 1729
online.
Much faster, 12 bytes
Credits to Dennis.
R*3fRŒċS€ċ>1
Try it online!
Mathematica, 35 bytes
Count[#^3+#2^3&~Array~{#,#},#,2]>2&
Pure function taking a positive integer and returning True
or False
.
#^3+#2^3&~Array~{#,#}
tabulates all sums of cubes of two integers between 1 and the input. (This would be much faster with a sensible bound on the integers to be cubed, like the cube root of the input; but that would take precious bytes. As it is, the code takes about 30 seconds on the input 13832
and scales at least quadratically in the input.) Count[...,#,2]
counts how many times the input appears in this list at nest-level 2; if this number is greater than 2
, then the input is a semi-taxicab number (greater than 2, rather than greater than 1, since a^3+b^3 and b^3+a^3 are being counted separately).
Mathematica, 38 37 bytes
Tr[1^PowersRepresentations[#,2,3]]>1&
-1 byte thanks to @GregMartin
As always, there is a Mathematica builtin to everything.