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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 28, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 41, 42, 43
Offset: 1

Views

Author

Colin Linzer, Mar 29 2024

Keywords

Comments

a(n) = x = either ceiling or floor of n/phi, according to which minimizes abs(x/(n-x) - phi).
Each term is equal to or one greater than the previous term.
The average run length approaches phi.
The 2 following statements are equivalent for any real n and any function f(x) such that for any real x, f(x) equals an integer within the range (x-1,x+1) (e.g., round(x), ceiling(x), floor(x)):
A371626(n) != A371627(n);
A371626(n) != n-f(n/phi) xor A371627(n) != n-f(n/phi).
Let s(n) = (phi*n - 1 - sqrt(1+(n^2)*(phi^-4)))/2.
Floor(s(n)) equals the number of times that a(n) swapped from being equal to floor(n/phi) to being equal to ceiling(n/phi) when n is extended to the reals.
This is true because s(n) is the solution to the equation n = (phi/4)(phi(2w+1)+sqrt((2w+1)^2 * phi^-4 + 4/phi)) solved for w. The equation gives the n-value of w-th swap from a(n) = floor(n/phi) to a(n) = ceiling(n/phi).
s(n) is asymptotic to n/phi - 1/2.
floor(s(n)) != floor(n/phi - 1/2) <-> a(n) != round(n).
Floor(n/phi) equals the number of times that a(n) swapped from being equal to ceiling(n/phi) to being equal to floor(n/phi) when n is extended to the reals.

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.
		

Crossrefs

Cf. A001622 (phi), A371626 (y_coordinate), A371627 (with 1/phi), A002163 (sqrt(5)).

Formula

a(n) = n - A371626(n).
a(n) = ceiling(n/phi) if floor(s(n)) + floor(n/phi) is even.
a(n) = floor(n/phi) if floor(s(n)) + floor(n/phi) is odd.
a(n) = ceiling(n/phi) - (floor(s(n))+floor(n/phi) mod 2).
a(n) = round(n/phi) + floor(s(n)) - floor(n/phi+1/2).

A371627 The x-coordinate of the point where x + y = n, x is an integer and x/y is as close as possible to 1/phi.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 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, 27
Offset: 1

Views

Author

Colin Linzer, Mar 29 2024

Keywords

Comments

Each term is equal to or one greater than the previous term.
The average run length approaches 1+phi.
a(n) = x = either ceiling or floor of n/phi^2, according to which minimizes abs(x/(n-x) - phi).
The 4 following statements are equivalent for any positive integer n and any function f(x) such that for all real x, x-1
a(n) != A371626(n);
A371625(n) != y(n);
a(n) != n-f(n/phi) xor A371626(n) != n-f(n/phi);
A371625(n) != f(n/phi) xor y(n) != f(n/phi).

Examples

			For n=4, the possibilities are (0,4), (1,3), (2,2), and (3,1). 1/3 is the closest to 1/phi out of them, so a(4)=1.
		

Crossrefs

Cf. A094214 (1/phi), A371625 (with phi).

Extensions

Elements referring to sequences that were not submitted removed by Peter Munn, Aug 04 2025
Showing 1-2 of 2 results.