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 20 results. Next

A184796 Primes of the form floor(k*sqrt(3)).

Original entry on oeis.org

3, 5, 13, 17, 19, 29, 31, 41, 43, 53, 67, 71, 79, 83, 103, 107, 109, 131, 157, 173, 181, 193, 197, 199, 211, 223, 233, 239, 251, 263, 271, 277, 311, 313, 337, 349, 353, 367, 379, 389, 401, 419, 431, 433, 439, 443, 457, 467, 479, 491, 509, 521, 523, 547, 557, 569, 571, 587, 599, 601, 607, 613, 647, 659, 661, 673, 677, 691, 701, 727, 739, 743, 751, 769, 827, 829, 853, 857, 859, 881, 883, 907, 911, 919, 937, 947, 971, 983, 997, 1009, 1013, 1021, 1039
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2011

Keywords

Comments

See A184774.
Equals the prime terms of A022838. - Bill McEachen, Oct 28 2021

Examples

			The sequence A022838(n)=floor(n*sqrt(3)) begins with 1,3,5,6,8,10,12,13,15,17,19,... which includes the primes A022838(2)=3, A022838(3)=5, A022838(8)=13,...
		

Crossrefs

Programs

  • Mathematica
    r=3^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A022838 *)
    b[n_]:=Floor [n*s];  (* A054406 *)
    Table[a[n],{n,1,120}]
    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,300}];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,300}];t6
    (* The lists t1, t2, t3, t4, t5, t6 match the sequences
    A184796, A184797, A184798, A184799, A184800, A184801. *)

A184778 Numbers k such that 2k + floor(k*sqrt(2)) is prime.

Original entry on oeis.org

1, 4, 5, 7, 11, 14, 18, 21, 32, 41, 46, 48, 49, 56, 62, 79, 83, 86, 90, 93, 97, 114, 120, 123, 127, 130, 134, 137, 144, 165, 169, 172, 178, 181, 185, 188, 213, 220, 222, 223, 237, 243, 246, 250, 253, 257, 260, 267, 288, 302, 308, 311, 325, 329, 343, 346, 352, 360, 366, 369, 376
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2011

Keywords

Examples

			See A184774.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A001951 *)
    b[n_]:=Floor [n*s];  (* A001952 *)
    Table[a[n],{n,1,120}]
    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,300}]; 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,300}]; t6
    (* the lists t1,t2,t3,t4,t5,t6 match the sequences
    A184774, A184775, A184776 ,A184777, A184778, A184779 *)
  • PARI
    is(n)=isprime(sqrtint(2*n^2)+2*n) \\ Charles R Greathouse IV, May 22 2017
    
  • Python
    from itertools import count, islice
    from math import isqrt
    from sympy import isprime
    def A184778_gen(): # generator of terms
        return filter(lambda k:isprime((k<<1)+isqrt(k**2<<1)), count(1))
    A184778_list = list(islice(A184778_gen(),25)) # Chai Wah Wu, Jul 28 2022

A184775 Numbers k such that floor(k*sqrt(2)) is prime.

Original entry on oeis.org

2, 4, 5, 8, 14, 21, 22, 29, 31, 38, 42, 48, 52, 56, 59, 63, 69, 72, 73, 76, 80, 90, 93, 97, 106, 107, 123, 127, 128, 137, 140, 141, 158, 161, 162, 165, 169, 171, 178, 182, 186, 192, 196, 199, 220, 222, 239, 246, 247, 250, 254, 260, 264, 268, 271, 281, 284, 298, 305, 311, 318
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2011

Keywords

Comments

Chua, Park, & Smith prove a general result that implies that, for any m, there is a constant C(m) such that a(n+m) - a(n) < C(m) infinitely often. - Charles R Greathouse IV, Jul 01 2022

