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-10 of 62 results. Next

A054406 Beatty sequence for (3+sqrt 3)/2; complement of A022838.

Original entry on oeis.org

2, 4, 7, 9, 11, 14, 16, 18, 21, 23, 26, 28, 30, 33, 35, 37, 40, 42, 44, 47, 49, 52, 54, 56, 59, 61, 63, 66, 68, 70, 73, 75, 78, 80, 82, 85, 87, 89, 92, 94, 97, 99, 101, 104, 106, 108, 111, 113, 115, 118, 120, 123, 125, 127, 130, 132, 134, 137, 139, 141, 144, 146
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that A194979(k+1) = A194979(k). - Clark Kimberling, Dec 02 2014

Crossrefs

Cf. A194143 (partial sums), A182778 (even bisection), A184799 (prime terms).
Cf. A022838 (complement), A026255.
Cf. A194979.

Programs

A356088 a(n) = A001951(A022838(n)).

Original entry on oeis.org

1, 4, 7, 8, 11, 14, 16, 18, 21, 24, 26, 28, 31, 33, 35, 38, 41, 43, 45, 48, 50, 53, 55, 57, 60, 63, 65, 67, 70, 72, 74, 77, 80, 82, 84, 87, 90, 91, 94, 97, 100, 101, 104, 107, 108, 111, 114, 117, 118, 121, 124, 127, 128, 131, 134, 135, 138, 141, 144, 145
Offset: 1

Views

Author

Clark Kimberling, Aug 04 2022

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) u o v, defined by (u o v)(n) = u(v(n));
(2) u o v';
(3) u' o v;
(4) u' o v'.
Every positive integer is in exactly one of the four sequences.
Assume that if w is any of the sequences u, v, u', v', then lim_{n->oo} w(n)/n exists and defines the (limiting) density of w. For w = u,v,u',v', denote the densities by r,s,r',s'. Then the densities of sequences (1)-(4) exist, and 1/(r*r') + 1/(r*s') + 1/(s*s') + 1/(s*r') = 1.
For A356088, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor(n*sqrt(3)), so that r = sqrt(2), s = sqrt(3), r' = 2 + sqrt(2), s' = (3 + sqrt(3))/2.

Examples

			(1)  u o v   = (1,  4,  7,  8, 11, 14, 16, 18, 21, 24, 26, ...) = A356088.
(2)  u o v'  = (2,  5,  9, 12, 15, 19, 22, 25, 29, 32, 36, ...) = A356089.
(3)  u' o v  = (3, 10, 17, 20, 27, 34, 40, 44, 51, 58, 64, ...) = A356090.
(4)  u' o v' = (6, 13, 23, 30, 37, 47, 54, 61, 71, 78, 88, ...) = A356091.
		

Crossrefs

Cf. A001951, A001952, A022838, A054406, A346308 (intersections instead of results of composition), A356089, A356090, A356091.

Programs

  • Mathematica
    z = 600; zz = 100;
    u = Table[Floor[n*Sqrt[2]], {n, 1, z}];  (* A001951 *)
    u1 = Complement[Range[Max[u]], u];  (* A001952 *)
    v = Table[Floor[n*Sqrt[3]], {n, 1, z}];  (* A022838 *)
    v1 = Complement[Range[Max[v]], v];  (* A054406 *)
    Table[u[[v[[n]]]], {n, 1, zz}];    (* A356088 *)
    Table[u[[v1[[n]]]], {n, 1, zz}];   (* A356089 *)
    Table[u1[[v[[n]]]], {n, 1, zz}];   (* A356090 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}];  (* A356091 *)
  • Python
    from math import isqrt
    def A356088(n): return isqrt(isqrt(3*n*n)**2<<1) # Chai Wah Wu, Aug 06 2022

A245222 Continued fraction expansion of the constant c in A245221; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 14 2014

Keywords

Comments

See Comments at A245215.
Appears to be the same as the sequence 1 + [x == 0 (mod sqrt(3))], as x runs over the elements of N U N*sqrt(3) in increasing order, where N = {0, 1, 2, 3, ...} and [...] is the Iverson bracket. - M. F. Hasler, Feb 06 2025

Examples

			c = 2.7207664507294752975469517348171513242... ; the first 12 numbers f(n,1) comprise S(12) = {1, 2, 1/2, 3/2, 2/3, 5/3, 8/3, 3/8, 11/8, 8/11, 19/11, 11/19}; max(S(12)) = 8/3, with continued fraction [2,1,2].
From _M. F. Hasler_, Feb 06 2025: (Start)
Illustration of the "multiple of sqrt(3)" comment:
  n:  0   1   2    3   4    5    6   7   8    9   10  11  12   13  14  15
  x:  0   1  1.73  2   3   3.46  4   5  5.20  6  6.93  7   8  8.66  9  10
  m:  1   0   1    0   0    1    0   0   1    0   1    0   0   1    0   0
