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-6 of 6 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

A189463 a(n) = [3*n*r] - 3*[n*r], where r=sqrt(5).

Original entry on oeis.org

0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 2, 0, 1, 2, 2, 0, 1, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Apr 22 2011

Keywords

Crossrefs

Programs

  • Magma
    [Floor(3*n*Sqrt(5)) - 3*Floor(n*Sqrt(5)): n in [1..30]]; // G. C. Greubel, Dec 28 2017
  • Mathematica
    r = 5^(1/2);
    f[n_] := Floor[3 n*r] - 3*Floor[n*r];
    t = Table[f[n], {n, 1, 220}] (* A189463 *)
    Flatten[Position[t, 0]]   (* A189464 *)
    Flatten[Position[t, 1]]   (* A189465 *)
    Flatten[Position[t, 2]]   (* A190158 *)
  • PARI
    for(n=1,30, print1(floor(3*n*sqrt(5)) - 3*floor(n*sqrt(5)), ", ")) \\ G. C. Greubel, Dec 28 2017
    

A189464 Positions of 0 in A189463.

Original entry on oeis.org

1, 5, 9, 13, 14, 17, 18, 22, 26, 30, 31, 34, 35, 39, 43, 47, 48, 51, 52, 56, 60, 64, 68, 69, 73, 77, 81, 85, 86, 89, 90, 94, 98, 102, 103, 106, 107, 111, 115, 119, 120, 123, 124, 128, 132, 136, 140, 141, 145, 149, 153, 157, 158, 161, 162, 166, 170, 174, 175, 178, 179, 183, 187, 191, 192, 195, 196, 200, 204, 208, 212, 213, 217
Offset: 1

Views

Author

Clark Kimberling, Apr 22 2011

Keywords

Comments

See A189463.

Crossrefs

Programs

  • Mathematica
    r = 5^(1/2);
    f[n_] := Floor[3 n*r] - 3*Floor[n*r];
    t = Table[f[n], {n, 1, 220}] (* A189463 *)
    Flatten[Position[t, 0]]   (* A189464 *)
    Flatten[Position[t, 1]]   (* A189465 *)
    Flatten[Position[t, 2]]   (* A190158 *)

A189465 Positions of 1 in A189463.

Original entry on oeis.org

2, 6, 7, 10, 11, 15, 19, 23, 24, 27, 28, 32, 36, 40, 44, 45, 49, 53, 57, 61, 62, 65, 66, 70, 74, 78, 79, 82, 83, 87, 91, 95, 96, 99, 100, 104, 108, 112, 116, 117, 121, 125, 129, 133, 134, 137, 138, 142, 146, 150, 151, 154, 155, 159, 163, 167, 168, 171, 172, 176, 180, 184, 188, 189, 193, 197, 201, 205, 206, 209, 210, 214, 218
Offset: 1

Views

Author

Clark Kimberling, Apr 22 2011

Keywords

Comments

See A189463.

Crossrefs

Programs

  • Mathematica
    r = 5^(1/2);
    f[n_] := Floor[3 n*r] - 3*Floor[n*r];
    t = Table[f[n], {n, 1, 220}] (* A189463 *)
    Flatten[Position[t, 0]]   (* A189464 *)
    Flatten[Position[t, 1]]   (* A189465 *)
    Flatten[Position[t, 2]]   (* A190158 *)

A190157 Decimal expansion of (1+sqrt(-1+2*sqrt(5)))/2.

Original entry on oeis.org

1, 4, 3, 1, 6, 8, 3, 4, 1, 6, 5, 9, 0, 5, 7, 9, 2, 5, 3, 0, 7, 9, 5, 6, 9, 1, 3, 3, 4, 9, 0, 7, 3, 5, 1, 9, 9, 4, 1, 0, 4, 5, 4, 3, 4, 4, 6, 2, 4, 7, 3, 6, 8, 2, 6, 7, 6, 1, 9, 3, 5, 3, 9, 7, 1, 3, 4, 8, 2, 8, 1, 4, 7, 4, 6, 4, 4, 3, 4, 9, 4, 5, 7, 5, 8, 8, 1, 4, 2, 8, 2, 2, 8, 5, 2, 9, 7, 7, 1, 8, 5, 9, 8, 9, 3, 3, 8, 9, 9, 7, 6, 6, 2, 0, 7, 5, 0, 6, 7, 1
Offset: 1

Views

Author

Clark Kimberling, May 05 2011

Keywords

Comments

Let R denote a rectangle whose shape (i.e., length/width) is (1+sqrt(-1+2*sqrt(5)))/2. This rectangle can be partitioned into squares and golden rectangles in a manner that matches the periodic continued fraction [1,r,1,r,1,r,1,r,...], where r is the golden ratio. It can also be partitioned into squares so as to match the nonperiodic continued fraction [1,2,3,6,3,...] at A190158. For details, see A188635.

Examples

			1.431683416590579253079569133490735199410...
		

Crossrefs

Programs

  • Magma
    [(1+Sqrt(-1+2*Sqrt(5)))/2]; // G. C. Greubel, Dec 28 2017
  • Mathematica
    r = (1 + 5^(1/2))/2;
    FromContinuedFraction[{1, r, {1, r}}]
    FullSimplify[%]
    ContinuedFraction[%, 100]  (* A190158 *)
    RealDigits[N[%%, 120]]     (* A190157 *)
    N[%%%, 40]
    RealDigits[(1+Sqrt[-1+2*Sqrt[5]])/2, 10, 100][[1]] (* G. C. Greubel, Dec 28 2017 *)
  • PARI
    (1+sqrt(-1+2*sqrt(5)))/2 \\ G. C. Greubel, Dec 28 2017
    

A189971 Continued fraction of (1 + x + sqrt(14 + 10*x))/4, where x=sqrt(5).

Original entry on oeis.org

2, 3, 6, 3, 1, 2, 15, 2, 3, 6, 1, 7, 1, 4, 2, 3, 1, 4, 2, 1, 1, 1, 2, 1, 20, 17, 3, 1, 2, 3, 1, 1, 3, 1, 4, 9, 73, 1, 37, 192, 3, 1, 1, 1, 1, 5, 1, 21, 1, 6, 7, 1, 3, 3, 1, 8, 2, 2, 1, 1, 8, 1, 2, 1, 1, 8, 1, 2, 1, 20, 2, 16, 3, 19, 2, 1, 3, 7, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 9, 32, 1, 1, 10, 5, 1, 7, 5, 1, 1, 1
Offset: 1

Views

Author

Clark Kimberling, May 05 2011

Keywords

Comments

Equivalent to the periodic continued fraction [r,1,r,1,...] where r=(1+sqrt(5))/2, the golden ratio. For geometric interpretations of both continued fractions, see A189970 and A188635.

Crossrefs

Programs

  • Magma
    ContinuedFraction( (1 + Sqrt(5) + Sqrt(14 + 10*Sqrt(5)) )/4 ); // G. C. Greubel, Jan 12 2018
  • Mathematica
    (See A189970.)
    ContinuedFraction[(1+Sqrt[5]+Sqrt[14+10Sqrt[5]])/4,120] (* Harvey P. Dale, Jul 31 2013 *)
  • PARI
    contfrac((1+sqrt(5)+sqrt(14+10*sqrt(5)))/4) \\ G. C. Greubel, Jan 12 2018
    
Showing 1-6 of 6 results.