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.

A194738 Number of k such that {k*sqrt(3)} < {n*sqrt(3)}, where { } = fractional part.

Original entry on oeis.org

1, 1, 1, 4, 3, 2, 1, 7, 5, 3, 1, 10, 7, 4, 15, 11, 7, 3, 17, 12, 7, 2, 19, 13, 7, 1, 21, 14, 7, 29, 21, 13, 5, 30, 21, 12, 3, 31, 21, 11, 1, 32, 21, 10, 43, 31, 19, 7, 43, 30, 17, 4, 43, 29, 15, 56, 41, 26, 11, 55, 39, 23, 7, 54, 37, 20, 3, 53, 35, 17, 69, 50, 31, 12, 67
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2011

Keywords

Comments

Related sequences:
A019587, A194733, A019588, A194734; |r|=(1+sqrt(5))/2
A054072, A194735, A194736, A194737; |r|=sqrt(2)
A194738, A194739, A194740, A194741; |r|=sqrt(3)
A194742, A194743, A194744, A194745; |r|=sqrt(5)
A194746, A194747, A194748, A194749; |r|=sqrt(6)
A194762, A194763, A194764, A194765; |r|=2^(1/3)
In each case, trivially, the sum of the first two sequences is A000027(for n>0), and likewise for the sum of the other two.

Examples

			{r}=0.7...; {2r}=0.4...; {3r}=0.1...;
{4f}=0.9...; {5r}=0.6...; so that a(5)=3.
		

Crossrefs

Programs

  • Mathematica
    r = Sqrt[3]; 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}]   (* A194738 *)
    Table[t[n], {n, 1, 100}]   (* A194739 *)

A054065 Fractal sequence induced by tau: for k >= 1, let p(k) be the permutation of 1,2,...,k obtained by ordering the fractional parts {h*tau} for h=1,2,...,k; then juxtapose p(1),p(2),p(3),...

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 4, 1, 3, 5, 2, 4, 1, 3, 5, 2, 4, 1, 6, 3, 5, 2, 7, 4, 1, 6, 3, 5, 2, 7, 4, 1, 6, 3, 8, 5, 2, 7, 4, 9, 1, 6, 3, 8, 5, 10, 2, 7, 4, 9, 1, 6, 3, 8, 5, 10, 2, 7, 4, 9, 1, 6, 11, 3, 8, 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8, 13, 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8, 13, 5, 10, 2, 7, 12, 4, 9
Offset: 1

Views

Author

Keywords

Examples

			p(1)=(1); p(2)=(2,1); p(3)=(2,1,3); p(4)=(2,4,1,3).
As a triangular array (see A194832), first nine rows:
1
2 1
2 1 3
2 4 1 3
5 2 4 1 3
5 2 4 1 6 3
5 2 7 4 1 6 3
5 2 7 4 1 6 3 8
5 2 7 4 9 1 6 3 8
		

Crossrefs

Position of 1 in p(k) is given by A019446. Position of k in p(k) is given by A019587. For related arrays and sequences, see A194832.

