A078588 a(n) = 1 if the integer multiple of phi nearest n is greater than n, otherwise 0, where phi = (1+sqrt(5))/2.
0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1
Offset: 0
References
- D. L. Silverman, J. Recr. Math. 9 (4) 208, problem 567 (1976-77).
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- K. Alladi et al., On additive partitions of integers, Discrete Math., 22 (1978), 201-211.
- T. Chow, A new characterization of the Fibonacci-free partition, Fibonacci Q. 29 (1991), 174-180; also online here
- T. Y. Chow and C. D. Long, Additive partitions and continued fractions, Ramanujan J., 3 (1999), 55-72 [set alpha=(1+sqrt(5))/2 in Theorem 2 to get A005652 and A005653].
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{k = Floor[n/GoldenRatio]}, If[n - k*GoldenRatio > (k + 1)*GoldenRatio - n, 1, 0]]; Table[ f[n], {n, 0, 105}] r = (1 + Sqrt[5])/2; z = 300; t = Table[Floor[2 n*r] - 2 Floor[n*r], {n, 0, z}] (* Clark Kimberling, Aug 26 2019 *)
-
PARI
a(n)=if(n,n+1+ceil(n*sqrt(5))-2*ceil(n*(1+sqrt(5))/2),0) \\ (changed by Jianing Song, Sep 10 2019 to include a(0) = 0)
-
Python
from math import isqrt def A078588(n): return (n+isqrt(5*n**2))&1 # Chai Wah Wu, Aug 17 2022
Formula
a(n) = floor(2*phi*n) - 2*floor(phi*n) where phi denotes the golden ratio (1 + sqrt(5))/2. - Fred Lunnon, Jun 20 2008
a(n) = 2{n*phi} - {2n*phi}, where { } denotes fractional part. - Clark Kimberling, Jan 01 2007
a(n) = n + 1 + ceiling(n*sqrt(5)) - 2*ceiling(n*phi) where phi = (1+sqrt(5))/2. - Benoit Cloitre, Dec 05 2002
a(n) = round(phi*n) - floor(phi*n). - Michel Dekking, Sep 30 2016
a(n) = (n+floor(n*sqrt(5))) mod 2. - Chai Wah Wu, Aug 17 2022
Extensions
Edited by N. J. A. Sloane, Jun 20 2008, at the suggestion of Fred Lunnon
Edited by Jianing Song, Sep 09 2019
Offset corrected by Jianing Song, Sep 10 2019
Comments