Java (JDK), 4054 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
It contains all the perfect numbers that an int can represent. So why not?
And here an actual computation entry, which counts for 54 bytes:
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Though for a strict number by number matching, the following will return the same values, but is only 40 bytes.
n->n==6|n==28|n==496|n==8128|n==33550336
Java (JDK), 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
It contains all the perfect numbers that an int can represent. So why not?
And here an actual computation entry, which counts for 54 bytes:
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK), 54 bytes
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Though for a strict number by number matching, the following will return the same values, but is only 40 bytes.
n->n==6|n==28|n==496|n==8128|n==33550336
Java (JDK), 5440 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
It contains all the perfect numbers that an int can represent. So why not?
And here an actual computation entry, which counts for 54 bytes:
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK) , 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
Because why not?
Java (JDK), 54 bytes
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK) , 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
Because why not?
Java (JDK), 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
It contains all the perfect numbers that an int can represent. So why not?
And here an actual computation entry, which counts for 54 bytes:
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK), 54 bytes
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK) , 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
Because why not?
Java (JDK), 54 bytes
n->{int s=0,d=0;for(;++d<n;)s+=n%d<1?d:0;return s==n;}
Java (JDK) , 40 bytes
n->n==6|n==28|n==496|n==8128|n==33550336
Because why not?