1 is the smallest positive integer that is both a perfect square and a perfect cube, write a program to find the sum of first n positive integers that are both Perfect Square AND Perfect Cube .
Find the sum of first 100 numbers, the sum is too long but don't worry, I just want the answer as mod of the actual number with 2015.
Note:
1, 64, 729 . . . is the sequence of such numbers.
answer = sum mod 2015
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
A straight forward python one-liner:
sum(i**6 for i in range(1,101))%2015