Question 631773
I found the wording a bit confusing. However, the two interpretations I considered gave me different numbers of marbles, but the same number of marble-playing friends.
 
As written, the second to the last friend (friend number x) gets x marbles plus 1/7 of the rest. If we call that 1/7 of the rest m, friend number x gets  x+m marbles. The last friend (friend number x+1) will get the other 6/7 of that rest (6m), which would be the same amount, so 6m=x+m, and x=5m.That means Joe gave marbles to x+1=5m+1 friends. Because every one of those friends got the same 6m amount, we can calculate the total number of marbles Joe gave away as (5m+1) times (6m). Choosing m, we can calculate those numbers. For each total number of marbles, we can work out what the first, second, third, ... friends gets, and it should always be 6m. It only works for m=1. Then Joe gives 6 marbles to each of 6 friends for a total of 36 marbles given away. Counting Joe, there were {{{highlight(7)}}} friends playing marbles together.
 
At first I thought that Joe was giving away his marbles to one friend at a time, giving each friend 1/7 of what he had at the moment plus the number representing the friend's order in the giveaway (1 extra marble to the first friend, 2 to the second one, and so on).
Warning: Long explanation follows.
In that case, if Joe has {{{n}}} friends.
Let his best friend be friend number 1,
his second best friend be friend number 2, and so on,
up to his least favorite friend that would be friend number {{{n}}}.
By the time Joe gets to friend number {{{n}}} he gives him the remaining {{{R}}} marbles, which are also 1/7 of the remaining {{{R}}} marbles, plus {{{n}}}.
So {{{R=(1/7)*R+n}}}
{{{R=(1/7)*R+n}}} --> {{{7R=R+7n}}} (multiplying both sides times 7)
{{{7R=R+7n}}} --> {{{6R=7n}}} (subtracting R from both sides)
Because {{{R}}} and {{{n}}} are positive integers,
{{{R}}} must be a multiple of 7, and
{{{n}}} must be a multiple of 6.
{{{n=6}}} with {{{R=7}}} can be proved to be a solution by just checking it.
Are there any other solutions?
We know that {{{6R=7n}}} <--> {{{R=7n/6}}}.
Let's find another equation.
Joe gave up all his marbles by giving {{{R}}} marbles to each of his {{{n}}} friends.
So, he must have had {{{nR}}} marbles.
He gave 1/7 of that plus one more marble to friend number 1, and that was also {{{R}}} marbles, so
{{{(1/7)*Rn+1=R}}}
Substituting {{{R=7n/6}}}, that turns into
{{{(1/7)*(7n/6)*n+1=7n/6}}} --> {{{n^2/6+1=7n/6}}}
{{{n^2/6+1=7n/6}}} --> {{{n^2+6=7n}}} (multiplying both sides times 7)
{{{n^2+6=7n}}} --> {{{n^2-7n+6=0}}} , and that is our second equation,
which we can solve by factoring:
{{{n^2-7n+6=0}}} --> {{{(n-6)(n-1)=0}}}
The solutions to that equation are {{{n=6}}} and {{{n=1}}}
{{{n=6}}} substituted into {{{R=7n/6}}} gives {{{R=7}}}, which is very reasonable.
{{{n=1}}} substituted into {{{R=7n/6}}} gives {{{R=7/6}}}, which is not reasonable because Joe would not cut any marbles into fractions.
The only solution that works for both equations is {{{n=6}}} with {{{R=7}}}
Joe had 42 marbles and gave 7 to each of 6 friends.
Counting Joe, the whole group of marble-playing kids is made of
{{{highlight(7)}}} friends.