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.

Previous Showing 21-30 of 1788 results. Next

A060144 a(n) = floor(n/(1+tau)), or equivalently floor(n/(tau)^2), where tau is the golden ratio (A001622).

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 27, 27, 27, 28, 28, 29, 29
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The RUNS transform of this sequence appears to be yet another version of the Fibonacci word (cf. A001468, A001950, A076662). - N. J. A. Sloane, Mar 29 2025

Crossrefs

Programs

  • Haskell
    a060144 n = a060144_list !! n
    a060144_list = 0 : 0 : scanl1 (+) a003849_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Maple
    A060144 := proc(n)
        (3+sqrt(5))/2 ;
        floor(n/%) ;
    end proc:
    seq(A060144(n),n=0..100) ; # R. J. Mathar, Jul 29 2021
  • Mathematica
    Table[Floor[n/GoldenRatio^2], {n, 0, 100}] (* T. D. Noe, Dec 10 2011 *)
  • PARI
    { default(realprecision, 10); f=2/(sqrt(5) + 3); for (n=0, 1000, write("b060144.txt", n, " ", floor(n*f)); ) } \\ Harry J. Smith, Jul 02 2009
    
  • Python
    from math import isqrt
    def A060144(n): return (n<<1)-1-(n+isqrt(5*n**2)>>1) if n else 0 # Chai Wah Wu, Aug 09 2022

Formula

For n>0, a(n)=n reduced modulo A005206(n). - Benoit Cloitre, Jan 01 2003
Let n' = n-1. Above formula is better as a(n') = n'-A005206(n'). Also a(n') = A005206(A005206(n'-1)). Also a(n'+1) = n'-a(n')-a(n'-a(n')), with a(0) = 0. - Frank Ruskey, Dec 09 2011
a(n+1) = n - A005206(n). - Reinhard Zumkeller, Apr 07 2012
a(n) = floor(n*A132338). - R. J. Mathar, Jul 29 2021

A296184 Decimal expansion of 2 + phi, with the golden section phi from A001622.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jan 08 2018

Keywords

Comments

In a regular pentagon, inscribed in a unit circle this equals twice the largest distance between a vertex and a midpoint of a side.
This is an integer in the quadratic number field Q(sqrt(5)).
Only the first digit differs from A001622.

Examples

			3.618033988749894848204586834365638117720309179805762862135448622705260462...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 5.25, p. 417.

Crossrefs

2 + 2*cos(2*Pi/n): A104457 (n = 5), A116425 (n = 7), A332438 (n = 9), A019973 (n = 12).

Programs

Formula

Equals 2 + A001622 = 1 + A104457 = 3 + A094214.
From Christian Katzmann, Mar 19 2018: (Start)
Equals Sum_{n>=0} (15*(2*n)!+40*n!^2)/(2*n!^2*3^(2*n+2)).
Equals 5/2 + Sum_{n>=0} 5*(2*n)!/(2*n!^2*3^(2*n+1)). (End)
Constant c = 2 + 2*cos(2*Pi/10). The linear fractional transformation z -> c - c/z has order 10, that is, z = c - c/(c - c/(c - c/(c - c/(c - c/(c - c/(c - c/(c - c/(c - c/(c - c/(z)))))))))). - Peter Bala, May 09 2024

A004956 a(n) = ceiling(n*phi), where phi is the golden ratio, A001622.

Original entry on oeis.org

0, 2, 4, 5, 7, 9, 10, 12, 13, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 47, 49, 51, 52, 54, 56, 57, 59, 60, 62, 64, 65, 67, 68, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89
Offset: 0

Views

Author

Keywords

Comments

a(0)=0, a(1)=2; for n > 1, a(n) = a(n-1) + 2 if n is already in the sequence, a(n) = a(n-1) + 1 otherwise.
Integer solutions to the equation x = ceiling(phi*floor(x/phi)). - Benoit Cloitre, Feb 14 2004
From Benoit Cloitre, Mar 05 2007: (Start)
The following is an alternative way to obtain this sequence. NP means "term not in parentheses". Write down the natural numbers and mark the least NP, which is 1:
1* 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the first NP (which is 1) and parenthesize it; mark the least NP (which is 2):
(1*) 2* 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the 2nd NP (which is 3) and parenthesize it; mark the next NP (which is 4):
(1*) 2* (3) 4* 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Take the 4th NP (which is 6) and parenthesize it; mark the next NP (which is 5):
(1*) 2* (3) 4* 5* (6) 7 8 9 10 11 12 13 14 15 16 17 18 19 ...
Continuing in this way we obtain
(1*) 2* (3) 4* 5* (6) 7* (8) 9* 10* (11) 12* 13* (14) 15* (16) 17* (18) 19* ...
The starred entries (after the first) give the sequence. (End)
From Rick L. Shepherd, Dec 05 2009: (Start)
An equivalent statement of the sieving process described by Benoit Cloitre on Mar 05 2007:
Begin with the natural numbers N. Repeatedly perform these two steps:
i) Let k = N's least remaining term not yet used in Step ii).
ii) Remove the k-th remaining term from N.
The remaining terms of N are the (positive) terms shared by this sequence and A026351.
The terms removed from N (the complement) are A026352's terms (see also A004957).
The PARI program performs this sieving process and prints the positive terms of this sequence. (End)
In the Fokkink-Joshi paper, apart from a(0) = 0, this sequence is the Cloitre (0,2,2,1)-hiccup sequence, i.e., a(1) = 2; for m < n, a(n) = a(n-1)+2 if a(m) = n, else a(n) = a(n-1)+1. - Michael De Vlieger, Jul 30 2025

Crossrefs

Cf. A001622, A004957, A026352 (Cloitre (1,1,2,3)-hiccup sequence).
Essentially same as A026351.

Programs

A004942 a(n) = round(n*phi^7), where phi is the golden ratio, A001622.

Original entry on oeis.org

0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, 377, 406, 436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 755, 784, 813, 842, 871, 900, 929, 958, 987, 1016, 1045, 1074, 1103, 1132, 1161, 1190, 1219, 1248, 1278, 1307, 1336, 1365, 1394, 1423, 1452, 1481, 1510, 1539, 1568, 1597, 1626, 1655, 1684
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Round[n GoldenRatio^7], {n, 0, 100}] (* Vincenzo Librandi, Oct 21 2014 *)
  • PARI
    ph=(1+sqrt(5))/2; a(n)=round(n*ph^7);
    vector(66,n,a(n-1)) \\ Joerg Arndt, Oct 21 2014

