login
A066628
a(n) = n - the largest Fibonacci number <= n.
6
0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
OFFSET
0,8
LINKS
FORMULA
a(n) = n - A087172(n). - Michel Marcus, Feb 02 2016
MATHEMATICA
f[n_] := Block[{k = 1}, While[Fibonacci[k] <= n, k++ ]; Return[n - Fibonacci[k - 1]]]; Table[ f[n], {n, 0, 100} ]
PROG
(PARI) { k=0; f=0; for (n=0, 1000, while (f <= n, s=f; k++; f=fibonacci(k)); write("b066628.txt", n, " ", n - s) ) } \\ Harry J. Smith, Mar 14 2010
CROSSREFS
Sequence in context: A049260 A273294 A053186 * A255120 A218601 A350603
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Dec 25 2001
EXTENSIONS
Corrected and extended by Robert G. Wilson v, Dec 28 2001
STATUS
approved