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 A254029 #60 Apr 17 2025 01:56:48 %S A254029 15621,31246,46871,62496,78121,93746,109371,124996,140621,156246, %T A254029 171871,187496,203121,218746,234371,249996,265621,281246,296871, %U A254029 312496,328121,343746,359371,374996,390621,406246,421871,437496,453121,468746 %N A254029 Positive solutions of Monkey and Coconuts Problem for the classic case (5 sailors, 1 coconut to the monkey): a(n) = 15625*n - 4 for n >= 1. %C A254029 The sequence lists the numbers of coconuts originally collected on a pile. This is the case s=5, c=1 in the general formula b(n) = n*s^(s+1) - c*(s-1). %C A254029 {a(n) = 5^6*n - 4}_{n>=1} gives the positive solutions to the following problem: co(k) = (4/5)*(co(k-1) - 1), for k >= 0, with co(0) = a, and the requirement c0(5) - 1 == 0 (mod 5). This gives co(5) - 1 = (2^10*a - 7*3^3*61)/5^5, with a = a(n), n >= 1. See a formula below. - Richard S. Fischer and _Wolfdieter Lang_, Jun 01 2023 %D A254029 Charles S. Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, 1966, pages 52-54. %D A254029 Miodrag S. Petković, "The sailors, the coconuts, and the monkey", Famous Puzzles of Great Mathematicians, Amer. Math. Soc.(AMS), 2009, pages 52-56. %H A254029 Luciano Ancora, <a href="/A254029/b254029.txt">Table of n, a(n) for n = 1..1000</a> %H A254029 Umberto Cerruti, <a href="http://share.dschola.it/helpmat/Divertimenti/divertiamoci1.html#sol3.3">Marinai e noci di cocco</a>, Divertiamoci con la Matematica (in Italian) %H A254029 Santo D'Agostino, <a href="https://fomap.org/2011/05/13/the-coconut-problem/">"The Coconut Problem"; Updated With Solution</a>, May 2011. %H A254029 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MonkeyandCoconutProblem.html">Monkey and Coconut Problem</a> %H A254029 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1). %F A254029 G.f.: x*(15621 + 4*x)/(1 - x)^2. %F A254029 a(n) = 2*a(n-1) - a(n-2) = a(n-1) + 15625, with a(0) = -4 and a(-1) = -(4 + 5^6). a(n) = 5^6*n - 4. %F A254029 a(n) = (15*c(n) + 11) + 265*(c(n) + 1)/2^10, with c(n) = A158421(n) = 2^10*n - 1, for n >= 1. - Richard S. Fischer and _Wolfdieter Lang_, Jun 01 2023 %t A254029 s = 5; c = 1; Table[n s^(s + 1) - c (s - 1), {n, 1, 30}] (* or *) %t A254029 CoefficientList[Series[(15621 + 4 x)/(-1 + x)^2, {x, 0, 29}], x] %o A254029 (Python 3.x) %o A254029 seq=[] %o A254029 for x in range (1,1000000): %o A254029 total_c,i = x,1 %o A254029 while i < 6: %o A254029 if (total_c)%5 == 1: %o A254029 total_c = total_c - (total_c)//5 -1 %o A254029 if i == 5: %o A254029 #print (x,total_c) %o A254029 break %o A254029 i += 1 %o A254029 if total_c%5 == 1: %o A254029 seq.append(x) %o A254029 # _Glen Gilchrist_, Jan 28 2023 %Y A254029 Cf. A002021, A002022, A006091, A014293, A085283, A085606, A158421. %K A254029 nonn,easy %O A254029 1,1 %A A254029 _Luciano Ancora_, Mar 14 2015