OFFSET
1,2
COMMENTS
This is the "greedy" or "minimal" representation (see also A130601).
LINKS
Casey Mongoven and T. D. Noe, Table of n, a(n) for n = 1..1000
Ron Knott, Integers written in base phi
Casey Mongoven, Music based on this sequence
FORMULA
a(n) = A014417(A269725(n))//01, where // denotes concatenation and the leading 0's are removed from a(1). - Peter Munn, Sep 10 2025
EXAMPLE
If the decimal point were included, the sequence would read 1., 10.01, 100.01, 101.01, 1000.1001, 1010.0001, 10000.0001, 10001.0001, 10010.0101, 10100.0101, 10101.0101, ... Unfortunately these are not integers.
Examples: a(2)=1001 because phi^1+phi^-2 = 2, a(3) = 10001 because phi^2+phi^-2 = 3, a(4) = 10101 because phi^2+phi^0+phi^-2 = 4.
MATHEMATICA
nn = 100; len = 2*Ceiling[Log[GoldenRatio, nn]]; Table[d = RealDigits[n, GoldenRatio, len]; last1 = Position[d[[1]], 1][[-1, 1]]; FromDigits[Take[d[[1]], last1]], {n, nn}] (* T. D. Noe, May 20 2011 *)
PROG
(PARI)
a(n) = {
my(p = 1, s=0);
while(p <= n, p *= quadgen(5));
while(n > 0,
p /= quadgen(5);
s *= 10;
if(p <= n, n -= p; s++)
);
s} \\ Chittaranjan Pardeshi, Dec 14 2025
(Python)
from sympy import S
def a(n):
p = 1
while p <= n:
p *= S.GoldenRatio
d = 0
while n > 0:
d *= 10
p /= S.GoldenRatio
if p <= n:
n -= p
d += 1
return d
alist = [a(i) for i in range(1, 20)]
print(alist) # Chittaranjan Pardeshi, Dec 15 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Casey Mongoven, Aug 06 2007
STATUS
approved
