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

A003151 Beatty sequence for 1+sqrt(2); a(n) = floor(n*(1+sqrt(2))).

Original entry on oeis.org

2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, 36, 38, 41, 43, 45, 48, 50, 53, 55, 57, 60, 62, 65, 67, 70, 72, 74, 77, 79, 82, 84, 86, 89, 91, 94, 96, 98, 101, 103, 106, 108, 111, 113, 115, 118, 120, 123, 125, 127, 130, 132, 135, 137, 140, 142, 144
Offset: 1

Views

Author

Keywords

Comments

Numbers with an odd number of trailing 0's in their minimal representation in terms of the positive Pell numbers (A317204). - Amiram Eldar, Mar 16 2022
From Clark Kimberling, Dec 24 2022: (Start)
This is the first of four sequences that partition the positive integers. Starting with a general overview, suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their complements, and assume that the following four sequences are infinite:
(1) u ^ v = intersection of u and v (in increasing order);
(2) u ^ v';
(3) u' ^ v;
(4) u' ^ v'.
Every positive integer is in exactly one of the four sequences.
For A003151, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor(((1+sqrt(2))/2)*n), so that r = sqrt(2), s = (1+sqrt(2))/2, r' = (2+sqrt(2))/2, s' = 1 + 1/sqrt(2).
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.
(1) u ^ v = (2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, ...) = A003151
(2) u ^ v' = (1, 5, 8, 11, 15, 18, 22, 25, 29, 32, 35, 39, 42, ...) = A001954
(3) u' ^ v = (284, 287, 289, 292, 294, 296, 299, 301, 304, 306, ...) = A356135
(4) u' ^ v' = (3, 6, 10, 13, 17, 20, 23, 27, 30, 34, 37, 40, 44, ...) = A003152
For results of compositions instead of intersections, see A184922. (End)
The indices of the twice squares in the sequence of squares and twice squares: A028982(a(n)) = 2*n^2. - Amiram Eldar, Apr 13 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A003152.
Equals A001951(n) + n.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - N. J. A. Sloane, Mar 09 2021
Bisections: A197878, A215247.

Programs

  • Mathematica
    Table[Floor[n*(1 + Sqrt[2])], {n, 1, 50}] (* G. C. Greubel, Jul 02 2017 *)
  • PARI
    for(n=1,50, print1(floor(n*(1 + sqrt(2))), ", ")) \\ G. C. Greubel, Jul 02 2017
    
  • Python
    from math import isqrt
    def A003151(n): return n+isqrt(n*n<<1) # Chai Wah Wu, Aug 03 2022

Formula

a(1) = 2; for n>1, a(n+1) = a(n)+3 if n is already in the sequence, a(n+1) = a(n)+2 otherwise.

A341239 a(n) = floor(r*floor(s*n)), where r = 1 + sqrt(2) and s = sqrt(2).

Original entry on oeis.org

2, 4, 9, 12, 16, 19, 21, 26, 28, 33, 36, 38, 43, 45, 50, 53, 57, 60, 62, 67, 70, 74, 77, 79, 84, 86, 91, 94, 98, 101, 103, 108, 111, 115, 118, 120, 125, 127, 132, 135, 137, 142, 144, 149, 152, 156, 159, 161, 166, 168, 173, 176, 178, 183, 185, 190, 193, 197
Offset: 1

Views

Author

Clark Kimberling, Feb 07 2021

Keywords

Comments

Conjecture: 1 < r*s*n - a(n) < 3 for n >= 1.
From Clark Kimberling, Dec 27 2022: (Start)
This is the first of four sequences that partition the positive integers. Starting with a general overview, 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) u o v';
(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 A184922.
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 A341239, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor((1+sqrt(2))/2)*n), so that r = sqrt(2), s = (1+sqrt(2))/2, r' = (2+sqrt(2))/2, s' = 1 + 1/sqrt(2).
(1) v o u = (2, 4, 9, 12, 16, 19, 21, 26, 28, 33, 36, 38, ...) = A341239
(2) v' o u = (1, 3, 6, 8, 11, 13, 15, 18, 20, 23, 25, 27, ...) = A286666
(3) v o u' = (7, 14, 24, 31, 41, 48, 55, 65, 72, 82, 89, ...) = A188383
(4) v' o u' = (5, 10, 17, 22, 29, 34, 39, 46, 51, 58, 63, ...) = A098021
(End)

Crossrefs

Programs

  • Mathematica
    z = 140; r = 1 + Sqrt[2]; s = Sqrt[2]; f[x_] := Floor[r*Floor[s*x]];
    Table[f[n], {n, 1, z}]

