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.

A371626 The y-coordinate of the point where x + y = n, x is an integer and x/y is as close as possible to phi (by absolute difference).

This page as a plain text file.
%I A371626 #21 Aug 04 2025 14:21:34
%S A371626 1,1,1,2,2,2,3,3,4,4,4,5,5,5,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,11,12,
%T A371626 12,13,13,13,14,14,15,15,15,16,16,16,17,17,18,18,18,19,19,19,20,20,21,
%U A371626 21,21,22,22,23,23,23,24,24,24,25,25,26,26,26,27,27,28
%N A371626 The y-coordinate of the point where x + y = n, x is an integer and x/y is as close as possible to phi (by absolute difference).
%C A371626 a(n) = k = n - either ceiling or floor of n/phi, according to which minimizes abs((n-k)/k - phi).
%C A371626 Each term is equal to or one greater than the previous term.
%C A371626 The average run length approaches 1+phi.
%C A371626 The 2 following statements are equivalent for any positive integer n and any function f(x) such that for any real x, f(x) equals a integer within the range (x-1,x+1):
%C A371626   a(n) != A371627(n);
%C A371626   a(n) != n-f(n/phi) xor A371627(n) != n-f(n/phi).
%C A371626 Let s(n) = (phi*n - 1 - sqrt(1+(n^2)*(phi^-4)))/2.
%C A371626 Floor(s(n)) equals the number of times that a(n) swapped from being equal to n-floor(n/phi) to being equal to n-ceiling(n/phi) when n is extended to the reals.
%C A371626 This is true because s(n) is the solution to the equation n = (phi/4) * (phi(2r+1) + sqrt((2r+1)^2 / phi^4 + 4/phi)) solved for w. The equation gives the n-value of w-th swap from a(n) = n-floor(n/phi) to a(n) = n-ceiling(n/phi).
%C A371626 s(n) is asymptotic to n/phi - 1/2.
%C A371626 Floor(s(n)) != floor(n/phi - 1/2) <-> a(n) != round(n).
%C A371626 Floor(n/phi) equals the number of that a(n) swapped from being equal to n-ceiling(n/phi) to being equal to n-floor(n/phi) when n is extended to the reals.
%F A371626 a(n) = n - A371625(n).
%F A371626 Let s(n) = (phi*n - 1 - sqrt(1+(n^2) / phi^4))/2.
%F A371626 Floor(s(n))+floor(n/phi) is even -> a(n) = n-ceiling(n/phi) = (n mod 1) + floor(n/phi^2).
%F A371626 Floor(s(n))+floor(n/phi) is odd -> a(n) = n-floor(n/phi) = (n mod 1) + ceiling(n/phi^2).
%F A371626 a(n) = -a(-n).
%e A371626 For n=5, the possibilities are (0,5), (1,4), (2,3), (3,2) and (4,1). Of those, 3/2 is the closest to phi, so a(5)=3.
%Y A371626 Cf. A001622 (phi), A371625 (x_coordinate).
%K A371626 nonn,frac
%O A371626 1,4
%A A371626 _Colin Linzer_, Mar 29 2024
%E A371626 Elements referring to sequences that were not submitted removed by _Peter Munn_, Aug 04 2025