Extensions

More terms from Joerg Arndt, Oct 21 2014

A004957 a(n) = ceiling(n*phi^2), where phi is the golden ratio, A001622.

Original entry on oeis.org

0, 3, 6, 8, 11, 14, 16, 19, 21, 24, 27, 29, 32, 35, 37, 40, 42, 45, 48, 50, 53, 55, 58, 61, 63, 66, 69, 71, 74, 76, 79, 82, 84, 87, 90, 92, 95, 97, 100, 103, 105, 108, 110, 113, 116, 118, 121, 124, 126, 129, 131, 134
Offset: 0

Views

Author

Keywords

Crossrefs

Essentially same as A026352.
Cf. A001622.

Programs

  • Haskell
    import Data.List (findIndices)
    a004957 n = a004957_list !! n
    a004957_list = findIndices even a060142_list
    -- Reinhard Zumkeller, Nov 26 2012

Formula

A060142(a(n)) = 4 * A060142(n). - Reinhard Zumkeller, Nov 26 2012

A265796 Numerators of lower primes-only best approximates (POBAs) to the golden ratio, tau (A001622); see Comments.

Original entry on oeis.org

3, 11, 37, 163, 173, 241, 571, 1231, 1571, 2351, 3571, 25463, 69247
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a lower primes-only best approximate, and we write "p/q is in L(x)", if u/v < p/q < x < p'/q for all primes u and v such that v < q, where p' is least prime > p.
Let q(1) be the least prime q such that u/q < x for some prime u, and let p(1) be the greatest such u. The sequence L(x) follows inductively: for n > 1, let q(n) is the least prime q such that p(n)/q(n) < p/q < x for some prime p. Let q(n+1) = q and let p(n+1) be the greatest prime p such that p(n)/q(n) < p/q < x.
For a guide to POBAs, lower POBAs, and upper POBAs, see A265759.

Examples

			The lower POBAs to tau start with 3/2, 11/7, 37/23, 163/101, 173/107, 241/149. For example, if p and q are primes and q > 101, and p/q < tau, then 163/101 is closer to tau than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = GoldenRatio; z = 1000; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265800/A265801 *)
    Numerator[tL]   (* A265796 *)
    Denominator[tL] (* A265797 *)
    Numerator[tU]   (* A265798 *)
    Denominator[tU] (* A265799 *)
    Numerator[y]    (* A265800 *)
    Denominator[y]  (* A265801 *)

