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

A184812 n+floor(ns/r)+floor(nt/r), where r=sqrt(2), s=sqrt(3), t=sqrt(5).

Original entry on oeis.org

3, 7, 10, 14, 18, 22, 26, 29, 34, 37, 41, 44, 48, 53, 56, 60, 63, 68, 72, 75, 79, 82, 87, 90, 94, 98, 102, 106, 109, 113, 117, 121, 125, 128, 132, 136, 140, 144, 147, 151, 155, 159, 162, 166, 171, 174, 178, 181, 186, 190, 193, 197, 200, 205, 208, 212, 216
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2011

Keywords

Comments

This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets
{i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are disjoint.
Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that
a(n)=n+[ns/r]+[nt/r],
b(n)=n+[nr/s]+[nt/s],
c(n)=n+[nr/t]+[ns/t], where []=floor.
Taking r=sqrt(2), s=sqrt(3), t=sqrt(5) yields

Crossrefs

Cf. A184813, A184814. Associated partition of the primes: A184815, A184816, A184817.

Programs

  • Mathematica
    r=2^(1/2); s=3^(1/2); t=5^(1/2);
    a[n_]:=n+Floor[n*s/r]+Floor[n*t/r];
    b[n_]:=n+Floor[n*r/s]+Floor[n*t/s];
    c[n_]:=n+Floor[n*r/t]+Floor[n*s/t]
    Table[a[n],{n,1,120}]  (* A184812 *)
    Table[b[n],{n,1,120}]  (* A184813 *)
    Table[c[n],{n,1,120}]  (* A184814 *)
  • Maxima
    r:sqrt(2)$ s:sqrt(3)$  t:sqrt(5)$
    makelist(n+floor(n*s/r)+floor(n*t/r),n,1,50); /* Martin Ettl, Oct 18 2012 */
  • PARI
    sr=sqrt(3/2);tr=sqrt(5/2);for(n=1,100,print1(n+floor(n*sr)+floor(n*tr)", ")) \\ Charles R Greathouse IV, Jul 15 2011
    

Formula

a(n)=n+floor(ns/r)+floor(nt/r), r=sqrt(2), s=sqrt(3), t=sqrt(5).

A184815 Numbers m such that prime(m) is of the form k+floor(ks/r)+floor(kt/r), where r=sqrt(2), s=sqrt(3), t=sqrt(5).

Original entry on oeis.org

2, 4, 10, 12, 13, 16, 22, 29, 30, 36, 42, 44, 45, 49, 52, 57, 59, 60, 64, 70, 71, 76, 82, 84, 90, 91, 92, 97, 101, 103, 108, 111, 114, 115, 119, 123, 125, 138, 140, 142, 149, 150, 165, 171, 178, 180, 182, 185, 189, 191, 192, 193, 195, 198, 205, 211, 215, 217, 220, 222, 224, 233, 235, 236, 247, 248, 249, 252, 254, 255, 264, 265, 269, 273, 286, 295, 301, 302, 306, 307, 309, 316, 318, 325, 326, 327, 328, 329, 332, 336
Offset: 1

Views

Author

Clark Kimberling, Jan 23 2011

Keywords

Comments

A184815, A184816, and A184817 partition the primes:
A184815: 3,7,29,37,... of the form n+[ns/r]+[nt/r].
A184816: 2,5,17,... of the form n+[nr/s]+[nt/s].
A184817: 11,13,19,23,31,... of the form n+[nr/t]+[ns/t].
The Mathematica code can be easily modified to print primes in the three classes.

Examples

			See A184812.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=3^(1/2); t=5^(1/2);
    a[n_]:=n+Floor [n*s/r]+Floor[n*t/r];
    b[n_]:=n+Floor [n*r/s]+Floor[n*t/s];
    c[n_]:=n+Floor[n*r/t]+Floor[n*s/t]
    Table[a[n],{n,1,120}]  (* A184812 *)
    Table[b[n],{n,1,120}]  (* A184813 *)
    Table[c[n],{n,1,120}]  (* A184814 *)
    t1={};Do[If[PrimeQ[a[n]], AppendTo[t1,a[n]]],{n,1,600}];t1;
    t2={};Do[If[PrimeQ[a[n]], AppendTo[t2,n]],{n,1,600}];t2;
    t3={};Do[If[MemberQ[t1,Prime[n]],AppendTo[t3,n]],{n,1,600}];t3
    t4={};Do[If[PrimeQ[b[n]], AppendTo[t4,b[n]]],{n,1,600}];t4;
    t5={};Do[If[PrimeQ[b[n]], AppendTo[t5,n]],{n,1,600}];t5;
    t6={};Do[If[MemberQ[t4,Prime[n]],AppendTo[t6,n]],{n,1,600}];t6
    t7={};Do[If[PrimeQ[c[n]], AppendTo[t7,c[n]]],{n,1,600}];t7;
    t8={};Do[If[PrimeQ[c[n]], AppendTo[t8,n]],{n,1,600}];t8;
    t9={};Do[If[MemberQ[t7,Prime[n]],AppendTo[t9,n]],{n,1,600}];t9
    (* Lists t3, t6, t9 match A184815, A184816, A184817. *)

A184816 Numbers m such that prime(m) is of the form k+floor(kr/s)+floor(kt/s), where r=sqrt(2), s=sqrt(3), t=sqrt(5).

Original entry on oeis.org

1, 3, 7, 14, 18, 19, 21, 23, 24, 26, 34, 37, 39, 40, 41, 50, 53, 54, 55, 56, 65, 68, 69, 72, 78, 80, 81, 83, 86, 93, 95, 96, 98, 105, 106, 109, 113, 117, 124, 126, 129, 131, 133, 135, 137, 139, 143, 145, 148, 152, 157, 158, 159, 160, 161, 162, 168, 169, 172, 173, 174, 176, 183, 187, 190, 197, 200, 207, 208, 212, 214, 219, 229, 232, 234, 238, 242, 243, 245, 246, 257, 258, 259, 266, 267, 268, 270, 275, 276, 278, 279, 280, 281, 284
Offset: 1

Views

Author

Clark Kimberling, Jan 23 2011

Keywords

Comments

See A184812 and A184815.

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=3^(1/2); t=5^(1/2);
    a[n_]:=n+Floor[n*s/r]+Floor[n*t/r];
    b[n_]:=n+Floor[n*r/s]+Floor[n*t/s];
    c[n_]:=n+Floor[n*r/t]+Floor[n*s/t]
    Table[a[n],{n,1,120}]  (* A184812 *)
    Table[b[n],{n,1,120}]  (* A184813 *)
    Table[c[n],{n,1,120}]  (* A184814 *)
    t1={};Do[If[PrimeQ[a[n]], AppendTo[t1,a[n]]],{n,1,600}];t1;
    t2={};Do[If[PrimeQ[a[n]], AppendTo[t2,n]],{n,1,600}];t2;
    t3={};Do[If[MemberQ[t1,Prime[n]],AppendTo[t3,n]],{n,1,600}];t3
    t4={};Do[If[PrimeQ[b[n]], AppendTo[t4,b[n]]],{n,1,600}];t4;
    t5={};Do[If[PrimeQ[b[n]], AppendTo[t5,n]],{n,1,600}];t5;
    t6={};Do[If[MemberQ[t4,Prime[n]],AppendTo[t6,n]],{n,1,600}];t6
    t7={};Do[If[PrimeQ[c[n]], AppendTo[t7,c[n]]],{n,1,600}];t7;
    t8={};Do[If[PrimeQ[c[n]], AppendTo[t8,n]],{n,1,600}];t8;
    t9={};Do[If[MemberQ[t7,Prime[n]],AppendTo[t9,n]],{n,1,600}];t9
    (* Lists t3, t6, t9 match A184815, A184816, A184817. *)
    PrimePi/@Select[Table[k+Floor[(k Sqrt[2])/Sqrt[3]]+Floor[(k Sqrt[5])/Sqrt[3]],{k,600}],PrimeQ] (* Harvey P. Dale, Apr 25 2023 *)
Showing 1-3 of 3 results.