Formula

a(n) = floor(r*floor(s*n)), where r = 1 + sqrt(2) and s = sqrt(2).

A184920 a(n) = n+[s*n/r]+[t*n/r]+[u*n/r], where []=floor and r=2^(1/2), s=r+1, t=r+2, u=r+3.

Original entry on oeis.org

7, 15, 24, 31, 40, 48, 55, 64, 73, 82, 89, 97, 106, 113, 122, 130, 140, 147, 155, 164, 171, 180, 188, 195, 205, 213, 222, 229, 238, 246, 253, 262, 271, 280, 287, 295, 304, 311, 320, 328, 335, 345, 353, 362, 369, 378, 386, 393, 402, 411, 420, 427, 435, 444, 451, 460, 468, 478, 485, 493, 502, 509, 518, 526, 533, 543, 551, 560, 567, 575, 584, 591, 600, 608, 618, 625, 633, 642, 649, 658, 666, 673, 683, 691, 700, 707, 716, 724, 731, 740, 749, 758, 765, 773, 782, 789, 798, 806, 816, 823, 831, 840, 847, 856, 864, 871, 880, 889, 898, 905, 913, 922, 929, 938, 946, 956, 963, 971, 980, 987
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2011

Keywords

Comments

The sequences A184920-A184923 partition the positive integers:
A184920: 7,15,24,31,40,48,55,64,...
A184921: 3,8,13,18,23,27,32,37,...
A184922: 2,5,9,12,16,19,22,26,29,...
A184923: 1,4,6,10,11,14,17,20,21,...
Jointly rank the sets {h*r}, {i*s}, {j*t}, {k*u}, where h>=1, i>=1, j>=1, k>=1.
The position of n*r in the joint ranking is n+[s*n/r]+[t*n/r]+[u*n/r], and likewise for the positions of n*s, n*t, and n*u.

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r+1; t=r+2; u=r+3;
    a[n_]:=n+Floor[n*s/r]+Floor[n*t/r]+Floor[n*u/r];
    b[n_]:=n+Floor[n*r/s]+Floor[n*t/s]+Floor[n*u/s];
    c[n_]:=n+Floor[n*r/t]+Floor[n*s/t]+Floor[n*u/t];
    d[n_]:=n+Floor[n*r/u]+Floor[n*s/u]+Floor[n*t/u];
    Table[a[n],{n,1,120}]  (* A184920 *)
    Table[b[n],{n,1,120}]  (* A184921 *)
    Table[c[n],{n,1,120}]  (* A184922 *)
    Table[d[n],{n,1,120}]  (* A184923 *)

A341240 a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) - 4*a(n-4) + 2*a(n-5) for n >= 7, where a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 12, a(5) = 38, a(6) = 127.

Original entry on oeis.org

1, 2, 4, 12, 38, 127, 432, 1472, 5023, 17148, 58544, 199879, 682428, 2329952, 7954951, 27159900, 92729696, 316598983, 1080936540, 3690548192, 12600319687, 43020182364, 146880090080, 501479995591, 1712159802204, 5845679217632, 19958397266119, 68142230629212
Offset: 1

Views

Author

Clark Kimberling, Feb 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    z = 50; r = 1 + Sqrt[2]; s = Sqrt[2]; f[x_] := Floor[r*Floor[s*x]];
    Table[f[n], {n, 1, z}] (* A341239 *)
    a[1] = 1; a[n_] := f[a[n - 1]];
    Table[a[n], {n, 1, z}] (* A341240 *)
    LinearRecurrence[{4,-2,1,-4,2},{1,2,4,12,38,127},30] (* Harvey P. Dale, Jun 14 2022 *)

Formula

Let f(n) = floor(r*floor(s*n)) = A184922(n), where r = 1 + sqrt(2) and s = sqrt(2). Let a(1) = 1. Then a(n) = f(a(n-1)) for n >= 2.
G.f.: x*(1 - 2*x - 2*x^2 - x^3 + x^5)/(1 - 4*x + 2*x^2 - x^3 + 4*x^4 - 2*x^5). - Stefano Spezia, Feb 11 2021

A339828 a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) - 4*a(n-4) + a(n-5) for n >= 6, where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 16, a(5) = 53.

Original entry on oeis.org

1, 2, 5, 16, 53, 179, 610, 2081, 7103, 24250, 82793, 282671, 965098, 3295049, 11249999, 38409898, 131139593, 447738575, 1528675114, 5219223305, 17819542991, 60839725354, 207719815433, 709199811023, 2421359613226, 8267038830857, 28225436096975, 96367666726186
Offset: 1

