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 A047838 #122 Feb 16 2025 08:32:39 %S A047838 1,3,7,11,17,23,31,39,49,59,71,83,97,111,127,143,161,179,199,219,241, %T A047838 263,287,311,337,363,391,419,449,479,511,543,577,611,647,683,721,759, %U A047838 799,839,881,923,967,1011,1057,1103,1151,1199,1249,1299,1351,1403 %N A047838 a(n) = floor(n^2/2) - 1. %C A047838 Define the organization number of a permutation pi_1, pi_2, ..., pi_n to be the following. Start at 1, count the steps to reach 2, then the steps to reach 3, etc. Add them up. Then the maximal value of the organization number of any permutation of [1..n] for n = 0, 1, 2, 3, ... is given by 0, 1, 3, 7, 11, 17, 23, ... (this sequence). This was established by Graham Cormode (graham(AT)research.att.com), Aug 17 2006, see link below, answering a question raised by Tom Young (mcgreg265(AT)msn.com) and _Barry Cipra_, Aug 15 2006 %C A047838 From _Dmitry Kamenetsky_, Nov 29 2006: (Start) %C A047838 This is the length of the longest non-self-intersecting spiral drawn on an n X n grid. E.g., for n=5 the spiral has length 17: %C A047838 1 0 1 1 1 %C A047838 1 0 1 0 1 %C A047838 1 0 1 0 1 %C A047838 1 0 0 0 1 %C A047838 1 1 1 1 1 (End) %C A047838 It appears that a(n+1) is the maximum number of consecutive integers (beginning with 1) that can be placed, one after another, on an n-peg Towers of Hanoi, such that the sum of any two consecutive integers on any peg is a square. See the problem: http://online-judge.uva.es/p/v102/10276.html. - _Ashutosh Mehra_, Dec 06 2008 %C A047838 a(n) = number of (w,x,y) with all terms in {0,...,n} and w = |x+y-w|. - _Clark Kimberling_, Jun 11 2012 %C A047838 The same sequence also represents the solution to the "pigeons problem": maximal value of the sum of the lengths of n-1 line segments (connected at their end-points) required to pass through n trail dots, with unit distance between adjacent points, visiting all of them without overlaping two or more segments. In this case, a(0)=0, a(1)=1, a(2)=3, and so on. - _Marco Ripà_, Jan 28 2014 %C A047838 Also the longest path length in the n X n white bishop graph. - _Eric W. Weisstein_, Mar 27 2018 %C A047838 a(n) is the number of right triangles with sides n*(h-floor(h)), floor(h) and h, where h is the hypotenuse. - _Andrzej Kukla_, Apr 14 2021 %H A047838 Reinhard Zumkeller, <a href="/A047838/b047838.txt">Table of n, a(n) for n = 2..10000</a> %H A047838 Laurent Bulteau, Samuele Giraudo and Stéphane Vialette, <a href="http://igm.univ-mlv.fr/~giraudo/Data/Papers/Disorders%20and%20permutations.pdf">Disorders and permutations </a>, 32nd Annual Symposium on Combinatorial Pattern Matching (CPM 2021). Article No. 18; pp. 18:1-18:14. %H A047838 Graham Cormode, <a href="/A047838/a047838.txt">Notes on the organization number of a permutation</a>. %H A047838 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LongestPathProblem.html">Longest Path Problem</a>. %H A047838 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/WhiteBishopGraph.html">White Bishop Graph</a>. %H A047838 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1). %F A047838 a(2)=1; for n > 2, a(n) = a(n-1) + n - 1 + (n-1 mod 2). - _Benoit Cloitre_, Jan 12 2003 %F A047838 a(n) = T(n-1) + floor(n/2) - 1 = T(n) - floor((n+3)/2), where T(n) is the n-th triangular number (A000217). - _Robert G. Wilson v_, Aug 31 2006 %F A047838 Equals (n-1)-th row sums of triangles A134151 and A135152. Also, = binomial transform of [1, 2, 2, -2, 4, -8, 16, -32, ...]. - _Gary W. Adamson_, Nov 21 2007 %F A047838 G.f.: x^2*(1+x+x^2-x^3)/((1-x)^3*(1+x)). - _R. J. Mathar_, Sep 09 2008 %F A047838 a(n) = floor((n^2 + 4*n + 2)/2). - _Gary Detlefs_, Feb 10 2010 %F A047838 a(n) = abs(A188653(n)). - _Reinhard Zumkeller_, Apr 13 2011 %F A047838 a(n) = (2*n^2 + (-1)^n - 5)/4. - _Bruno Berselli_, Sep 14 2011 %F A047838 a(n) = a(-n) = A007590(n) - 1. %F A047838 a(n) = A080827(n) - 2. - _Kevin Ryde_, Aug 24 2013 %F A047838 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n > 4. - _Wesley Ivan Hurt_, Aug 06 2015 %F A047838 a(n) = A000217(n-1) + A004526(n-2), for n > 1. - _J. Stauduhar_, Oct 20 2017 %F A047838 From _Guenther Schrack_, May 12 2018: (Start) %F A047838 Set a(0) = a(1) = -1, a(n) = a(n-2) + 2*n - 2 for n > 1. %F A047838 a(n) = A000982(n-1) + n - 2 for n > 1. %F A047838 a(n) = 2*A033683(n) - 3 for n > 1. %F A047838 a(n) = A061925(n-1) + n - 3 for n > 1. %F A047838 a(n) = A074148(n) - n - 1 for n > 1. %F A047838 a(n) = A105343(n-1) + n - 4 for n > 1. %F A047838 a(n) = A116940(n-1) - n for n > 1. %F A047838 a(n) = A179207(n) - n + 1 for n > 1. %F A047838 a(n) = A183575(n-2) + 1 for n > 2. %F A047838 a(n) = A265284(n-1) - 2*n + 1 for n > 1. %F A047838 a(n) = 2*A290743(n) - 5 for n > 1. (End) %F A047838 E.g.f.: 1 + x + ((x^2 + x - 2)*cosh(x) + (x^2 + x - 3)*sinh(x))/2. - _Stefano Spezia_, May 06 2021 %F A047838 Sum_{n>=2} 1/a(n) = 3/2 + tan(sqrt(3)*Pi/2)*Pi/(2*sqrt(3)) - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)). - _Amiram Eldar_, Sep 15 2022 %e A047838 x^2 + 3*x^3 + 7*x^4 + 11*x^5 + 17*x^6 + 23*x^7 + 31*x^8 + 39*x^9 + 49*x^10 + ... %p A047838 seq(floor((n^2+4*n+2)/2), n=0..20) # _Gary Detlefs_, Feb 10 2010 %t A047838 Table[Floor[n^2/2] - 1, {n, 2, 60}] (* _Robert G. Wilson v_, Aug 31 2006 *) %t A047838 LinearRecurrence[{2, 0, -2, 1}, {1, 3, 7, 11}, 60] (* _Harvey P. Dale_, Jan 16 2015 *) %t A047838 Floor[Range[2, 20]^2/2] - 1 (* _Eric W. Weisstein_, Mar 27 2018 *) %t A047838 Table[((-1)^n + 2 n^2 - 5)/4, {n, 2, 20}] (* _Eric W. Weisstein_, Mar 27 2018 *) %t A047838 CoefficientList[Series[(-1 - x - x^2 + x^3)/((-1 + x)^3 (1 + x)), {x, 0, 20}], x] (* _Eric W. Weisstein_, Mar 27 2018 *) %o A047838 (PARI) a(n) = n^2\2 - 1 %o A047838 (Magma) [Floor(n^2/2)-1 : n in [2..100]]; // _Wesley Ivan Hurt_, Aug 06 2015 %Y A047838 Complement of A047839. First difference is A052928. %Y A047838 Cf. A000217, A007590, A080827, A134151, A135151, A135152, A188653. %Y A047838 Partial sums: A213759(n-1) for n > 1. - _Guenther Schrack_, May 12 2018 %K A047838 nonn,easy %O A047838 2,2 %A A047838 _Michael Somos_, May 07 1999 %E A047838 Edited by _Charles R Greathouse IV_, Apr 23 2010