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.

A035336 a(n) = 2*floor(n*phi) + n - 1, where phi = (1+sqrt(5))/2.

Original entry on oeis.org

2, 7, 10, 15, 20, 23, 28, 31, 36, 41, 44, 49, 54, 57, 62, 65, 70, 75, 78, 83, 86, 91, 96, 99, 104, 109, 112, 117, 120, 125, 130, 133, 138, 143, 146, 151, 154, 159, 164, 167, 172, 175, 180, 185, 188, 193, 198, 201, 206, 209, 214, 219, 222, 227, 230, 235, 240
Offset: 1

Views

Author

Keywords

Comments

Second column of Wythoff array.
These are the numbers in A022342 that are not images of another value of the same sequence if it is given offset 0. - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001
Also, positions of 2's in A139764, the smallest term in Zeckendorf representation of n. - John W. Layman, Aug 25 2011
From Amiram Eldar, Mar 21 2022: (Start)
Numbers k for which the Zeckendorf representation A014417(k) ends with 0, 1, 0.
The asymptotic density of this sequence is sqrt(5)-2. (End)

Crossrefs

Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864.

Programs

  • Haskell
    import Data.List (elemIndices)
    a035336 n = a035336_list !! (n-1)
    a035336_list = elemIndices 0 a005713_list
    -- Reinhard Zumkeller, Dec 30 2011
    
  • Magma
    [2*Floor(n*(1+Sqrt(5))/2)+n-1: n in [1..80]]; // Vincenzo Librandi, Nov 19 2016
    
  • Maple
    Digits := 100: t := (1+sqrt(5))/2; [ seq(2*floor((n+1)*t)+n,n=0..80) ];
  • Mathematica
    Table[2*Floor[n*(1 + Sqrt[5])/2] + n - 1, {n, 50}] (* Wesley Ivan Hurt, Nov 21 2017 *)
    Array[2 Floor[# GoldenRatio] + # - 1 &, 60] (* Robert G. Wilson v, Dec 12 2017 *)
  • Python
    from sympy import floor
    from mpmath import phi
    def a(n): return 2*floor(n*phi) + n - 1 # Indranil Ghosh, Jun 10 2017
    
  • Python
    from math import isqrt
    def A035336(n): return (n+isqrt(5*n**2)&-2)+n-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = B(A(n)), with A(k)=A000201(k) and B(k)=A001950(k) (Wythoff BA-numbers).
a(n) = A(n) + A(A(n)), with A(A(n))=A003622(n) (Wythoff AA-numbers).
Equals A022342(A003622(n)+1). - Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001, sequence reference updated by Peter Munn, Nov 23 2017
a(n) = 2*A003622(n) - (n - 1) = A003623(n) - 1. - Franklin T. Adams-Watters, Jun 30 2009
A005713(a(n)) = 0. - Reinhard Zumkeller, Dec 30 2011
a(n) = A089910(n) - 2. - Bob Selcoe, Sep 21 2014