Views

Author

Clark Kimberling, Feb 07 2021

Keywords

Crossrefs

Programs

  • Mathematica
    z = 40; r = Sqrt[2]; s = 1 + Sqrt[2]; f[x_] := Floor[r*Floor[s*x]];
    Table[f[n], {n, 1, z}] m (* A184922 *)
    a[1] = 1; a[n_] := f[a[n - 1]]; Table[a[n], {n, 1, z}] (* A339828 *)

Formula

Let f(n) = floor(r*floor(s*n)) = A184922(n), where r = sqrt(2) and s = r + 1. Let a(1) = 1. Then a(n) = f(a(n-1)) for n >= 2.
Also, a(n) = 4*a(n-1) - 2*a(n-2) + a(n-3) - 4*a(n-4) + a(n-5) for n >= 6, where a(1) = 1, a(2) = 3, a(3) = 5, a(4) = 16, a(5) = 53.
G.f.: x*(-x^4 + x^3 + x^2 + 2*x - 1)/((x - 1)*(x^2 + x + 1)*(2*x^2 - 4*x + 1)). - Chai Wah Wu, Feb 15 2021

A184921 a(n) = n+[r*n/s]+[t*n/s]+[u*n/s], where []=floor and r=2^(1/2), s=r+1, t=r+2, u=r+3.

Original entry on oeis.org

3, 8, 13, 18, 23, 27, 32, 37, 42, 47, 52, 56, 61, 66, 71, 76, 81, 85, 90, 95, 100, 105, 110, 114, 119, 124, 129, 134, 139, 143, 148, 153, 158, 163, 167, 172, 177, 182, 187, 192, 196, 201, 206, 211, 216, 221, 225, 230, 235, 240, 245, 250, 254, 259, 264, 269, 274, 279, 283, 288, 293, 298, 303, 308, 312, 317, 322, 327, 332, 336, 341, 346, 351, 356, 361, 365, 370, 375, 380, 385, 390, 394, 399, 404, 409, 414, 419, 423, 428, 433, 438, 443, 448, 452, 457, 462, 467, 472, 477, 481, 486, 491, 496, 501, 505, 510, 515, 520, 525, 530, 534, 539, 544, 549, 554, 559, 563, 568, 573, 578
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2011

Keywords

Comments

The sequences A184920-A184923 partition the positive integers:
A184920: 7,15,24,31,40,48,55,64,...
A184921: 3,8,13,18,23,27,32,37,...
A184922: 2,5,9,12,16,19,22,26,29,...
A184923: 1,4,6,10,11,14,17,20,21,...
Jointly rank the sets {h*r}, {i*s}, {j*t}, {k*u}, where h>=1, i>=1, j>=1, k>=1.
The position of n*s in the joint ranking is n+[r*n/s]+[t*n/s]+[u*n/s], and likewise for the positions of n*r, n*t, and n*u.

Crossrefs

Programs

A184923 a(n) = n+[r*n/u]+[s*n/u]+[t*n/u], where []=floor and r=2^(1/2), s=r+1, t=r+2, u=r+3.

Original entry on oeis.org

1, 4, 6, 10, 11, 14, 17, 20, 21, 25, 28, 30, 34, 35, 38, 41, 44, 45, 49, 51, 54, 58, 59, 62, 65, 68, 69, 72, 75, 78, 79, 83, 86, 88, 92, 93, 96, 99, 102, 103, 107, 109, 112, 116, 117, 120, 123, 126, 127, 131, 133, 136, 137, 141, 144, 146, 150, 151, 154, 157, 160, 161, 165, 168, 170, 174, 175, 178, 181, 184, 185, 189, 191, 194, 198, 199, 202, 204, 208, 209, 212, 215, 218, 219, 223, 226, 228, 232, 233, 236, 239, 242, 243, 247, 249, 252, 256, 257, 260, 263, 266, 267, 270, 273, 276, 277, 281, 284, 286, 290, 291, 294, 297, 300, 301, 305, 307, 310, 314, 315
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2011

Keywords

Comments

The sequences A184920-A184923 partition the positive integers:
A184920: 7,15,24,31,40,48,55,64,...
A184921: 3,8,13,18,23,27,32,37,...
A184922: 2,5,9,12,16,19,22,26,29,...
A184923: 1,4,6,10,11,14,17,20,21,...
Jointly rank the sets {h*r}, {i*s}, {j*t}, {k*u}, where h>=1, i>=1, j>=1, k>=1.
The position of n*u in the joint ranking is n+[r*n/u]+[s*n/u]+[t*n/u], and likewise for the positions of n*s, n*t, and n*u.

