The title is the problem's question.
The process is:
-
the
base
is 10
-
the number of
digits
summed is 2
-
make a list of the integers from 0 to
base
^
digits
-1 called
input
-
set
groups
to an empty list
-
while the length of the
input
is greater than 0 do until matching
end of while
-
set
v
to the first element of
input
-
set
input
to the remainder of
input
-
set
group
to the list of the integer digits of
v
using the base
base
zero padded on the left to the length
digits
as necessary
-
set
d
to the sum of the last
digits
integers in
groups
modulus
base
-
append
d
to the end of the
group
-
while the first
digits
integers of
group
do not match the last
digits
integers of
group do until matching *end of while
-
set
v
to the last
digits
of
group
using base
base
(consider the last
digits
integers of
group
as the digits of a
digits
digit
base
base integer)
-
remove from
input
any integers that match
v
-
set
d
to the sum of the last
digits
integers in
groups
modulus
base
(add up the digits of
v
and set
d
to the modulus
base
(take the last digit))
-
append
d
to the end of the
group
-
end of while
-
after dropping the last
digits
values from
group
, append
group
as a value to
groups
-
end of while
What is the length of the longest value within the list
groups
?
The longest group is (0,1,1,2,3,5,8,3,1,4,5,9,4,3,7,0,7,7,4,1,5,6,1,7,8,5,3,8,1,9,0,9,9,8,7,5,2,7,9,6,5,1,6,7,3,0,3,3,6,9,5,4,9,3,2,5,7,2,9,1},{0,2,2,4,6,0,6,6,2,8,0,8,8,6,4,0,4,4,8,2)