Here, x lists the elements of N U N*sqrt(3), and m = 1 if x == 0 (mod sqrt(3)), i.e., x is an integer multiple of sqrt(3). The sequence a(n) is m + 1. (End)
		

Crossrefs

Cf. A226080 (infinite Fibonacci tree), A245217, A245219, A245220, A245221 (decimal expansion).
Cf. A144612 (Sturmian word of slope (3-sqrt(3))/2; same as 2-a(n)).
Cf. A006337 (Hofstadter's eta sequence: an analog with sqrt(2)).

Programs

  • Mathematica
    tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = Sqrt[3]; w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; max = Max[N[Table[s[n], {n, 1, 3000}], 200]] (* A245221 *)
    ContinuedFraction[max, 120] (* A245222 *)
  • PARI
    /* illustration of the comment related to sqrt(3)*/
    [1+(abs(x-x\/s*s)<1e-9) | x<-Set(concat(Col([1.,s=sqrt(3)]~*[0..99])))[1..99] ] \\ M. F. Hasler, Feb 06 2025

Formula

a(n) = 2 - A144612(n) for all n > 0. - M. F. Hasler, Feb 06 2025

Extensions

Offset changed by Andrew Howroyd, Aug 08 2024

A245220 Decimal expansion of inf{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 14 2014

Keywords

Comments

See Comments at A245215.

Examples

			c = 0.367543491184951248721260972541092540...  The first 12 numbers f(n,1) comprise S(12) = {1, 2, 1/2, 3/2, 2/3, 5/3, 8/3, 3/8, 11/8, 8/11, 19/11, 11/19}; min(S(12)) = 3/8 = 0.375... and max(S(12)) = 8/3 = 2.666...
		

Crossrefs

Cf. A226080 (infinite Fibonacci tree), A245215, A245217, A245221, A245222.

Programs

  • Mathematica
    tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = Sqrt[3]; w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; $RecursionLimit = tmpRec;
    m = Min[N[Table[s[n], {n, 1, 4000}], 300]]
    t = RealDigits[m]  (* A245220 *)
    (* Peter J. C. Moses, Jul 04 2014 *)

Formula

a(n)*sup{f(n,1)} = 1.

A191336 (A022838 mod 2)+(A054406 mod 2).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 01 2011

Keywords

Comments

A022838: Beatty sequence for r=sqrt(3),
A054406: Beatty sequence for s=(3+sqrt(3))/2 (complement
of A022838), so that
A191336(n)=([nr] mod 2)+([ns] mod 2), where [ ]=floor.
A191336(n)=(number of odd numbers in {[nr],[ns]}).

Crossrefs

Programs

  • Mathematica
    r = Sqrt[3]; s = r/(r - 1); h = 320;
    u = Table[Floor[n*r], {n, 1, h}] (* A022838 *)
    v = Table[Floor[n*s], {n, 1, h}] (* A054406 *)
    w = Mod[u, 2] + Mod[v, 2] (* A191336 *)
    Flatten[Position[w, 0]]   (* A191337 *)
    Flatten[Position[w, 1]]   (* A191338 *)
    Flatten[Position[w, 2]]   (* A191339 *)

Formula

a(n)=([nr] mod 2)+([ns] mod 2), where r=sqrt(3), s=r/(r-1), and [ ]=floor.

A245221 Decimal expansion of sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 14 2014

Keywords

Comments

See Comments at A245215.

Examples

			c = 0.367543491184951248721260972541092540...  The first 12 numbers f(n,1) comprise S(12) = {1, 2, 1/2, 3/2, 2/3, 5/3, 8/3, 3/8, 11/8, 8/11, 19/11, 11/19}; min(S(12)) = 3/8 = 0.375... and max(S(12)) = 8/3 = 2.666...
		

Crossrefs

Cf. A226080 (infinite Fibonacci tree), A245215, A245217, A245220, A245222.

Programs

  • Mathematica
    tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = Sqrt[3]; w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; $RecursionLimit = tmpRec;
    m = Max[N[Table[s[n], {n, 1, 4000}], 300]]
    t = RealDigits[m]  (* A245221 *)
    (* Peter J. C. Moses, Jul 04 2014 *)

Formula

a(n)*inf{f(n,1)} = 1.

A356086 Intersection of A001952 and A022838.

Original entry on oeis.org

3, 6, 10, 13, 17, 20, 27, 34, 51, 58, 64, 71, 81, 88, 95, 102, 105, 109, 112, 116, 119, 122, 126, 129, 133, 136, 143, 150, 157, 174, 180, 187, 204, 211, 218, 221, 225, 228, 232, 235, 242, 245, 249, 252, 256, 259, 266, 273, 284, 285, 287, 289, 290, 292, 294
Offset: 1

Views

Author

Clark Kimberling, Aug 04 2022

Keywords

Comments

This is the third of four sequences, u^v, u^v', u'^v, u'^v', that partition the positive integers. See A346308.

Examples

			(1)  u ^ v   = ( 1,  5,  8, 12, 15, 19, 22, 24, 25, 29, 31, 32, ...) = A346308
(2)  u ^ v'  = ( 2,  4,  7,  9, 11, 14, 16, 18, 21, 26, 28, 33, ...) = A356085
(3)  u' ^ v  = ( 3,  6, 10, 13, 17, 20, 27, 34, 51, 58, 64, 71, ...) = A356086
(4)  u' ^ v' = (23, 30, 37, 40, 44, 47, 54, 61, 68, 75, 78, 85, ...) = A356087
		

Crossrefs

Cf. A001951, A001952, A022838, A054406, A346308, A356085, A356087, A356088 (results of composition instead of intersections).

Programs

  • Mathematica
    z = 200;
    r = Sqrt[2]; u = Table[Floor[n*r], {n, 1, z}]  (* A001951 *)
    u1 = Take[Complement[Range[1000], u], z]  (* A001952 *)
    r1 = Sqrt[3]; v = Table[Floor[n*r1], {n, 1, z}]  (* A022838 *)
    v1 = Take[Complement[Range[1000], v], z]  (* A054406 *)
    Intersection[u, v]    (* A346308 *)
    Intersection[u, v1]   (* A356085 *)
    Intersection[u1, v]   (* A356086 *)
    Intersection[u1, v1]  (* A356087 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    def A356086_gen(): # generator of terms
        return filter(lambda n:n == isqrt(3*(isqrt(n**2//3)+1)**2),((k:=n<<1)+isqrt(k*n) for n in count(1)))
    A356086_list = list(islice(A356086_gen(),30)) # Chai Wah Wu, Aug 06 2022

A356090 a(n) = A001952(A022838(n)).

Original entry on oeis.org

3, 10, 17, 20, 27, 34, 40, 44, 51, 58, 64, 68, 75, 81, 85, 92, 99, 105, 109, 116, 122, 129, 133, 139, 146, 153, 157, 163, 170, 174, 180, 187, 194, 198, 204, 211, 218, 221, 228, 235, 242, 245, 252, 259, 262, 269, 276, 283, 286, 293, 300, 307, 310, 317, 324
Offset: 1

Views

Author

Clark Kimberling, Aug 04 2022

Keywords

Comments

This is the third of four sequences that partition the positive integers. See A356088.

Examples

			(1)  u o v   = (1,  4,  7,  8, 11, 14, 16, 18, 21, 24, 26, ...) = A356088
(2)  u o v'  = (2,  5,  9, 12, 15, 19, 22, 25, 29, 32, 36, ...) = A356089
(3)  u' o v  = (3, 10, 17, 20, 27, 34, 40, 44, 51, 58, 64, ...) = A356090
(4)  u' o v' = (6, 13, 23, 30, 37, 47, 54, 61, 71, 78, 88, ...) = A356091
		

Crossrefs

Cf. A001951, A001952, A022838, A054406, A346308 (intersections instead of results of composition), A356088, A356089, A356091.

Programs

  • Mathematica
    z = 600; zz = 100;
    u = Table[Floor[n*Sqrt[2]], {n, 1, z}];  (* A001951 *)
    u1 = Complement[Range[Max[u]], u];  (* A001952 *)
    v = Table[Floor[n*Sqrt[3]], {n, 1, z}];  (* A022838 *)
    v1 = Complement[Range[Max[v]], v];  (* A054406 *)
    Table[u[[v[[n]]]], {n, 1, zz}]    (* A356088 *)
    Table[u[[v1[[n]]]], {n, 1, zz}]   (* A356089 *)
    Table[u1[[v[[n]]]], {n, 1, zz}]   (* A356090 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}]  (* A356091 *)

A356180 a(n) = A022838(A001951(n)).

Original entry on oeis.org

1, 3, 6, 8, 12, 13, 15, 19, 20, 24, 25, 27, 31, 32, 36, 38, 41, 43, 45, 48, 50, 53, 55, 57, 60, 62, 65, 67, 71, 72, 74, 77, 79, 83, 84, 86, 90, 91, 95, 96, 98, 102, 103, 107, 109, 112, 114, 116, 119, 121, 124, 126, 128, 131, 133, 136, 138, 142, 143, 145, 148
Offset: 1

Views

Author

Clark Kimberling, Aug 24 2022

Keywords

Comments

This is the first of four sequences that partition the positive integers. Suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their (increasing) complements, and consider these four sequences:
(1) v o u, defined by (v o u)(n) = v(u(n));
(2) v' o u;
(3) v o u';
(4) v' o u'.
Every positive integer is in exactly one of the four sequences. For the reverse composites, u o v, u o v', u' o v, u' o v', see A356088 to A356091.
Assume that if w is any of the sequences u, v, u', v', then lim_{n->oo} w(n)/n exists and defines the (limiting) density of w. For w = u,v,u',v', denote the densities by r,s,r',s'. Then the densities of sequences (1)-(4) exist, and
1/(r*r') + 1/(r*s') + 1/(s*s') + 1/(s*r') = 1.
For A356180, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor(n*sqrt(3)), so r = sqrt(2), s = sqrt(3), r' = 2 + sqrt(2), s' = (3 + sqrt(3))/2.

Examples

			(1)  v o u = (1, 3, 6, 8, 12, 13, 15, 19, 20, 24, 25, 27, 31, 32, ...) = A356180
(2)  v' o u = (2, 4, 9, 11, 16, 18, 21, 26, 28, 33, 35, 37, 42, 44, ...) = A356181
(3)  v o u' = (5, 10, 17, 22, 29, 34, 39, 46, 51, 58, 64, 69, 76, ...) = A356182
(4)  v' o u' = (7, 14, 23, 30, 40, 47, 54, 63, 70, 80, 87, 94, 104, ...) = A356183
		

Crossrefs

Cf. A001951, A001952, A022838, A054406, A346308 (intersections), A356088 (reverse composites), A356181, A356182, A356183.

Programs

  • Mathematica
    z = 800; zz = 100;
    u = Table[Floor[n*Sqrt[2]], {n, 1, z}];  (* A001951 *)
    u1 = Complement[Range[Max[u]], u];       (* A001952 *)
    v = Table[Floor[n*Sqrt[3]], {n, 1, z}];  (* A022838 *)
    v1 = Complement[Range[Max[v]], v];  (* A054406 *)
    Table[v[[u[[n]]]], {n, 1, zz}]      (* A356180 *)
    Table[v1[[u[[n]]]], {n, 1, zz}]     (* A356181 *)
    Table[v[[u1[[n]]]], {n, 1, zz}]     (* A356182 *)
    Table[v1[[u1[[n]]]], {n, 1, zz}]    (* A356183 *)
  • Python
    from math import isqrt
    def A356180(n): return isqrt(3*isqrt(n**2<<1)**2) # Chai Wah Wu, Sep 06 2022

A356182 a(n) = A022838(A001952(n)).

Original entry on oeis.org

5, 10, 17, 22, 29, 34, 39, 46, 51, 58, 64, 69, 76, 81, 88, 93, 100, 105, 110, 117, 122, 129, 135, 140, 147, 152, 159, 164, 171, 176, 181, 188, 193, 200, 206, 211, 218, 223, 230, 235, 240, 247, 252, 259, 265, 271, 277, 282, 289, 294, 301, 306, 311, 318, 323
Offset: 1

Views

Author

Clark Kimberling, Aug 24 2022

Keywords

Comments

This is the third of four sequences that partition the positive integers. See A356180.

Examples

			(1)  v o u = (1, 3, 6, 8, 12, 13, 15, 19, 20, 24, 25, 27, 31, 32, ...) = A356180
(2)  v' o u = (2, 4, 9, 11, 16, 18, 21, 26, 28, 33, 35, 37, 42, 44, ...) = A356181
(3)  v o u' = (5, 10, 17, 22, 29, 34, 39, 46, 51, 58, 64, 69, 76, ...) = A356182
(4)  v' o u' = (7, 14, 23, 30, 40, 47, 54, 63, 70, 80, 87, 94, 104, ...) = A356183
		

Crossrefs

Cf. A001951, A001952, A022838, A054406, A346308 (intersections), A356088 (reverse composites), A356180, A356181, A356183.

Programs

  • Mathematica
    z = 800; zz = 100;
    u = Table[Floor[n*Sqrt[2]], {n, 1, z}];  (* A001951 *)
    u1 = Complement[Range[Max[u]], u];       (* A001952 *)
    v = Table[Floor[n*Sqrt[3]], {n, 1, z}];  (* A022838 *)
    v1 = Complement[Range[Max[v]], v];  (* A054406 *)
    Table[v[[u[[n]]]], {n, 1, zz}]      (* A356180 *)
    Table[v1[[u[[n]]]], {n, 1, zz}]     (* A356181 *)
    Table[v[[u1[[n]]]], {n, 1, zz}]     (* A356182 *)
    Table[v1[[u1[[n]]]], {n, 1, zz}]    (* A356183 *)
  • Python
    from math import isqrt
    def A356182(n): return isqrt(3*((k:=n<<1)+isqrt(k*n))**2) # Chai Wah Wu, Sep 05 2022
Showing 1-10 of 62 results. Next