Examples

			See A184774.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A001951 *)
    b[n_]:=Floor [n*s];  (* A001952 *)
    Table[a[n],{n,1,120}]
    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,300}]; 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,300}]; t6
    (* the lists t1,t2,t3,t4,t5,t6 match the sequences
    A184774, A184775, A184776 ,A184777, A184778, A184779 *)
  • PARI
    isok(n) = isprime(floor(n*sqrt(2))); \\ Michel Marcus, Apr 10 2018
    
  • PARI
    is(n)=isprime(sqrtint(2*n^2)) \\ Charles R Greathouse IV, Jul 01 2022
    
  • Python
    from itertools import count, islice
    from math import isqrt
    from sympy import isprime
    def A184775_gen(): # generator of terms
        return filter(lambda k:isprime(isqrt(k**2<<1)), count(1))
    A184775_list = list(islice(A184775_gen(),25)) # Chai Wah Wu, Jul 28 2022

A184776 Numbers m such that prime(m) is of the form floor(k*sqrt(2)); complement of A184779.

Original entry on oeis.org

1, 3, 4, 5, 8, 10, 11, 13, 14, 16, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 40, 41, 42, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 82, 83, 85, 87, 89, 90, 92, 93, 95, 96, 97, 98, 99, 100, 101, 102, 104, 105, 108, 109, 110, 112, 114, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 132, 136, 137, 138, 139, 141, 142, 143, 144
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2011

Keywords

Examples

			See A184774.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A001951 *)
    b[n_]:=Floor [n*s];  (* A001952 *)
    Table[a[n],{n,1,120}]
    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,300}]; 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,300}]; t6
    (* the lists t1,t2,t3,t4,t5,t6 match the sequences
    A184774, A184775, A184776 ,A184777, A184778, A184779 *)
  • Python
    from itertools import count, islice
    from math import isqrt
    from sympy import primepi, isprime
    def A184776_gen(): # generator of terms
        return map(primepi,filter(isprime,(isqrt(k**2<<1) for k in count(1))))
    A184776_list = list(islice(A184776_gen(),25)) # Chai Wah Wu, Jul 28 2022

A184777 Primes of the form 2k + floor(k*sqrt(2)).

Original entry on oeis.org

3, 13, 17, 23, 37, 47, 61, 71, 109, 139, 157, 163, 167, 191, 211, 269, 283, 293, 307, 317, 331, 389, 409, 419, 433, 443, 457, 467, 491, 563, 577, 587, 607, 617, 631, 641, 727, 751, 757, 761, 809, 829, 839, 853, 863, 877, 887, 911, 983, 1031, 1051, 1061, 1109, 1123, 1171, 1181, 1201, 1229, 1249, 1259, 1283, 1297, 1307, 1321, 1399, 1423, 1427, 1433, 1447, 1451, 1471, 1481, 1543, 1553, 1567, 1597, 1601, 1621, 1669, 1693, 1741, 1789, 1823, 1847, 1867, 1877, 1901
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2011

Keywords