Crossrefs

Programs

A356219 Intersection of A001952 and A003151.

Original entry on oeis.org

284, 287, 289, 292, 294, 296, 299, 301, 304, 306, 309, 311, 313, 316, 318, 321, 323, 325, 328, 330, 333, 335, 337, 340, 342, 345, 347, 350, 352, 354, 357, 359, 362, 364, 366, 369, 371, 374, 376, 379, 381, 383, 386, 388, 391, 393, 395, 398, 400
Offset: 1

Views

Author

Clark Kimberling, Nov 13 2022

Keywords

Comments

This is the third of four sequences that partition the positive integers. Starting with a general overview, suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. Let u' and v' be their complements, and assume that the following four sequences are infinite:
(1) u ^ v = intersection of u and v (in increasing order);
(2) u ^ v';
(3) u' ^ v;
(4) u' ^ 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 A356219, u, v, u', v', are the Beatty sequences given by u(n) = floor(n*sqrt(2)) and v(n) = floor(((1+sqrt(2))/2)*n), so that r = sqrt(2), s = (1+sqrt(2))/2, r' = (2+sqrt(2))/2, s' = 1 + 1/sqrt(2).

Examples

			(1)  u ^ v = (2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, ...) = A003151.
(2)  u ^ v' = (1, 5, 8, 11, 15, 18, 22, 25, 29, 32, 35, 39, 42, ...) = A001954.
(3)  u' ^ v = (284, 287, 289, 292, 294, 296, 299, 301, 304, 306, ...) = A356219.
(4)  u' ^ v' = (3, 6, 10, 13, 17, 20, 23, 27, 30, 34, 37, 40, 44, ...) = A003152.
		

Crossrefs

Cf. A001951, A001952, A003151, A003152, A001954, A184922 (results of compositions instead of intersections), A341239 (reversed compositions).

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 = 1 + Sqrt[2]; v = Table[Floor[n*r1], {n, 1, z}]  (* A003151 *)
    v1 = Take[Complement[Range[1000], v], z]  (* A003152 *)
    t1 = Intersection[u, v]    (* A003151 *)
    t2 = Intersection[u, v1]   (* A001954 *)
    t3 = Intersection[u1, v]   (* A356219 *)
    t4 = Intersection[u1, v1]  (* A001952 *)

A359351 a(n) = A001952(A003151(n)).

Original entry on oeis.org

6, 13, 23, 30, 40, 47, 54, 64, 71, 81, 88, 95, 105, 112, 122, 129, 139, 146, 153, 163, 170, 180, 187, 194, 204, 211, 221, 228, 238, 245, 252, 262, 269, 279, 286, 293, 303, 310, 320, 327, 334, 344, 351, 361, 368, 378, 385, 392, 402, 409, 419, 426, 433, 443
Offset: 1

Views

Author

Clark Kimberling, Dec 27 2022

Keywords

Comments

This is the third of four sequences that partition the positive integers. Starting with a general overview, suppose that u = (u(n)) and v = (v(n)) are increasing sequences of positive integers. For details, see A184922.
(1) u o v = (2, 5, 9, 12, 16, 19, 22, 26, 29, 33, 36, 39, 43, ...) = A184922
(2) u o v' = (1, 4, 7, 8, 11, 14, 15, 18, 21, 24, 25, 28, 31, ...) = A188376
(3) u' o v = (6, 13, 23, 30, 40, 47, 54, 64, 71, 81, 88, 95, ...) = A359351
(4) u' o v' = (3, 10, 17, 20, 27, 34, 37, 44, 51, 58, 61, 68, ...) = A188396

Crossrefs

Cf. A001951, A001952, A003151 (intersections instead of the rersults of composition), A003152, A184922, A188376, A356136, A188396, A341239 (results of reversed composition).

Programs

  • Mathematica
    z = 1200; zz = 150;
    u = Table[Floor[n Sqrt[2]], {n, 1, z}];
    u1 = Complement[Range[Max[u]], u];
    v = Table[Floor[n (1 + Sqrt[2])], {n, 1, z}];
    v1 = Complement[Range[Max[v]], v];
    Table[u[[v[[n]]]], {n, 1, zz}];   (* A184922 *)
    Table[u[[v1[[n]]]], {n, 1, zz}];  (* A188376 *)
    Table[u1[[v[[n]]]], {n, 1, zz}];  (* A359351 *)
    Table[u1[[v1[[n]]]], {n, 1, zz}]; (* A188396 *)
Showing 1-9 of 9 results.