0, 1, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 2, 2, 2, 3, 3, 4, 3, 3, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 1, 2, 2, 3, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 3, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1
Offset: 0
For n=23 ("321" in factorial base representation, A007623), all the digits are maximal for their positions (they occur on the "maximal slope"), thus there is only one distinct digit slope present and a(23)=1. Also, for the 23rd permutation in the ordering A060117, [2341], there is just one drop, as p[4] = 1 < 4.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the maximal slope, while the most significant 1 is on the "sub-sub-sub-maximal", thus there are two occupied slopes in total, and a(29) = 2. In the 29th permutation of A060117, [23154], there are two drops as p[3] = 1 < 3 and p[5] = 4 < 5.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the submaximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, and a(37) = 3. In the 37th permutation of A060117, [51324], there are three drops at indices 2, 4 and 5.
A055778
Number of 1's in the base-phi representation of n.
Original entry on oeis.org
0, 1, 2, 2, 3, 3, 3, 2, 3, 4, 4, 5, 4, 4, 4, 5, 4, 4, 2, 3, 4, 4, 5, 5, 5, 4, 5, 6, 6, 7, 5, 5, 5, 6, 5, 5, 4, 5, 6, 6, 7, 5, 5, 5, 6, 5, 5, 2, 3, 4, 4, 5, 5, 5, 4, 5, 6, 6, 7, 6, 6, 6, 7, 6, 6, 4, 5, 6, 6, 7, 7, 7, 6, 7, 8, 8, 9, 6, 6, 6, 7, 6, 6, 5, 6, 7, 7, 8, 6, 6, 6, 7, 6, 6, 4, 5, 6, 6, 7, 7, 7, 6, 7, 8, 8
Offset: 0
Robert Lozyniak (11(AT)onna.com), Jul 12 2000
The phi-expansions for n<=15 are:
n phi-rep(n) a(n)
0 0. 0
1 1. 1
2 10.01 2
3 100.01 2
4 101.01 3
5 1000.1001 3
6 1010.0001 3
7 10000.0001 2
8 10001.0001 3
9 10010.0101 4
10 10100.0101 4
11 10101.0101 5
12 100000.101001 4
13 100010.001001 4
14 100100.001001 4
15 100101.001001 5
- _Joerg Arndt_, Jan 30 2012
- Carmine Suriano, Table of n, a(n) for n = 0..5000
- Michel Dekking, Points of increase of the sum of digits function of the base phi expansion, arXiv:2003.14125 [math.CO], 2020.
- F. Michel Dekking, The sum of digits functions of the Zeckendorf and the base phi expansions, Theoretical Computer Science, 2021.
- Ron Knott, Using Powers of Phi to represent Integers (Base Phi) (inspiration for this sequence).
- Jeffrey Shallit, Proving Properties of phi-Representations with the Walnut Theorem-Prover, arXiv:2305.02672 [math.NT], 2023.
- Eric Weisstein's World of Mathematics, Phi Number System
-
nn = 100; len = 2*Ceiling[Log[GoldenRatio, nn]]; Table[d = RealDigits[n, GoldenRatio, len]; Total[d[[1]]], {n, 0, nn}] (* T. D. Noe, May 20 2011 *)
-
constant (float): phi=(sqrt(5)+1)/2; function: lphi(x)=log(x)/log(phi); variable (float): rem=n; variable (integer): count=0; loop: while rem>0 {rem=rem-phi^floor[lphi(rem)]; count++;} result: return count; // Henry Bottomley, Aug 04 2000
A179242
Numbers that have two terms in their Zeckendorf representation.
Original entry on oeis.org
4, 6, 7, 9, 10, 11, 14, 15, 16, 18, 22, 23, 24, 26, 29, 35, 36, 37, 39, 42, 47, 56, 57, 58, 60, 63, 68, 76, 90, 91, 92, 94, 97, 102, 110, 123, 145, 146, 147, 149, 152, 157, 165, 178, 199, 234, 235, 236, 238, 241, 246, 254, 267, 288, 322, 378, 379, 380, 382, 385, 390
Offset: 1
4 = 1+3;
6 = 1+5;
7 = 2+5;
9 = 1+8;
10 = 2+8;
Cf.
A035517,
A007895,
A179243,
A179244,
A179245,
A179246,
A179247,
A179248,
A179249,
A179250,
A179251,
A179252,
A179253.
-
import Data.List (inits)
a179242 n = a179242_list !! (n-1)
a179242_list = concatMap h $ drop 3 $ inits $ drop 2 a000045_list where
h is = reverse $ map (+ f) fs where
(f:_:fs) = reverse is
-- Reinhard Zumkeller, Mar 10 2013
-
with(combinat): B := proc (n) local A, ct, m, j: A := proc (n) local i; for i while fibonacci(i) <= n do n-fibonacci(i) end do end proc: ct := 0: m := n: for j while 0 < A(m) do ct := ct+1: m := A(m) end do: ct+1 end proc: Q := {}: for i from fibonacci(5)-1 to 400 do if B(i) = 2 then Q := `union`(Q, {i}) else end if end do: Q;
-
f[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); z[n_] := If[n == 0, 0, r = n; s = {}; fr = f[n]; While[r > 0, lf = Last[fr]; If[lf <= r, r = r - lf; PrependTo[s, lf]]; fr = Drop[fr, -1]]; s]; Select[ Range[400], Length[z[#]] == 2 &] (* Jean-François Alcover, Sep 27 2011 *)
zeck = DigitCount[Select[Range[5000], BitAnd[#, 2*#] == 0&], 2, 1];
Position[zeck, 2] // Flatten (* Jean-François Alcover, Jan 25 2018 *)
-
from math import comb, isqrt
from sympy import fibonacci
def A179242(n): return fibonacci((m:=isqrt(n<<3)+1>>1)+3)+fibonacci(n+1-comb(m, 2)) # Chai Wah Wu, Apr 09 2025
A179253
Numbers k that have 13 terms in their Zeckendorf representation.
Original entry on oeis.org
196417, 271442, 300099, 311045, 315226, 316823, 317433, 317666, 317755, 317789, 317802, 317807, 317809, 317810, 392835, 421492, 432438, 436619, 438216, 438826, 439059, 439148, 439182, 439195, 439200, 439202, 439203, 467860, 478806, 482987
Offset: 1
196417 = 1 + 3 + 8 + 21 + 55 + 144 + 377 + 987 + 2584 + 6765 + 17711 + 46368 + 121393;
271442 = 1 + 3 + 8 + 21 + 55 + 144 + 377 + 987 + 2584 + 6765 + 17711 + 46368 + 196418;
Cf.
A035517,
A007895,
A179242,
A179243,
A179244,
A179245,
A179246,
A179247,
A179248,
A179249,
A179250,
A179251,
A179252.
-
a179253 n = a179253_list !! (n-1)
a179253_list = filter ((== 13) . a007895) [1..]
-- Reinhard Zumkeller, Mar 10 2013
-
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
From R. J. Mathar, Jul 23 2010: (Start)
Lzto10 := proc(L) local i ; add( op(i,L)*combinat[fibonacci](i+1),i=1..nops(L) ) ; end proc:
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:
ztot := 13 : for numbits from 2*ztot -1 to 50 do zbits(numbits-2,ztot-1,[0,1]) ; end do: (End)
-
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 *)
A116543
Number of terms in greedy representation of n in terms of the Lucas numbers.
Original entry on oeis.org
0, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 2, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 1, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 2, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 2
Offset: 0
-
s = Reverse[Sort[Table[LucasL[n - 1], {n, 1, 22}]]];
t = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]][[2,1]], # > 0 &]] &, Range[1000]] (* Peter J. C. Moses, Oct 18 2012 *)
A135817
Length of Wythoff representation of n.
Original entry on oeis.org
1, 1, 2, 3, 2, 4, 3, 3, 5, 4, 4, 4, 3, 6, 5, 5, 5, 4, 5, 4, 4, 7, 6, 6, 6, 5, 6, 5, 5, 6, 5, 5, 5, 4, 8, 7, 7, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 7, 6, 6, 6, 5, 6, 5, 5, 9, 8, 8, 8, 7, 8, 7, 7, 8, 7, 7, 7, 6, 8, 7, 7, 7, 6, 7, 6, 6, 8, 7, 7, 7, 6, 7, 6, 6, 7, 6, 6, 6, 5, 10, 9, 9, 9, 8, 9, 8, 8, 9, 8, 8, 8, 7, 9, 8, 8
Offset: 1
W(4) = `110`, i.e., 4 = A(A(B(1))) with Wythoff's A and B sequences.
- Wolfdieter Lang, The Wythoff and the Zeckendorf representations of numbers are equivalent, in G. E. Bergum et al. (editors), Application of Fibonacci numbers, vol. 6, Kluwer, Dordrecht, 1996, pp. 319-337. [See A317208 for a link.]
Cf.
A135818 (number of 1's or A's in Wythoff representation of n).
Cf.
A007895 (number of 0's or B's in Wythoff representation of n).
-
z[n_] := Floor[(n + 1)*GoldenRatio] - n - 1; h[n_] := z[n] - z[n - 1]; w[n_] := Module[{m = n, zm = 0, hm, s = {}}, While[zm != 1, hm = h[m]; AppendTo[s, hm]; If[hm == 1, zm = z[m], zm = z[z[m]]]; m = zm]; s]; w[0] = 0; a[n_] := Length[w[n]]; Array[a, 100] (* Amiram Eldar, Jul 01 2023 *)
A265745
a(n) is the number of Jacobsthal numbers (A001045) needed to sum to n using the greedy algorithm.
Original entry on oeis.org
0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 5, 4, 5, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 5, 4, 5, 2, 3, 4, 3, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 4, 5, 4, 5, 6, 5, 6, 1, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 5, 4, 5, 2
Offset: 0
a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
For n=1 we need just A001045(2) = 1, thus a(1) = 1.
For n=2 we need A001045(2) + A001045(2) = 1 + 1, thus a(2) = 2.
For n=4 we need A001045(3) + A001045(2) = 3 + 1, thus a(4) = 2.
For n=6 we form the greedy sum as A001045(4) + A001045(2) = 5 + 1, thus a(6) = 2. Alternatively, we could form the sum as A001045(3) + A001045(3) = 3 + 3, but the number of summands in that case is no less.
For n=7 we need A001045(4) + A001045(2) + A001045(2) = 5 + 1 + 1, thus a(7) = 3.
For n=8 we need A001045(4) + A001045(3) = 5 + 3, thus a(8) = 2.
For n=10 we need A001045(4) + A001045(4) = 5 + 5, thus a(10) = 2.
Cf.
A001045,
A130249,
A197911,
A003158,
A265746,
A265747,
A364377,
A364379,
A364380,
A372288,
A372555,
A372557.
Cf.
A054111 (apparently the positions of the first occurrence of each n > 0).
A328211
Starts of runs of 4 consecutive Zeckendorf-Niven numbers (A328208).
Original entry on oeis.org
1, 2, 3, 123543, 124242, 545502, 1367583, 1856349, 2431230, 2465110, 2593590, 2783709, 3247389, 3479229, 3917823, 3942909, 4174749, 4303428, 4494390, 4920640, 5143830, 5710383, 6261309, 6493149, 6552903, 6956829, 7420509, 7470880, 8970948, 9107790, 9507069, 10952928
Offset: 1
1 is in the sequence since 1, 2, 3 and 4 are in A328208: A007895(1) = 1 is a divisor of 1, A007895(2) = 1 is a divisor of 2, A007895(3) = 1 is a divisor of 3, and A007895(4) = 2 is a divisor of 4.
-
z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; aQ[n_] := Divisible[n, z[n]]; c = 0; k = 1; s = {}; v = Table[-1, {4}]; While[c < 32, If[aQ[k], v = Join[Rest[v], {k}]; If[AllTrue[Differences[v], # == 1 &], c++; AppendTo[s, k - 3]]]; k++]; s (* after Alonso del Arte at A007895 *)
Comments