Programs

  • Mathematica
    r = (1 + Sqrt[5])/2;
    t[n_] := Table[FractionalPart[k*r], {k, 1, n}];
    f = Flatten[Table[Flatten[(Position[t[n], #1] &) /@ Sort[t[n], Less]], {n, 1, 20}]] (* A054065 *)
    TableForm[Table[Flatten[(Position[t[n], #1] &) /@ Sort[t[n], Less]], {n, 1, 15}]]
    row[n_] := Position[f, n];
    u = TableForm[Table[row[n], {n, 1, 20}]]
    g[n_, k_] := Part[row[n], k];
    p = Flatten[Table[g[k, n - k + 1], {n, 1, 13}, {k, 1, n}]] (* A054069 *)
    q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 80}]]  (* A054068 *)
    (* Clark Kimberling, Sep 03 2011 *)
    Flatten[Table[Ordering[Table[FractionalPart[GoldenRatio k], {k, n}]], {n, 10}]] (* Birkas Gyorgy, Jun 30 2012 *)

Extensions

Extended by Ray Chandler, Apr 18 2009

A019588 The right budding sequence: # of i such that 0 < i <= n and {tau*n} <= {tau*i} < 1, where {} is fractional part.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also, the number of distinct blocks of the Fibonacci word (A003849) containing the maximum possible number of 1's for such a block. - Jeffrey Shallit, Jul 09 2025

References

  • J. H. Conway, personal communication.

Crossrefs

Programs

  • Haskell
    a019588 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
  • 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}]   (* A019588 *)
    Table[t[n], {n, 1, 100}]   (* A194734 *)
    (* Clark Kimberling, Sep 02 2011 *)
    Fold[Join[#1, Range[#1[[#2]], Length[#1] + 1 + Floor[GoldenRatio (#2 + 1)] - Floor[GoldenRatio #2], #2 + 1]] &, {1, 2}, Range[30]] (* Birkas Gyorgy, May 24 2012 *)

Formula

a(n) = A194733(n) + 1.

Extensions

Extended by Ray Chandler, Apr 18 2009

A054072 Position of n in the permutation of 1,2,...,n obtained by ordering the fractional parts {h*sqrt(2)} for h=1,2,...,n.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 7, 3, 7, 2, 7, 12, 5, 11, 3, 10, 1, 9, 17, 6, 15, 3, 13, 23, 9, 20, 5, 17, 1, 14, 27, 9, 23, 4, 19, 34, 13, 29, 7, 24, 41, 17, 35, 10, 29, 3, 23, 43, 15, 36, 7, 29, 51, 20, 43, 11, 35, 2, 27, 52, 17, 43, 7, 34, 61, 23, 51, 12, 41
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    r = Sqrt[2]; 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}]   (* this sequence *)
    Table[t[n], {n, 1, 100}]   (* A194735 *)

A194733 Number of k < n such that {k*r} > {n*r}, where { } = fractional part, r = (1+sqrt(5))/2 (the golden ratio).

Original entry on oeis.org

0, 1, 0, 2, 4, 1, 4, 0, 4, 8, 2, 7, 12, 4, 10, 1, 8, 15, 4, 12, 0, 9, 18, 4, 14, 24, 8, 19, 2, 14, 26, 7, 20, 33, 12, 26, 4, 19, 34, 10, 26, 1, 18, 35, 8, 26, 44, 15, 34, 4, 24, 44, 12, 33, 0, 22, 44, 9, 32, 55, 18, 42, 4, 29, 54, 14, 40, 66, 24, 51, 8, 36, 64, 19, 48, 2, 32
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2011

Keywords

Comments

The maximum possible value of a(n) is n-1. - Michael B. Porter, Jan 29 2012

Examples

			r = 1.618, 2r = 3.236, 3r = 4.854, and 4r = 6.472, where r=(1+sqrt(5))/2.  The fractional part of 4r is 0.472, which is less than the fractional parts of two of {r, 2r, 3r}, so a(4) = 2. - _Michael B. Porter_, Jan 29 2012
		

Crossrefs

Programs

  • Haskell
    a194733 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;
    A194733 := 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-1 do
            kfrac := k*phi-floor(k*phi) ;
            if evalf(kfrac-nfrac)  > 0 then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A194733(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 *)

Formula

a(n)+A019587(n)=n.

A194734 Number of k such that {-k*r} > {-n*r}, where { } = fractional part, r = (1+sqrt(5))/2 (the golden ratio).

Original entry on oeis.org

0, 0, 2, 1, 0, 4, 2, 7, 4, 1, 8, 4, 0, 9, 4, 14, 8, 2, 14, 7, 20, 12, 4, 19, 10, 1, 18, 8, 26, 15, 4, 24, 12, 0, 22, 9, 32, 18, 4, 29, 14, 40, 24, 8, 36, 19, 2, 32, 14, 45, 26, 7, 40, 20, 54, 33, 12, 48, 26, 4, 42, 19, 58, 34, 10, 51, 26, 1, 44, 18, 62, 35, 8, 54, 26, 73, 44
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2011

Keywords

Comments

The fractional part here uses the Mma implementation for negative arguments: It is the fractional part of the absolute value, turned negative. So a(n) = A019587(n)-1. - R. J. Mathar, Aug 13 2021

Crossrefs

Programs

  • 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}]   (* A019588 *)
    Table[t[n], {n, 1, 100}]   (* A193734 *)
Showing 1-6 of 6 results.