Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A066949
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A066949 Take the sum of the previous two terms, subtract n if this sum is greater than n. +0
1
0, 1, 1, 2, 3, 5, 2, 7, 1, 8, 9, 6, 3, 9, 12, 6, 2, 8, 10, 18, 8, 5, 13, 18, 7, 25, 6, 4, 10, 14, 24, 7, 31, 5, 2, 7, 9, 16, 25, 2, 27, 29, 14, 43, 13, 11, 24, 35, 11, 46, 7, 2, 9, 11, 20, 31, 51, 25, 18, 43, 1, 44, 45, 26, 7, 33, 40, 6, 46, 52, 28, 9, 37, 46, 9, 55, 64, 42, 28, 70, 18 (list; graph; listen)
OFFSET

0,4

LINKS

T. D. Noe, Table of n, a(n) for n=0..10000

FORMULA

a(n) = a(n-1)+a(n-2)-n if a(n-1)+a(n-2)>n, a(n) = a(n-1)+a(n-2) otherwise; a(0) = 0, a(1) = 1.

MATHEMATICA

a[0] = 0; a[1] = 1; a[n_] := a[n] = Block[ {b = a[n - 1] + a[n - 2]}, If[b > n, Return[b - n], Return[b]]]; Table[a[n], {n, 0, 80} ]

CROSSREFS

Cf. A000045.

Adjacent sequences: A066946 A066947 A066948 this_sequence A066950 A066951 A066952

Sequence in context: A126833 A053723 A138512 this_sequence A073481 A122556 A084346

KEYWORD

easy,nonn,nice

AUTHOR

Floor van Lamoen (fvlamoen(AT)hotmail.com), Jan 25 2002

EXTENSIONS

Edited by Robert G. Wilson v (rgwv(AT)rgwv.com), Jan 31 2002

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 November 8 20:39 EST 2009. Contains 166234 sequences.


AT&T Labs Research