|
|
A099564
|
|
a(0) = 0; for n > 0, a(n) = final nonzero number in the sequence n, f(n,2), f(f(n,2),3), f(f(f(n,2),3),4),..., where f(n,d)=Floor(n/F(d+1)), with F denoting the Fibonacci numbers (A000045).
|
|
6
|
|
|
0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Records in {a(n)} are given in A099565.
|
|
LINKS
|
|
|
PROG
|
(Scheme)
(define (A099564 n) (let loop ((n n) (i 3)) (let* ((f (A000045 i)) (dig (modulo n f)) (next-n (/ (- n dig) f))) (if (zero? next-n) dig (loop next-n (+ 1 i))))))
;; Standalone version:
(define (A099564 n) (let loop ((n n) (f1 1) (f2 2)) (let* ((dig (modulo n f2)) (next-n (/ (- n dig) f2))) (if (zero? next-n) dig (loop next-n f2 (+ f1 f2))))))
|
|
CROSSREFS
|
Differs from A099563 for the first time at n=24.
Differs from A276153 for the first time at n=210, where a(210)=7, while A276153(210)=1.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|