Examples

			See A184774.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A001951 *)
    b[n_]:=Floor [n*s];  (* A001952 *)
    Table[a[n],{n,1,120}]
    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,300}]; 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,300}]; t6
    (* the lists t1,t2,t3,t4,t5,t6 match the sequences
    A184774, A184775, A184776 ,A184777, A184778, A184779 *)
    Select[Table[2k+Floor[k Sqrt[2]],{k,1000}],PrimeQ] (* Harvey P. Dale, Mar 06 2025 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    from sympy import isprime
    def A184777_gen(): # generator of terms
        return filter(isprime,((k<<1)+isqrt(k**2<<1) for k in count(1)))
    A184777_list = list(islice(A184777_gen(),25)) # Chai Wah Wu, Jul 28 2022

A184779 Numbers m such that prime(m) is of the form 2k + floor(k*sqrt(2)); complement of A184776.

Original entry on oeis.org

2, 6, 7, 9, 12, 15, 18, 20, 29, 34, 37, 38, 39, 43, 47, 57, 61, 62, 63, 66, 67, 77, 80, 81, 84, 86, 88, 91, 94, 103, 106, 107, 111, 113, 115, 116, 129, 133, 134, 135, 140, 145, 146, 147, 150, 151, 154, 156, 166, 173, 177, 178, 186, 188, 193, 194, 197, 201, 204, 205, 208
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2011

Keywords

Examples

			See A184774.
		

Crossrefs

Programs

  • Mathematica
    r=2^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A001951 *)
    b[n_]:=Floor [n*s];  (* A001952 *)
    Table[a[n],{n,1,120}]
    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,300}]; 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,300}]; t6
    (* the lists t1,t2,t3,t4,t5,t6 match the sequences
    A184774, A184775, A184776 ,A184777, A184778, A184779 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    from sympy import isprime, primepi
    def A184779_gen(): # generator of terms
        return map(primepi,filter(isprime,((k<<1)+isqrt(k**2<<1) for k in count(1))))
    A184779_list = list(islice(A184779_gen(),25)) # Chai Wah Wu, Jul 28 2022

A184802 Primes of the form floor(k*sqrt(5)).

Original entry on oeis.org

2, 11, 13, 17, 29, 31, 53, 67, 71, 73, 89, 107, 109, 127, 131, 149, 163, 167, 181, 199, 223, 239, 241, 257, 263, 277, 281, 283, 313, 317, 337, 353, 373, 389, 409, 431, 433, 449, 467, 487, 491, 503, 509, 521, 523, 541, 547, 563, 599, 601, 617, 619, 641, 643
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2011

Keywords

Comments

See A184774.

Examples

			The sequence U(n)=floor(n*sqrt(5)) begins with
2,4,6,8,11,13,15,17,20,22,24,26,29,...,
which includes the primes U(1)=2, U(5)=11,...
		

Crossrefs

Programs

  • Mathematica
    r=5^(1/2); s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A022839 *)
    b[n_]:=Floor [n*s];  (* A108598 *)
    Table[a[n],{n,1,120}]
    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,300}];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,300}];t6
    (* The lists t1, t2, t3, t4, t5, t6 match the sequences
    A184802, A184803, A184804, A184805, A184806, A184807. *)
  • PARI
    for(k=1,300,isprime(p=sqrtint(k^2*5))&&print1(p",")) \\ M. F. Hasler, Aug 26 2014

A184792 Numbers k such that floor(k*r) is prime, where r = golden ratio=(1+sqrt(5))/2.

Original entry on oeis.org

2, 7, 11, 12, 18, 23, 27, 33, 37, 38, 42, 44, 49, 60, 63, 64, 70, 79, 81, 85, 86, 101, 107, 111, 112, 122, 123, 131, 138, 142, 148, 149, 159, 163, 168, 174, 175, 190, 194, 196, 205, 215, 216, 222, 227, 231, 237, 241, 248, 253, 259, 268, 274, 278, 283, 285, 289, 301, 304, 309, 311, 315, 322, 348, 352, 353, 357, 363, 367, 372, 379, 383, 390, 398, 400, 404, 409, 416, 419, 457, 468, 478, 487, 493, 500, 508, 509, 519, 530, 531, 545, 546, 561, 568, 582, 589, 598
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2011

Keywords

Examples

			The sequence L(n)=floor(n*r) begins with
1,3,4,6,8,9,11,12,14,16,17,...,
which includes the primes L(2)=3, L(7)=11,...
		

Crossrefs

