A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.

Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

I am testing my code with the solutions laid out in the Problem - namely that S(2) = 110 and S(6) = 2562701.
I am struggling because I get S(6) = 3575991. This is NOT the result of the question just my result for their given example. Am I off or is the sample? Here are the near power sums I get for S(6):

KeithGordon wrote: ↑Fri May 14, 2021 10:13 pmAm I off or is the sample?

"A positive integer, $n$, is a near power sum if there exists a positive integer, $k$, such that the sum of the $k$th powers of the digits in its decimal representation is equal to either $n+1$ or $n-1$" (but not $n$ itself!)