OFFSET
1,4
COMMENTS
Every nonnegative integer appears infinitely many times in the sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
FORMULA
Empirically: a(n) = 0 iff n belongs to A001519, a(n) = 1 + a(n-1) otherwise.
EXAMPLE
The first terms are:
n {phi*n} a(n)
-- ------- ----
0 0. N/A
1 0.61... 0
2 0.23... 0
3 0.85... 1
4 0.47... 2
5 0.09... 0
6 0.70... 1
7 0.32... 2
8 0.94... 3
9 0.56... 4
10 0.18... 5
PROG
(PARI) a(n, phi = (1+sqrt(5))/2) = { my (f = frac(phi * n), mx = -oo, v = -oo); for (k = 0, n-1, my (g = frac(phi * k)); if (mx < g && g < f, mx = g; v = k; ); ); return (v); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 10 2026
STATUS
approved
