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-5 of 5 results.

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

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Dec 02 2002

Keywords

Comments

From Fred Lunnon, Jun 20 2008: (Start)
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, ... }.
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)
The Chow-Long paper gives a connection with continued fractions, as well as generalizations and other references for this and related sequences.
This is the complement of A089809; also a(n) = 1 iff A024569(n) = 1. - Gary W. Adamson, Nov 11 2003
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
From Clark Kimberling and Jianing Song, Sep 09 2019: (Start)
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.
Guide to related sequences, for k = 2:
** r ********* {a(n)} positions of 0's positions of 1's
(1+sqrt(5))/2 A078588 A005653 A005652
Guide to related sequences, for k = 3:
** r ********* {a(n)} pos. of 0's pos. of 1's pos. of 2's
Guide to related sequences, for k = 4:
** r ********* {a(n)} pos. of 0's pos. of 1's pos. of 2's pos. of 3's
(End)

References

  • D. L. Silverman, J. Recr. Math. 9 (4) 208, problem 567 (1976-77).

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

A089808 a(n) = floor(1/((n*r) mod 1)), where r = phi^(-2) = (3 - sqrt(5))/2.

Original entry on oeis.org

2, 1, 6, 1, 1, 3, 1, 17, 2, 1, 4, 1, 1, 2, 1, 8, 2, 1, 3, 1, 46, 2, 1, 5, 1, 1, 3, 1, 12, 2, 1, 4, 1, 1, 2, 1, 7, 1, 1, 3, 1, 23, 2, 1, 5, 1, 1, 2, 1, 10, 2, 1, 4, 1, 122, 2, 1, 6, 1, 1, 3, 1, 15, 2, 1, 4, 1, 1, 2, 1, 8, 1, 1, 3, 1, 33, 2, 1, 5, 1, 1, 3, 1, 11, 2, 1, 4, 1, 1, 2, 1, 7, 1, 1, 3, 1, 19, 2, 1, 5, 1
Offset: 1

Views

Author

Gary W. Adamson, Nov 11 2003

Keywords

Comments

1. a(n) = 1 iff A024569 is not 1, (A024569 = 1, 4, 1, 2, 11, 1, 3, 1, 1, ...)
2. a(n) = 1 iff A078588 = 0.
3. a(n) = 1 iff A089809 = 1.

Examples

			a(6) = 3. Take 6*r = 2.29179...( mod 1) = 0.29179...; invert = 3.42705... and delete the fractional part, getting 3.
		

Crossrefs

Programs

  • Mathematica
    r := (3 - Sqrt[5])/2; Table[Floor[1/(Mod[(n*r), 1])], {n, 1, 50}] (* G. C. Greubel, Nov 20 2017 *)

Extensions

More terms from Sam Alexander, Nov 16 2003

A089809 Complement of A078588.

Original entry on oeis.org

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
Offset: 1

Views

Author

Gary W. Adamson, Nov 11 2003

Keywords

Comments

a(n) = 1 if (fractional part of n*r) < 1/2, else a(n) = 0, where r = golden ratio = (1 + sqrt(5))/2. - Clark Kimberling, Dec 27 2016

Examples

			1. a(7) = 1 since A078588(7) = 0
2. a(7) = 1 since A024569 is not 1 (A024569(7) = 3).
3. a(7) = 1 since A089808(7) = 1.
		

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; z = 500;
    Table[If[FractionalPart[n r] < 1/2, 1, 0 ], {n, 1, z}]  (* A089809 *)
    Table[If[FractionalPart[n r] > 1/2, 1, 0 ], {n, 1, z}]  (* A078588 *)
    1 - % (* A089809,  Clark Kimberling, Dec 27 2016 *)
  • Python
    from math import isqrt
    def A089809(n): return ((n+isqrt(5*n**2))&1)^1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = 1 if A078588 = 0; otherwise, not.
a(n) = 1 iff A024569 is not 1.
a(n) = 1 iff A089808 is 1.
a(n) = 1 if (fractional part of n*r) < 1/2, else a(n) = 0. - Clark Kimberling, Dec 27 2016

A024570 a(n) = Sum_{k=1..n} [ 1/{k*r} ] where r = (1 + sqrt(5))/2 and {x} := x - [ x ].

Original entry on oeis.org

1, 5, 6, 8, 19, 20, 23, 24, 25, 30, 31, 33, 62, 63, 66, 67, 68, 76, 77, 79, 80, 81, 85, 86, 88, 102, 103, 106, 107, 108, 114, 115, 117, 193, 194, 198, 199, 201, 210, 211, 213, 214, 215, 220, 221, 223, 244, 245, 248, 249, 250, 257, 258, 260, 261, 262, 266, 267, 269, 281, 282, 285
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A024571. Partial sums of A024569.

Programs

  • Mathematica
    Table[Sum[Floor[1/FractionalPart[k*GoldenRatio]], {k, n}], {n, 100}] (* Clark Kimberling, Aug 15 2012 *)

Extensions

Corrected by Clark Kimberling, Aug 15 2012

A024568 a(n) = [ n/{n*r} ], where r = (1 + sqrt(5))/2 and {x} := x - [ x ].

Original entry on oeis.org

1, 8, 3, 8, 55, 8, 21, 8, 16, 55, 13, 28, 377, 21, 55, 18, 33, 144, 25, 55, 21, 36, 107, 28, 55, 377, 39, 91, 31, 55, 194, 41, 83, 2584, 55, 144, 42, 78, 377, 55, 120, 43, 74, 227, 55, 107, 987, 72, 172, 55, 98, 377, 70, 144, 55, 91, 250, 68, 127, 731, 87, 194, 67, 115, 377, 83, 164
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A024569.

Programs

  • Mathematica
    Table[Floor[n/FractionalPart[n*GoldenRatio]], {n, 1100}] (* Clark Kimberling, Aug 15 2012 *)
Showing 1-5 of 5 results.