OFFSET
1,10
COMMENTS
a(n) are coefficients in the formulas for multiplication of fractional parts of multiples of the golden mean:
(I) frac(b*phi)*frac(c*phi) = 1-frac(d*phi); d = 2*b*c+a(b)*c/2+a(c)*b/2;
(IIa) frac(b*phi)*(1-frac(c*phi)) = frac(e*phi); e = d+b;
(IIb) (1-frac(b*phi))*frac(c*phi) = frac(f*phi); f = d+c;
(III) (1-frac(b*phi))*(1-frac(c*phi)) = 1-frac(g*phi); g = d+b+c;
where frac() = FractionalPart(), phi = (1+sqrt(5))/2 and b,c are positive integers.
The parameters d,e,f,g are also positive integers.
FORMULA
EXAMPLE
For b=3, c=10, a(3)=-1, a(10)=2 are solutions of upper formulas:
(I) frac(3*phi)*frac(10*phi) = 1-frac(58*phi); d = 2*3*10+a(3)*10/2+a(10)*3/2 = 58;
(IIa) frac(3*phi)*(1-frac(10*phi)) = frac(61*phi); e = d+3 = 61;
(IIb) (1-frac(3*phi))*frac(10*phi) = frac(68*phi); f = d+10 = 68;
(III) (1-frac(3*phi))*(1-frac(10*phi)) = 1-frac(71*phi); g = d+3+10 = 71.
MATHEMATICA
Table[2Floor[n*GoldenRatio]-3n, {n, 76}] (* Stefano Spezia, Dec 18 2020 *)
PROG
(PARI) a(n) = 2*floor(n*quadgen(5)) - 3*n; \\ Michel Marcus, Jan 05 2021
(Python)
from math import isqrt
def A339765(n): return ((n+isqrt(5*n**2))&~1)-3*n # Chai Wah Wu, Aug 09 2022
CROSSREFS
KEYWORD
sign
AUTHOR
Primoz Pirnat, Dec 16 2020
STATUS
approved