Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A128204
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A128204 a(0) = 0; a(n) = a(n-1) - (2n-1) if that number is positive and not already in the sequence, otherwise a(n) = a(n-1) + (2n-1). +0
1
0, 1, 4, 9, 2, 11, 22, 35, 20, 3, 22, 43, 66, 41, 14, 43, 12, 45, 10, 47, 8, 49, 6, 51, 98, 147, 96, 149, 94, 37, 96, 157, 220, 155, 88, 19, 90, 17, 92, 15, 94, 13, 96, 181, 268, 179, 270, 177, 82, 179, 80, 181, 78, 183, 76, 185, 74, 187, 72, 189, 70, 191, 68, 193, 320 (list; graph; listen)
OFFSET

0,3

COMMENT

'Recaman transform' (see A005132) of the odd numbers.

LINKS

Nick Hobson, Python program for this sequence

Index entries for sequences related to Recaman's sequence

EXAMPLE

Consider n=7. We have a(6)=22 and try to subtract 13, the 7th odd number. The result, 9, is certainly positive, but we cannot use it because 9 is already in the sequence. So we must add 13 instead, getting a(7) = 22 + 13 = 35.

CROSSREFS

Cf. A005132, A053461, A064365, A123483.

Sequence in context: A021071 A021207 A070437 this_sequence A079049 A114578 A135044

Adjacent sequences: A128201 A128202 A128203 this_sequence A128205 A128206 A128207

KEYWORD

easy,nonn

AUTHOR

Nick Hobson (nickh(AT)qbyte.org), Feb 19 2007

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 July 23 17:35 EDT 2008. Contains 142285 sequences.


AT&T Labs Research