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.

A078588 a(n) = 1 if the integer multiple of phi nearest n is greater than n, otherwise 0, where phi = (1+sqrt(5))/2.

This page as a plain text file.
%I A078588 #66 Jan 05 2025 19:51:37
%S A078588 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,
%T A078588 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,
%U A078588 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
%N A078588 a(n) = 1 if the integer multiple of phi nearest n is greater than n, otherwise 0, where phi = (1+sqrt(5))/2.
%C A078588 From _Fred Lunnon_, Jun 20 2008: (Start)
%C A078588 Partition the positive integers into two sets A_0 and A_1 defined by A_k == { n | a(n) = k }; so A_0 = A005653 = { 2, 4, 5, 7, 10, 12, 13, 15, 18, 20, ... }, A_1 = A005652 = { 1, 3, 6, 8, 9, 11, 14, 16, 17, 19, 21, ... }.
%C A078588 Then form the sets of sums of pairs of distinct elements from each set and take the complement of their union: this is the Fibonacci numbers { 1, 2, 3, 5, 8, 13, 21, 34, 55, ... } (see the Chow article). (End)
%C A078588 The Chow-Long paper gives a connection with continued fractions, as well as generalizations and other references for this and related sequences.
%C A078588 This is the complement of A089809; also a(n) = 1 iff A024569(n) = 1. - _Gary W. Adamson_, Nov 11 2003
%C A078588 Since (n*phi) is equidistributed, s(n):=(Sum_{k=1..n}a(k))/n converges to 1/2, but actually s(n) is exactly equal to 1/2 for many values of n. These values are given by A194402. - _Michel Dekking_, Sep 30 2016
%C A078588 From _Clark Kimberling_ and _Jianing Song_, Sep 09 2019: (Start)
%C A078588 Suppose that k >= 2, and let a(n) = floor(n*k*r) - k*floor(n*r) = k*{n*r} - {n*k*r}, an integer strictly between 0 and k, where {} denotes fractional part. For h = 0,1,...,k-1, let s(h) be the sequence of positions of h in {a(n)}. The sets s(h) partition the positive integers. Although a(n)/n -> k, the sequence a(n)-k*n appears to be unbounded.
%C A078588 Guide to related sequences, for k = 2:
%C A078588 ** r *********  {a(n)}   positions of 0's  positions of 1's
%C A078588 (1+sqrt(5))/2   A078588      A005653           A005652
%C A078588 sqrt(2)         A197879      A120243           A120749
%C A078588 sqrt(3)         A190669      A190670           A190671
%C A078588 e               A190843      A190847           A190860
%C A078588 Pi              A191153      A191159           A191164
%C A078588 sqrt(5)         A188257      A188258           A188259
%C A078588 sqrt(6)         A327253      A327254           A327255
%C A078588 sqrt(8)         A327256      A327257           A327258
%C A078588 Guide to related sequences, for k = 3:
%C A078588 ** r *********  {a(n)}   pos. of 0's  pos. of 1's  pos. of 2's
%C A078588 (1+sqrt(5))/2   A140397    A140398      A140399      A140400
%C A078588 sqrt(2)         A190487    A190488      A190489      A190490
%C A078588 sqrt(3)         A190676    A190677      A190678      A190679
%C A078588 e               A190893    A191103      A191104      A191105
%C A078588 Pi              A327298    A327299      A327300      A327301
%C A078588 sqrt(5)         A189463    A189464      A189465      A190158
%C A078588 sqrt(6)         A327306    A327307      A327308      A327309
%C A078588 sqrt(8)         A327310    A327311      A327312      A327313
%C A078588 Guide to related sequences, for k = 4:
%C A078588 ** r *********  {a(n)}   pos. of 0's  pos. of 1's  pos. of 2's  pos. of 3's
%C A078588 sqrt(2)         A190544    A190545      A190546      A190547      A190548
%C A078588 sqrt(5)         A189480    A190813      A190883      A190884      A190885
%C A078588 (End)
%D A078588 D. L. Silverman, J. Recr. Math. 9 (4) 208, problem 567 (1976-77).
%H A078588 T. D. Noe, <a href="/A078588/b078588.txt">Table of n, a(n) for n = 0..1000</a>
%H A078588 K. Alladi et al., <a href="http://dx.doi.org/10.1016/0012-365X(78)90053-5">On additive partitions of integers</a>, Discrete Math., 22 (1978), 201-211.
%H A078588 T. Chow, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/29-2/chow.pdf">A new characterization of the Fibonacci-free partition</a>, Fibonacci Q. 29 (1991), 174-180; <a href="http://www-math.mit.edu/~tchow/cv.html">also online here</a>
%H A078588 T. Y. Chow and C. D. Long, <a href="http://www-math.mit.edu/~tchow/add.pdf">Additive partitions and continued fractions</a>, Ramanujan J., 3 (1999), 55-72 [set alpha=(1+sqrt(5))/2 in Theorem 2 to get A005652 and A005653].
%F A078588 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
%F A078588 a(n) = 2{n*phi} - {2n*phi}, where { } denotes fractional part. - _Clark Kimberling_, Jan 01 2007
%F A078588 a(n) = n + 1 + ceiling(n*sqrt(5)) - 2*ceiling(n*phi) where phi = (1+sqrt(5))/2. - _Benoit Cloitre_, Dec 05 2002
%F A078588 a(n) = round(phi*n) - floor(phi*n). - _Michel Dekking_, Sep 30 2016
%F A078588 a(n) = (n+floor(n*sqrt(5))) mod 2. - _Chai Wah Wu_, Aug 17 2022
%t A078588 f[n_] := Block[{k = Floor[n/GoldenRatio]}, If[n - k*GoldenRatio > (k + 1)*GoldenRatio - n, 1, 0]]; Table[ f[n], {n, 0, 105}]
%t A078588 r = (1 + Sqrt[5])/2; z = 300;
%t A078588 t = Table[Floor[2 n*r] - 2 Floor[n*r], {n, 0, z}]
%t A078588 (* _Clark Kimberling_, Aug 26 2019 *)
%o A078588 (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)
%o A078588 (Python)
%o A078588 from math import isqrt
%o A078588 def A078588(n): return (n+isqrt(5*n**2))&1 # _Chai Wah Wu_, Aug 17 2022
%Y A078588 Cf. A001622, A005652, A005653, A024569, A089808, A089809, A140397, A140398, A140399, A140400, A140401.
%K A078588 easy,nonn
%O A078588 0,1
%A A078588 _Robert G. Wilson v_, Dec 02 2002
%E A078588 Edited by _N. J. A. Sloane_, Jun 20 2008, at the suggestion of _Fred Lunnon_
%E A078588 Edited by _Jianing Song_, Sep 09 2019
%E A078588 Offset corrected by _Jianing Song_, Sep 10 2019