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.

A001690 Non-Fibonacci numbers.

Original entry on oeis.org

4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Keywords

Comments

A010056(a(n)) = 0. - Reinhard Zumkeller, Oct 10 2013

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

The nonnegative integers that are not in A000045.
Cf. A010056.

Programs

  • Haskell
    a001690 n = a001690_list !! (n-1)
    a001690_list = filter ((== 0) . a010056) [0..]
    -- Reinhard Zumkeller, Oct 10 2013
    
  • Magma
    phi:= (1+Sqrt(5))/2; [Floor(n + Log(phi, Sqrt(5)*(Log(phi, Sqrt(5)*n) + n) - 5 + 3/n) - 2 ): n in [2..100]]; // G. C. Greubel, May 26 2019
    
  • Maple
    a:=proc(n) floor(-LambertW(-1, -1/5*ln(1/2+1/2*5^(1/2))*5^(1/2) /((1/2+1/2*5^(1/2))^(n-3/2))) /ln(1/2+1/2*5^(1/2))+1/2) end:
    seq(a(n), n=1..69); # Simon Plouffe, Nov 29 2017
    # alternative
    isA000045 := proc(n)
        for k from 0 do
            if A000045(k) = n then
                return true;
            elif A000045(k) > n then
                return false;
            end if;
        end do:
    end proc:
    A001690 := proc(n)
        option remember;
        if n = 1 then
            4 ;
        else
            for a from procname(n-1)+1 do
                if not isA000045(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A001690(n),n=1..100) ; # R. J. Mathar, Feb 01 2019
    # third Maple program:
    q:= n-> (t-> issqr(t+4) or issqr(t-4))(5*n^2):
    remove(q, [$1..100])[]; # Alois P. Heinz, Jun 05 2019
  • Mathematica
    Complement[Range[Fibonacci[a = 12]], Fibonacci[Range[a]]] (* Vladimir Joseph Stephan Orlovsky, Jul 01 2011 *)
    a[n_] := With[{phi = (1 + Sqrt[5])/2}, Floor[1/2 - LambertW[-1, -Log[phi]/(Sqrt[5] phi^(n - 3/2))]/Log[phi]]];
    Table [a[n], {n, 1, 70}] (* Peter Luschny, Nov 30 2017 *)
    Table[Floor[n +Log[GoldenRatio, Sqrt[5]*(Log[GoldenRatio, Sqrt[5]*n] +n) -5 +3/n] -2], {n, 2, 100}] (* G. C. Greubel, May 26 2019 *)
  • PARI
    lgg(x)=log(x)/log((sqrt(5)+1)/2);
    a(n)=n++;floor(n+lgg(sqrt(5)*(lgg(sqrt(5)*n)+n)-5+3/n)-2);
    vector(66,n,a(n)) /* Joerg Arndt, May 14 2011 */
    
  • PARI
    lower=3;upper=5; for(i=4,20,for(n=lower+1,upper-1,print1(n", ")); [lower,upper]=[upper,lower+upper]) \\ Charles R Greathouse IV, Nov 19 2013
    
  • Python
    def f(n):
        a=1
        b=2
        c=3
        while n>0:
            a=b
            b=c
            c=a+b
            n-=(c-b-1)
        n+=(c-b-1)
        return (b+n)
    for i in range(1,1001):
        print(str(i)+" "+str(f(i))) # Indranil Ghosh, Dec 22 2016
    
  • Sage
    [floor( n + log( sqrt(5)*(log(sqrt(5)*n, golden_ratio) + n) - 5 + 3/n , golden_ratio) - 2 ) for n in (2..100)] # G. C. Greubel, May 26 2019

Formula

a(n-1) = floor(n + lgg(sqrt(5)*(lgg(sqrt(5)*n)+n) - 5 + 3/n) - 2) where lgg(x) = log(x)/log((sqrt(5)+1)/2), given by Farhi. - Jonathan Vos Post, May 05 2011
a(n) ~ n. - Charles R Greathouse IV, Nov 06 2014
a(n) = floor(1/2 - LambertW(-1, -log(phi)/(sqrt(5)*phi^(n - 3/2)))/log(phi)) with phi = (1 + sqrt(5))/2 [Nicolas Normand (Nantes)]. - Simon Plouffe, Nov 29 2017 [abs removed by Peter Luschny, Nov 30 2017]