This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A351331 #28 Apr 10 2024 13:12:16 %S A351331 2,11,106,1277,18746,326587,6588338,150994937,3874204882,109999999991, %T A351331 3423740047322,115909305827317,4240251492291530,166680102383370227, %U A351331 7006302246093749986,313594649253062377457,14890324713954061755170,747581753430634213933039,39568393113206271782479562 %N A351331 a(n) = (n+1)*(n^n) - n + 1. %C A351331 Arises in studying the "Pile of pairs of coconuts (and pals)" problem. %C A351331 Motivated by a question passed along by Timothy Hunt from Kara Goeke; it is a generalization of the exercise in the first reference, which asks for a solution for n=3. For odd-indexed terms, the index may be taken as the number of participants in the circle. (The game doesn't work for even numbers of participants.) %C A351331 In the case in the exercise: there are three participants splitting a box of chocolates whose number is even. The first person takes one, notes that the remainder is divisible by three, takes 1/3 of the remaining chocolates, passes the remainder to the second person, who takes one, notes that the remainder is divisible by three, takes 1/3 of the remaining chocolates, and passes the remainder to the last person, who takes one, notes that the remainder is divisible by three, and takes 1/3 of the remainder. The number of chocolates remaining after this last division are once again divisible by three. %C A351331 The generalization that this sequence solves is that there are any odd number of people n in the circle, and that they each take 1/n of the remainder after taking their initial single item; the final number left is divisible by n as well. %C A351331 The "Pals" part is that although this only represents solutions to the problem for an odd number of participants, the formula that generates those solutions is perfectly well-behaved for even n as well, and those may as well be terms in the sequence. %C A351331 This is the same basic problem as A002021, with the further constraint that the initial number of coconuts be even. %D A351331 Mark Dugopolski, College Algebra, Addison-Wesley, 1995, page 16, exercise 123. %p A351331 seq((n+1)*(n^n)-n+1, n=1..19); # _Georg Fischer_, Apr 10 2024 %Y A351331 Cf. A002021. %K A351331 nonn,easy %O A351331 1,1 %A A351331 _Adam Thornton_, Feb 07 2022 %E A351331 Definition corrected by _Georg Fischer_, Apr 10 2024