%I #17 Aug 20 2023 10:47:43
%S 196417,271442,300099,311045,315226,316823,317433,317666,317755,
%T 317789,317802,317807,317809,317810,392835,421492,432438,436619,
%U 438216,438826,439059,439148,439182,439195,439200,439202,439203,467860,478806,482987
%N Numbers k that have 13 terms in their Zeckendorf representation.
%C A007895(a(n)) = 13. - _Reinhard Zumkeller_, Mar 10 2013
%H Reinhard Zumkeller, <a href="/A179253/b179253.txt">Table of n, a(n) for n = 1..1000</a>
%e 196417 = 1 + 3 + 8 + 21 + 55 + 144 + 377 + 987 + 2584 + 6765 + 17711 + 46368 + 121393;
%e 271442 = 1 + 3 + 8 + 21 + 55 + 144 + 377 + 987 + 2584 + 6765 + 17711 + 46368 + 196418;
%p with(combinat): seq(add(fibonacci(2*k), k = 1 .. 13-m)+add(fibonacci(27-2*k+2), k = 1 .. m), m = 0 .. 13); # this program yields only the first 14 terms of the sequence
%p From _R. J. Mathar_, Jul 23 2010: (Start)
%p Lzto10 := proc(L) local i ; add( op(i,L)*combinat[fibonacci](i+1),i=1..nops(L) ) ; end proc:
%p zbits := proc(numbits,toset,upbits) local L,hibi ; if 2*toset-1 > numbits then return ; end if; if toset = 0 then L := [(seq(0,i=1..numbits)),op(upbits)] ; Lzto10(L); print(%) ; else for hibi from toset-1 to numbits -1 do if toset = 1 then procname(hibi,toset-1,[1,seq(0,i=1..numbits-hibi-1),op(upbits)]) ; else procname(hibi-1,toset-1,[0,1,seq(0,i=1..numbits-hibi-1),op(upbits)]) ; end if; end do; end if; return ; end proc:
%p ztot := 13 : for numbits from 2*ztot -1 to 50 do zbits(numbits-2,ztot-1,[0,1]) ; end do: (End)
%t Reap[For[m = 0; k = 1, k <= 10^8, k++, If[BitAnd[k, 2 k] == 0, m++; If[DigitCount[k, 2, 1] == 13, Print[m]; Sow[m]]]]][[2, 1]] (* _Jean-François Alcover_, Aug 20 2023 *)
%o (Haskell)
%o a179253 n = a179253_list !! (n-1)
%o a179253_list = filter ((== 13) . a007895) [1..]
%o -- _Reinhard Zumkeller_, Mar 10 2013
%Y Cf. A035517, A007895, A179242, A179243, A179244, A179245, A179246, A179247, A179248, A179249, A179250, A179251, A179252.
%K nonn
%O 1,1
%A _Emeric Deutsch_, Jul 05 2010
%E More terms from _R. J. Mathar_, Jul 23 2010
|