Programs

  • Mathematica
    r=(1+5^(1/2))/2; s=r/(r-1);
    a[n_]:=Floor [n*r];  (* A095280 *)
    b[n_]:=Floor [n*s];  (* A095281 *)
    Table[a[n],{n,1,120}]
    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,300}];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,300}];t6
    (* The lists t1, t2, t3, t4, t5, t6 match the sequences
    A095280, A184792, A184793, A095281, A184794, A184795 *)
    Select[Range[600],PrimeQ[Floor[GoldenRatio #]]&] (* Harvey P. Dale, Mar 28 2024 *)

A184859 Primes of the form floor(kr+h), where r=(1+sqrt(5))/2 and h=1/2.

Original entry on oeis.org

2, 3, 5, 11, 13, 19, 23, 29, 31, 37, 47, 53, 61, 71, 73, 79, 83, 89, 97, 107, 113, 131, 139, 149, 157, 163, 167, 173, 181, 191, 193, 197, 199, 223, 227, 233, 239, 241, 251, 257, 269, 277, 283, 293, 307, 311, 317, 337, 349, 353, 359, 367, 379, 383, 401, 409, 419, 421, 443, 461, 463, 479, 487, 503, 521, 523, 547, 557, 563, 571, 587, 599, 607, 613, 631, 641, 647, 659, 673, 683, 691, 701, 709, 733, 739, 743, 751, 757, 769, 773, 809, 811, 827, 853, 859, 877, 883, 887, 911, 919, 929, 937, 947, 953, 971
Offset: 1

Views

Author

Clark Kimberling, Jan 23 2011

Keywords

Comments

See "conjecture generalized" at A184774.

Examples

			The sequence U(n)=floor(n*r+h) begins with
2,3,5,6,8,10,11,13,15,16,18,19,...,
which includes the primes U(1)=2, U(2)=3,...
		

Crossrefs

Programs

  • Mathematica
    r=(1+5^(1/2))/2; h=1/2;s=r/(r-1);
    a[n_]:=Floor [n*r+h];
    Table[a[n],{n,1,120}]  (* A007067 *)
    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,300}];t3
    (* Lists t1, t2, t3 match A184859, A184860, A184861. *)
    Select[Floor[GoldenRatio*Range[600]+1/2],PrimeQ] (* Harvey P. Dale, Jan 02 2013 *)

A228639 Decimal expansion of Sum_{n>=1} (-1)^floor(n*sqrt(2))/n.

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Aug 31 2013

Keywords

Comments

From Jon E. Schoenfield, Jul 08 2015: (Start)
If we define the partial sum s_n = Sum_{i=1..n} (-1)^floor(i*sqrt(2))/i then the real-valued sequence s_1, s_2, s_3, ... converges very slowly, and the convergence is not smooth because of the aperiodicity created by the (-1)^floor(i*sqrt(2)) factor. However, if we define the partial sum S_j = s_(n_j) where n_j is the j-th Pell number, then the real-valued sequence S_1, S_2, S_3, ... converges fairly quickly. It appears that, for either even or odd values of j, as j increases, S_j approaches
c0 + (c1 + k1*log(n))/n_j + (c2 + k2*log(n))/(n_j)^2 + (c3 + k3*log(n))/(n_j)^3 + ...,
but the coefficients c1, k1, c2, k2, c3, k3, etc. take one set of values when j is even and a different set of values when j is odd.
However, it also appears that, if we define the sequence of real numbers t_1, t_2, ... that results from adjusting each of the terms of the S_j sequence using
t_j = S_j - Sum{i=1..D} (-1)^(ij)*sqrt(2)*(j*d_i+(j mod 2)) / r^(j*(2i-1))
where r is the limit of the ratio Pell(j+1)/Pell(j) as j increases, i.e., r = 1 + sqrt(2), and d is the (empirically-determined) integer sequence
d = {0, 1, 3, 61, 395, 47041, 504987, 182501677, 2705354787, 2186736573121, ...}
(from which we use the first D terms in the above formula for t_j), then the sequence of real numbers t_1, t_2, ... follows the simpler form
c0 + C1/n_j + C2/(n_j)^2 + C3/(n_j)^3 + ...
where the coefficients c0, C1, C2, C3, etc. do not depend on the parity of j, and simple numerical methods can be used to evaluate those coefficients. E.g., if we use D=10 (or more), and if each of the values t_j is computed with a little more than 100 digits of precision, then c0 = -0.51541845582541799... can be obtained to 100 digits of precision by applying simple numerical methods to accelerate the convergence of the 21 values t_1, t_2, ..., t_21. (End)

Examples

			-0.51541845... (in reference only -0.5154, next digits computed by _Vaclav Kotesovec_).
-0.51541845582541799133011919963942987110456791854801... - _Jon E. Schoenfield_, Jul 08 2015
		

References

  • A. P. Prudnikov, Yu. A. Brychkov and O. I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 5: "Series", New York, Gordon and Breach Science Publishers, 1986-1992, p. 652, formula 6.

Crossrefs

Formula

Sum_{n>=1} (-1)^floor(n*sqrt(2))/n.
Showing 1-10 of 20 results. Next