login
Zeckendorf-Niven numbers: numbers divisible by the number of terms in their Zeckendorf representation (A007895).
39

%I #8 Oct 25 2019 09:58:43

%S 1,2,3,4,5,6,8,10,12,13,14,16,18,21,22,24,26,27,30,34,36,42,45,48,55,

%T 56,58,60,66,68,69,72,76,78,80,81,84,89,90,92,93,94,96,99,102,105,108,

%U 110,111,116,120,126,132,135,140,144,146,150,152,153,156,159,162

%N Zeckendorf-Niven numbers: numbers divisible by the number of terms in their Zeckendorf representation (A007895).

%D Andrew Ray, On the natural density of the k-Zeckendorf Niven numbers, Ph.D. dissertation, Central Missouri State University, 2005.

%H Robert Israel, <a href="/A328208/b328208.txt">Table of n, a(n) for n = 1..10000</a>

%H Helen G. Grundman, <a href="https://www.fq.math.ca/Papers1/45-3/grundman.pdf">Consecutive Zeckendorf-Niven and lazy-Fibonacci-Niven numbers</a>, Fibonacci Quarterly, Vol. 45, No. 3 (2007), pp. 272-276.

%H Andrew Ray and Curtis Cooper, <a href="http://cs.ucmo.edu/~cnc8851/articles/kzeckniven.pdf">On the natural density of the k-Zeckendorf Niven numbers</a>, J. Inst. Math. Comput. Sci. Math., Vol. 19 (2006), pp. 83-98.

%e 12 is in the sequence since A007895(12) = 3 and 3 is a divisor of 12.

%p fib:= combinat:-fibonacci:

%p phi:= 1/2 + sqrt(5)/2:

%p fibapp:= n -> phi^n/sqrt(5):

%p invfib := proc(x::posint)

%p local q, n;

%p q:= evalf((ln(x+1/2) + ln(5)/2)/ln(phi));

%p n:= floor(q);

%p if fib(n) <= x then

%p while fib(n+1) <= x do

%p n := n+1

%p end do

%p else

%p while fib(n) > x do

%p n := n-1

%p end do

%p end if;

%p n

%p end proc:

%p zeck:= proc(x) local n;

%p if x = 0 then 0

%p else

%p n:= invfib(x);

%p F[n] + zeck(x-fib(n));

%p fi

%p end proc:

%p filter:= n -> n mod nops(zeck(n)) = 0:

%p select(filter, [$1..200]); # _Robert Israel_, Oct 25 2019

%t z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; aQ[n_] := Divisible[n, z[n]]; Select[Range[1000], aQ] (* after _Alonso del Arte_ at A007895 *)

%Y Cf. A005349, A007895.

%K nonn

%O 1,2

%A _Amiram Eldar_, Oct 07 2019