login
Zeckendorf-Niven numbers (A328208) k such that m = k/z(k) and m/z(m) are also Zeckendorf-Niven numbers, where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k.
5

%I #7 Oct 20 2024 13:55:40

%S 1,2,3,4,5,6,8,10,12,13,16,21,24,26,30,34,42,48,55,60,68,78,89,110,

%T 120,126,144,178,180,192,204,233,243,264,270,288,300,312,324,330,360,

%U 377,466,480,534,540,576,600,610,621,672,720,754,768,864,987,1020,1056

%N Zeckendorf-Niven numbers (A328208) k such that m = k/z(k) and m/z(m) are also Zeckendorf-Niven numbers, where z(k) = A007895(k) is the number of terms in the Zeckendorf representation of k.

%H Amiram Eldar, <a href="/A377210/b377210.txt">Table of n, a(n) for n = 1..10000</a>

%e 24 is a term since 24/z(24) = 12, 12/z(12) = 4 and 4/z(4) = 2 are all integers.

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

%t q[k_] := Module[{z = zeck[k], z2, m, n}, IntegerQ[m = k/z] && Divisible[m, z2 = zeck[m]] && Divisible[n = m/z2, zeck[n]]]; Select[Range[1000], q]

%o (PARI) zeck(n) = if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s) \\ _Charles R Greathouse IV_ at A007895

%o is(k) = {my(z = zeck(k), z2, m); if(k % z, return(0)); m = k/z; z2 = zeck(m); !(m % z2) && !((m/z2) % zeck(m/z2)); }

%Y Cf. A000045 (a subsequence), A007895, A376617 (binary analog).

%Y Subsequence of A328208 and A377209.

%K nonn,easy,base

%O 1,2

%A _Amiram Eldar_, Oct 20 2024