For integer values of n how many triplets exist such that -77<n<77 and each member of the triplet (n,n+1,n+2) has the same last digit as it's cube.
Provide the reasoning of getting your answer.
The numbers that work end in 0, 1, 4, 5, 6 and 9.
There are 16 triplets between -77 and 77 that end in 4,5,6.
There are 14 triplets between -77 and 77 that end in 9,0,1
And n = -1 gives us the (-1,0,1) triplet
Final answer = 31
Edited on August 22, 2023, 9:31 am