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).
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, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 27, 27, 28
Offset: 1
Examples
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.
Formula
a(n) = n - A371625(n).
Let s(n) = (phi*n - 1 - sqrt(1+(n^2) / phi^4))/2.
Floor(s(n))+floor(n/phi) is even -> a(n) = n-ceiling(n/phi) = (n mod 1) + floor(n/phi^2).
Floor(s(n))+floor(n/phi) is odd -> a(n) = n-floor(n/phi) = (n mod 1) + ceiling(n/phi^2).
a(n) = -a(-n).
Extensions
Elements referring to sequences that were not submitted removed by Peter Munn, Aug 04 2025
Comments