Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A010751
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A010751 Up 1, down 2, up 3, down 4, ... +0
1
0, 1, 0, -1, 0, 1, 2, 1, 0, -1, -2, -1, 0, 1, 2, 3, 2, 1, 0, -1, -2, -3, -2, -1, 0, 1, 2, 3, 4, 3, 2, 1, 0, -1, -2, -3, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -5, -4 (list; graph; listen)
OFFSET

0,7

FORMULA

a(n)=x+1-(sign(x(2x+1)-y(2y+1)))*(n-2x^2-3x-1) where x=floor((-1-sqrt(1+8n))/4), y=-floor((1-sqrt(1+8n))/4), sign(x)=abs(x)/x when x is not 0, and sign(0)=0, floor(x)=the greatest integer less than or equal to x, sqrt(x)=the principal square root of x, and abs(x)=the absolute value (or magnitude) of x. - Mark E. Spindler (loqstuy0(AT)hotmail.com), Mar 25 2004

MATHEMATICA

n=(the index); x = -1; y = 0; While[n != 0, While[y != x && n != 0, y--; n-- ]; While[y != -x && n != 0, n--; y++ ]; x-- ]; Print[ -y] provided by Gregory Puleo n = (the index); a = Floor[(-1 - Sqrt[1 + 8* n])/4]; b = -Floor[(1 - Sqrt[1 + 8*n])/4]; a + 1 - Sign[a*(2*a + 1) - b*(2*b + 1)]*(n - 2*a^2 - 3*a - 1) provided by Mark Spindler

CROSSREFS

Sequence in context: A118822 A054848 A065368 this_sequence A029370 A106262 A025870

Adjacent sequences: A010748 A010749 A010750 this_sequence A010752 A010753 A010754

KEYWORD

sign

AUTHOR

David Berends (dave(AT)pgt.com)

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research