Extensions

a(12)-a(13) from Robert Price, Apr 06 2019

A265797 Denominator of lower primes-only best approximates (POBAs) to the golden ratio, tau (A001622); see Comments.

Original entry on oeis.org

2, 7, 23, 101, 107, 149, 353, 761, 971, 1453, 2207, 15737, 42797
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a lower primes-only best approximate, and we write "p/q is in L(x)", if u/v < p/q < x < p'/q for all primes u and v such that v < q, where p' is least prime > p.
Let q(1) be the least prime q such that u/q < x for some prime u, and let p(1) be the greatest such u. The sequence L(x) follows inductively: for n > 1, let q(n) is the least prime q such that p(n)/q(n) < p/q < x for some prime p. Let q(n+1) = q and let p(n+1) be the greatest prime p such that p(n)/q(n) < p/q < x.
For a guide to POBAs, lower POBAs, and upper POBAs, see A265759.

Examples

			The lower POBAs to tau start with 3/2, 11/7, 37/23, 163/101, 173/107, 241/149. For example, if p and q are primes and q > 101, and p/q < tau, then 163/101 is closer to tau than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = GoldenRatio; z = 1000; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (*lower POBA*)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (*upper POBA*)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (*POBA,A265800/A265801*)
    Numerator[tL]   (*A265796*)
    Denominator[tL] (*A265797*)
    Numerator[tU]   (*A265798*)
    Denominator[tU] (*A265799*)
    Numerator[y]    (*A265800*)
    Denominator[y]  (*A265801*)

Extensions

a(12)-a(13) from Robert Price, Apr 06 2019

A265798 Numerators of upper primes-only best approximates (POBAs) to the golden ratio, tau (A001622); see Comments.

Original entry on oeis.org

5, 5, 31, 47, 157, 911, 1021, 1487, 4283, 5147, 8629, 11069, 15017, 20939, 22447, 24709, 38239, 80803
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is an upper primes-only best approximate, and we write "p/q is in U(x)", if p'/q < x < p/q < u/v for all primes u and v such that v < q, where p' is greatest prime < p in case p >= 3.
Let q(1) = 2 and let p(1) be the least prime >= x. The sequence U(x) follows inductively: for n >= 1, let q(n) is the least prime q such that x < p/q < p(n)/q(n) for some prime p. Let q(n+1) = q and let p(n+1) be the least prime p such that x < p/q < p(n)/q(n).
For a guide to POBAs, lower POBAs, and upper POBAs, see A265759.

Examples

			The upper POBAs to tau start with 5/2, 5/3, 31/19, 47/29, 157/97, 911/563, 1021/631. For example, if p and q are primes and q > 97, and p/q > tau, then 157/97 is closer to tau than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = GoldenRatio; z = 1000; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265800/A265801 *)
    Numerator[tL]   (* A265796 *)
    Denominator[tL] (* A265797 *)
    Numerator[tU]   (* A265798 *)
    Denominator[tU] (* A265799 *)
    Numerator[y]    (* A265800 *)
    Denominator[y]  (* A265801 *)

Extensions

a(13)-a(18) from Robert Price, Apr 06 2019

A265799 Denominators of upper primes-only best approximates (POBAs) to the golden ratio, tau (A001622); see Comments.

Original entry on oeis.org

2, 3, 19, 29, 97, 563, 631, 919, 2647, 3181, 5333, 6841, 9281, 12941, 13873, 15271, 23633, 49939
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is an upper primes-only best approximate, and we write "p/q is in U(x)", if p'/q < x < p/q < u/v for all primes u and v such that v < q, where p' is greatest prime < p in case p >= 3.
Let q(1) = 2 and let p(1) be the least prime >= x. The sequence U(x) follows inductively: for n >= 1, let q(n) is the least prime q such that x < p/q < p(n)/q(n) for some prime p. Let q(n+1) = q and let p(n+1) be the least prime p such that x < p/q < p(n)/q(n).
For a guide to POBAs, lower POBAs, and upper POBAs, see A265759.

