cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-22 of 22 results.

A171549 a(n) is the n-th "strange number", where "strange numbers" are defined as follows: using every other Fibonacci number (starting with offset 1), the shortest way to add up these Fibonacci numbers so that the sum equals n, where the digits are indices in the "every other Fibonacci number" sequence.

Original entry on oeis.org

1, 2, 21, 22, 3, 31, 32, 321, 322, 33, 331, 332, 4, 41, 42, 421, 422, 43, 431, 432, 4321, 4322, 433, 4331, 4332, 44, 441, 442, 4421, 4422, 443, 4431, 4432, 5, 51, 52, 521, 522, 53, 531, 532, 5321, 5322, 533, 5331, 5332, 54, 541, 542, 5421, 5422, 543, 5431, 5432
Offset: 1

Views

Author

Jonas Hoeglund (firefly(AT)firefly.nu), Dec 11 2009

Keywords

Comments

We can also find these numbers as follows: We have an alphabet {1, 2, 3, 4, 5, ...}, and a number known as the "limit", initially set to 1. to describe the first number, we use the first character of the alphabet: 1 to describe 2, we have to increase the limit and define a new character: 2 to describe 3, the limit is now 2, so we may use two characters. 2+1 = 3, therefore: 21 to describe 4, we use 22 to describe 5, we need a new character: 3. the limit is now increased to 3. etc.
See the Zeckendorf expansion of n (A035517) for a similar expansion. - N. J. A. Sloane, Dec 12 2009

Programs

  • Java
    // fib(n) gives fibonacci number n. public static String S(int n) { int max; for (max = 0; fib(max) < n; max += 2); int num = n; String out = ""; while (num > 0) { for (int i = max; i>0; i--) if (num >= fib(2*i-1)) { num -= fib(2*i-1); out += (char)('0' + i); break; } } return out; }
  • Maple
    Contribution from R. J. Mathar, Oct 23 2010: (Start)
    read("transforms") ; A130234 := proc(n) local m,N,a,i ; for m from 0 do if combinat[fibonacci](m) >= n then break ; end if; end do; m ; end proc:
    A171549 := proc(n) local m,N,a,i ; m := A130234(n) ; if type(m,'odd') then m := m+1 ; end if; N := n ; a := 0 ; while N >0 do for i from m to 1 by -1 do if N >= combinat[fibonacci](2*i-1) then N := N- combinat[fibonacci](2*i-1) ; a := digcat2(a,i) ; break ; end if; end do: end do: return a; end proc:
    seq(A171549(n),n=1..80) ; (End)

Extensions

Extended by R. J. Mathar, Oct 23 2010

A319952 Let M = A022342(n) be the n-th number whose Zeckendorf representation is even; then a(n) = A129761(M).

Original entry on oeis.org

1, 2, 3, 1, 6, 1, 2, 11, 1, 2, 3, 1, 22, 1, 2, 3, 1, 6, 1, 2, 43, 1, 2, 3, 1, 6, 1, 2, 11, 1, 2, 3, 1, 86, 1, 2, 3, 1, 6, 1, 2, 11, 1, 2, 3, 1, 22, 1, 2, 3, 1, 6, 1, 2, 171, 1, 2, 3, 1, 6, 1, 2, 11, 1, 2, 3, 1, 22, 1, 2, 3, 1, 6, 1
Offset: 2

Views

Author

Jeffrey Shallit and N. J. A. Sloane, Oct 03 2018

Keywords

Comments

The Zeckendorf representations of numbers are given in A014417. The even ones are specified by A022342.
The offset here is 2 (because A129761 should really have had offset 1 not 0).

Crossrefs

Programs

  • Maple
    with(combinat): F:=fibonacci:
    A130234 := proc(n)
        local i;
        for i from 0 do
            if F(i) >= n then
                return i;
            end if;
        end do:
    end proc:
    A014417 := proc(n)
        local nshi, Z, i ;
        if n <= 1 then
            return n;
        end if;
        nshi := n ;
        Z := [] ;
        for i from A130234(n) to 2 by -1 do
            if nshi >= F(i) and nshi > 0 then
                Z := [1, op(Z)] ;
                nshi := nshi-F(i) ;
            else
                Z := [0, op(Z)] ;
            end if;
        end do:
        add( op(i, Z)*10^(i-1), i=1..nops(Z)) ;
    end proc:
    A072649:= proc(n) local j; global F; for j from ilog[(1+sqrt(5))/2](n)
           while F(j+1)<=n do od; (j-1); end proc:
    A003714 := proc(n) global F; option remember; if(n < 3) then RETURN(n); else RETURN((2^(A072649(n)-1))+A003714(n-F(1+A072649(n)))); fi; end proc:
    A129761 := n -> A003714(n+1)-A003714(n):
    a:=[];
    for n from 1 to 120 do
       if (A014417(n) mod 2) = 0 then a:=[op(a), A129761(n-1)]; fi;
    od;
    a;

Formula

If the Zeckendorf representation of M ends with exactly k zeros, ...10^k, then a(n) = ceiling(2^k/3).
Previous Showing 21-22 of 22 results.