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.

A050141 a(n) = 2*floor((n+1)*phi) - 2*floor(n*phi) - 1 where phi = (1 + sqrt(5))/2 is the golden ratio.

This page as a plain text file.
%I A050141 #19 May 04 2025 10:01:13
%S A050141 3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,3,1,
%T A050141 3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3,3,1,3,3,1,
%U A050141 3,1,3,3,1,3,1,3,3,1,3,3,1,3,1,3
%N A050141 a(n) = 2*floor((n+1)*phi) - 2*floor(n*phi) - 1 where phi = (1 + sqrt(5))/2 is the golden ratio.
%C A050141 First differences of A050140.
%C A050141 The substitutions 3->1 and 1->0 carry this sequence onto the infinite Fibonacci word (A005614).
%H A050141 Harvey P. Dale, <a href="/A050141/b050141.txt">Table of n, a(n) for n = 1..1000</a>
%t A050141 #[[2]]-#[[1]]-1&/@Partition[Table[2*Floor[n*GoldenRatio],{n,100}],2,1] (* _Harvey P. Dale_, Mar 09 2025 *)
%o A050141 (PARI) a(n)=(n+1+sqrtint(5*(n+1)^2))\2*2 - (n+sqrtint(5*n^2))\2*2 - 1 \\ _Charles R Greathouse IV_, Dec 28 2017
%o A050141 (Python)
%o A050141 from math import isqrt
%o A050141 def A050141(n): return -(n+isqrt(m:=5*n**2)&-2)+(n+1+isqrt(m+5*((n<<1)+1))&-2)-1
%o A050141 # _Chai Wah Wu_, May 04 2025
%K A050141 nonn,base
%O A050141 1,1
%A A050141 _Clark Kimberling_
%E A050141 Name edited by Michel Marcus and _Charles R Greathouse IV_, Dec 28 2017