Examples

			The upper POBAs to tau start with 5/2, 5/3, 31/19, 47/29, 157/97, 911/563, 1021/631. For example, if p and q are primes and q > 97, and p/q > tau, then 157/97 is closer to tau than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = GoldenRatio; z = 1000; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265800/A265801 *)
    Numerator[tL]   (* A265796 *)
    Denominator[tL] (* A265797 *)
    Numerator[tU]   (* A265798 *)
    Denominator[tU] (* A265799 *)
    Numerator[y]    (* A265800 *)
    Denominator[y]  (* A265801 *)

Extensions

a(13)-a(18) from Robert Price, Apr 06 2019

A019587 The left budding sequence: number of i such that 0 < i <= n and 0 < {phi*i} <= {phi*n}, where {} denotes the fractional part and phi = A001622.

Original entry on oeis.org

1, 1, 3, 2, 1, 5, 3, 8, 5, 2, 9, 5, 1, 10, 5, 15, 9, 3, 15, 8, 21, 13, 5, 20, 11, 2, 19, 9, 27, 16, 5, 25, 13, 1, 23, 10, 33, 19, 5, 30, 15, 41, 25, 9, 37, 20, 3, 33, 15, 46, 27, 8, 41, 21, 55, 34, 13, 49, 27, 5, 43, 20, 59, 35, 11, 52, 27, 2, 45, 19, 63, 36, 9, 55, 27, 74, 45, 16, 65
Offset: 1

Views

Author

Keywords

Examples

			{r} = 0.61...; {2r} = 0.23...; {3r} = 0.85...; {4r} = 0.47...; so that a(4) = 2.
		

References

  • J. H. Conway, personal communication.

Crossrefs

Programs

  • Haskell
    a019587 n = length $ filter (<= nTau) $
                map (snd . properFraction . (* tau) . fromInteger) [1..n]
       where (_, nTau) = properFraction (tau * fromInteger n)
             tau = (1 + sqrt 5) / 2
    -- Reinhard Zumkeller, Jan 28 2012
  • Maple
    Digits := 100;
    A019587 := proc(n::posint)
        local a,k,phi,kfrac,nfrac ;
        phi := (1+sqrt(5))/2 ;
        a :=0 ;
        nfrac := n*phi-floor(n*phi) ;
        for k from 1 to n do
            kfrac := k*phi-floor(k*phi) ;
            if evalf(kfrac-nfrac)  <= 0 then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A019587(n),n=1..100) ; # R. J. Mathar, Aug 13 2021
  • Mathematica
    r = GoldenRatio; p[x_] := FractionalPart[x];
    u[n_, k_] := If[p[k*r] <= p[n*r], 1, 0]
    v[n_, k_] := If[p[k*r] > p[n*r], 1, 0]
    s[n_] := Sum[u[n, k], {k, 1, n}]
    t[n_] := Sum[v[n, k], {k, 1, n}]
    Table[s[n], {n, 1, 100}]  (* A019587 *)
    Table[t[n], {n, 1, 100}]  (* A194733 *)
    (* Clark Kimberling, Sep 02 2011 *)

Formula

a(n) + A194733(n) = n.
The theorem prover Walnut (see link) can compute the following "linear representation" for a(n). Let v = [1,0,0,0,0,0,0,0,0,0,0,0], w = [0,1,1,3,2,1,5,3,8,5,2,9]^T, mu(0) =[[1,0,0,0,0,0,0,0,0,0,0,0], [0,0,1,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0,0,0], [0,0,0,0,0,1,0,0,0,0,0,0], [0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,0,1,0,0,0], [0,0,0,0,0,0,0,0,0,0,1,0], [0,0,0,0,0,0,0,0,0,0,0,1], [0,0,0,0,0,0,0,-1,0,0,2,0], [0,0,-2,0,0,1,0,2,0,0,0,0], [0,0,-1,-1,0,1,0,1,1,0,-1,1], [0,0,-1,0,0,0,0,0,0,0,2,0]], mu(1) = [[0,1,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,1,0,0,0,0,0,0,0], [0,0,0,0,0,0,1,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,-1,0,0,2,0,0], [0,-2,0,0,1,0,2,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0], [0,-1,0,0,0,0,0,0,0,2,0,0], [0,-4,0,0,2,0,4,0,0,-1,0,0]]. Then a(n) = v.mu(x).w, where x is the Zeckendorf (or Fibonacci) representation of n. This gives an algorithm for a(n) that runs in polynomial time in log n. - Jeffrey Shallit, Aug 09 2025

Extensions

Extended by Ray Chandler, Apr 18 2009
Previous Showing 21-30 of 1788 results. Next