Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A096062
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A096062 a(1) = a(2) = 1; for n > 2, if a(n-2) + a(n-1) > n then a(n) = abs(a(n-2) - a(n-1)) else a(n) = a(n-2) + a(n-1). +0
1
1, 1, 2, 3, 5, 2, 7, 5, 2, 7, 9, 2, 11, 13, 2, 15, 17, 2, 19, 17, 2, 19, 21, 2, 23, 25, 2, 27, 29, 2, 31, 29, 2, 31, 33, 2, 35, 37, 2, 39, 41, 2, 43, 41, 2, 43, 45, 2, 47, 49, 2, 51, 53, 2, 55, 53, 2, 55, 57, 2, 59, 61, 2, 63, 65, 2, 67, 65, 2, 67, 69, 2, 71, 73, 2, 75, 77, 2, 79, 77, 2 (list; graph; listen)
OFFSET

1,3

COMMENT

For n > 1: a(n) = 2 if n mod 12 = {0,3,6,9}, a(n) = n if n mod 12 = {5,7}, a(n) = n-1 if n mod 12 = {2,4}, a(n) = n-2 if n mod 12 = {1,11}, a(n) = n-3 if n mod 12 = {8,10}. - Klaus Brockhaus, Jun 19 2004

EXAMPLE

a(8) + a(9) = 5 + 2 = 7 < 10, so a(10) = 7. a(16) + a(17) = 15 + 17 = 32 > 18, so a(18) = abs(15 - 17) = 2.

PROGRAM

(PARI) m=81; print1(a=1, ", ", b=1, ", "); for(n=3, m, print1(c=if(a+b>n, abs(a-b), a+b), ", "); a=b; b=c)

CROSSREFS

Sequence in context: A073481 A122556 A084346 this_sequence A069227 A117368 A137826

Adjacent sequences: A096059 A096060 A096061 this_sequence A096063 A096064 A096065

KEYWORD

nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jun 18 2004

EXTENSIONS

Edited, corrected and extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 19 2004

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