login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002022 In the pile of coconuts problem, the number of coconuts that remain to be shared equally at the end of the process.
(Formerly M4305 N1800)
4
0, 6, 240, 1020, 78120, 279930, 40353600, 134217720, 31381059600, 99999999990, 34522712143920, 106993205379060, 51185893014090744, 155568095557812210, 98526125335693359360, 295147905179352825840, 239072435685151324847136 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
See A002021 for further description of the problem.
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Anonymous, The Monkey and the Coconuts (with FormulaOne program)
R. S. Underwood and Robert E. Moritz, Problem 3242, Amer. Math. Monthly, 35 (1928), 47-48.
MAPLE
f := proc(n) if n mod 2 = 1 then RETURN((n-1)^n-(n-1)) else RETURN((n-1)^(n+1)-(n-1)) fi; end:
MATHEMATICA
Rest[Table[If[OddQ[n], (n-1)^n-(n-1), (n-1)^(n+1)-(n-1)], {n, 30}]] (* Harvey P. Dale, Oct 21 2011 *)
CROSSREFS
Sequence in context: A235346 A077231 A172965 * A065948 A367776 A052510
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Formula and more terms from James A. Sellers, Feb 10 2000
Detail added to the name by Peter Munn, Jun 16 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)