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 A239492 #51 Nov 08 2024 07:23:41 %S A239492 0,0,2,3,4,6,6,8,9,10,12,12,14,15,16,18,18,20,21,22,24,24,26,27,28,30, %T A239492 30,32,33,34,36,36,38,39,40,42,42,44,45,46,48,48,50,51,52,54,54,56,57, %U A239492 58,60,60,62,63,64,66,66,68,69,70,72,72,74,75,76,78,78,80,81,82,84,84,86,87,88,90,90 %N A239492 The fifth bicycle lock sequence: a(n) is the maximum value of min{x*y, (5-x)*(n-y)} over 0 <= x <= 5, 0 <= y <= n for integers x, y. %C A239492 The minimum number of turns that always suffice to open from any starting position a bicycle lock that has n-1 dials with 5 numbers on each dial. %C A239492 The minimum number of turns that always suffice to open from any starting position a bicycle lock that has 4 dials with n numbers on each dial. %C A239492 (A "turn" consists of simultaneously rotating any number of adjacent dials by one place.) %H A239492 Vincenzo Librandi, <a href="/A239492/b239492.txt">Table of n, a(n) for n = 0..1000</a> %H A239492 Robin Houston, <a href="http://math.stackexchange.com/questions/683711/symmetry-of-bicycle-lock-numbers/689228#689228">Symmetry of bicycle lock numbers</a>. %H A239492 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,1,-1). %F A239492 a(n) = max( min{x*y, (5-x)*(n-y)} | 0 <= x <= 5, 0 <= y <= n ). %F A239492 From _Ralf Stephan_, Mar 29 2014: (Start) %F A239492 a(n) = n + floor(n/5) - [n == 1 mod 5]. %F A239492 a(n) = 6*floor(n/5) + [0,0,2,3,4][n%5]. %F A239492 G.f.: (2*x^5 + x^4 + x^3 + 2*x^2)/((1-x)*(1-x^5)). (End) %F A239492 a(n) = n - 1 + floor(n/5) + ceiling((n-1)/5) - floor((n-1)/5). - _Wesley Ivan Hurt_, Mar 29 2014 %p A239492 A239492:=n->n-1+floor(n/5)+ceil((n-1)/5)-floor((n-1)/5); seq(A239492(n), n=0..50); # _Wesley Ivan Hurt_, Mar 29 2014 %t A239492 a[n_] := Max[Table[Min[x*y, (5-x)*(n-y)], {x, 0, 5}, {y, 0, n}]] %t A239492 Table[n - 1 + Floor[n/5] + Ceiling[(n - 1)/5] - Floor[(n - 1)/5], {n, 0, 50}] (* _Wesley Ivan Hurt_, Mar 29 2014 *) %t A239492 CoefficientList[Series[(2 x^5 + x^4 + x^3 + 2 x^2)/((1 - x) (1 - x^5)), {x, 0, 100}], x] (* _Vincenzo Librandi_, Mar 30 2014 *) %Y A239492 The fifth row of A238158. %K A239492 nonn,easy %O A239492 0,3 %A A239492 _Robin Houston_, Mar 23 2014