login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047838 Floor(n^2/2)-1. 8
1, 3, 7, 11, 17, 23, 31, 39, 49, 59, 71, 83, 97, 111, 127, 143, 161, 179, 199, 219, 241, 263, 287, 311, 337, 363, 391, 419, 449, 479, 511, 543, 577, 611, 647, 683, 721, 759, 799, 839, 881, 923, 967, 1011, 1057, 1103, 1151, 1199, 1249, 1299, 1351, 1403 (list; graph; refs; listen; history; internal format)
OFFSET

2,2

COMMENTS

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.

Comment from Dmitry Kamenetsky (Dmitry.Kamenetsky(AT)rsise.anu.edu.au), Nov 29 2006: 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:

10111

10101

10101

10001

11111

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 [From Ashutosh Mehra (ashutoshmehra(AT)gmail.com), Dec 06 2008]

LINKS

Graham Cormode, Notes on the organization number of a permutation.

Index to sequences with linear recurrences with constant coefficients, signature (2,0,-2,1).

Reinhard Zumkeller, Table of n, a(n) for n = 2..10000

FORMULA

a(2)=1; for n>2, a(n) = a(n-1)+n-1+(n-1 mod 2). - Benoit Cloitre, Jan 12 2003

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.

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

G.f.: x^2(1+x+x^2-x^3)/((1-x)^3*(1+x)). - R. J. Mathar, Sep 09 2008

a(n) = floor((n^2+4*n+2)/2). - Gary Detlefs, Feb 10 2010

a(n) = abs(A188653(n)). - Reinhard Zumkeller, Apr 13 2011

a(n) = (2*n^2+(-1)^n-5)/4. - Bruno Berselli, Sep 14 2011

MAPLE

seq(floor((n^2+4*n+2)/2), n=0..20) [From Gary Detlefs, Feb 10 2010]

MATHEMATICA

Table[ Floor[n^2/2] - 1, {n, 2, 60}] (* Robert G. Wilson v, Aug 31 2006 *)

PROG

(PARI) a(n)=n^2\2-1

CROSSREFS

Complement of A047839. Also A007590 - 1. First differences give A052928.

Cf. A135151, A135152.

Sequence in context: A184856 A023234 A134707 * A188653 A180452 A029715

Adjacent sequences:  A047835 A047836 A047837 * A047839 A047840 A047841

KEYWORD

nonn,easy

AUTHOR

Michael Somos

EXTENSIONS

Edited by Charles R Greathouse IV, Apr 23 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 06:27 EST 2012. Contains 205998 sequences.