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.

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

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 10, 12, 13, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 47, 49, 51, 52, 54, 56, 57, 59, 60, 62, 64, 65, 67, 68, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 93, 94, 96, 98, 99
Offset: 0

Views

Author

Keywords

Comments

a(n)=least k such that s(k)=n, where s=A026350.
a(n)=position of n-th 1 in A096270.
From Wolfdieter Lang, Jun 27 2011: (Start)
a(n) = A(n)+1, with Wythoff sequence A(n)=A000201(n), n>=1, and A(0)=0.
a(n) = -floor(-n*phi). Recall that floor(-x) = -(floor(x)+1) if x is not integer and -floor(x) otherwise.
An exhaustive and disjoint decomposition of the integers is given by the following two Wythoff sequences A' and B: A'(0):=-1 (not 0), A'(-n):=-a(n)=-(A(n)+1), n>=1, A'(n) = A(n), n>=1, and B(-n):=-(B(n)+1)= -A026352(n), n>=1, with B(n)=A001950(n), n>=1, and B(0)=0.
(End)
Where odd terms in A060142 occur: A060142(a(n)) = A219608(n). - Reinhard Zumkeller, Nov 26 2012

Crossrefs

Essentially same as A004956. Cf. A000201.
Complement of A026352.
Cf. A283733 (partial sums).

Programs

  • Haskell
    import Data.List (findIndices)
    a026351 n = a026351_list !! n
    a026351_list = findIndices odd a060142_list
    -- Reinhard Zumkeller, Nov 26 2012
    
  • Mathematica
    Table[Floor[n*GoldenRatio] + 1, {n, 0, 100}] (* T. D. Noe, Apr 15 2011 *)
  • Python
    from math import isqrt
    def A026351(n): return (n+isqrt(5*n**2)>>1)+1 # Chai Wah Wu, Aug 17 2022