cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A099564 #19 Aug 23 2016 12:39:31
%S A099564 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,
%T A099564 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,
%U A099564 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
%N 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).
%C A099564 Records in {a(n)} are given in A099565.
%C A099564 a(n) gives the most significant digit of n when written in "base A003266", like A099563 and A276153 give the most significant digit in bases A000142 and A002110 respectively. - _Antti Karttunen_, Aug 23 2016
%H A099564 Antti Karttunen, <a href="/A099564/b099564.txt">Table of n, a(n) for n = 0..3120</a>
%o A099564 (Scheme)
%o A099564 (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))))))
%o A099564 ;; Standalone version:
%o A099564 (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))))))
%o A099564 ;; _Antti Karttunen_, Aug 23 2016
%Y A099564 Cf. A000045, A003266, A099565 (positions of records).
%Y A099564 Differs from A099563 for the first time at n=24.
%Y A099564 Differs from A276153 for the first time at n=210, where a(210)=7, while A276153(210)=1.
%K A099564 nonn
%O A099564 0,5
%A A099564 _John W. Layman_, Oct 22 2004
%E A099564 a(0) = 0 prepended and the name corrected by _Antti Karttunen_, Aug 23 2016