Search: id:A066949 Results 1-1 of 1 results found. %I A066949 %S A066949 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, %T A066949 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, %U A066949 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 %N A066949 Take the sum of the previous two terms, subtract n if this sum is greater than n. %H A066949 T. D. Noe, Table of n, a(n) for n=0..10000 %F A066949 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. %t A066949 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} ] %Y A066949 Cf. A000045. %Y A066949 Sequence in context: A126833 A053723 A138512 this_sequence A073481 A122556 A084346 %Y A066949 Adjacent sequences: A066946 A066947 A066948 this_sequence A066950 A066951 A066952 %K A066949 easy,nonn,nice %O A066949 0,4 %A A066949 Floor van Lamoen (fvlamoen(AT)hotmail.com), Jan 25 2002 %E A066949 Edited by Robert G. Wilson v (rgwv(AT)rgwv.com), Jan 31 2002 Search completed in 0.001 seconds