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.

A265759 Numerators of primes-only best approximates (POBAs) to 1; see Comments.

Original entry on oeis.org

3, 2, 5, 13, 11, 19, 17, 31, 29, 43, 41, 61, 59, 73, 71, 103, 101, 109, 107, 139, 137, 151, 149, 181, 179, 193, 191, 199, 197, 229, 227, 241, 239, 271, 269, 283, 281, 313, 311, 349, 347, 421, 419, 433, 431, 463, 461, 523, 521, 571, 569, 601, 599, 619, 617
Offset: 1

Views

Author

Clark Kimberling, Dec 15 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a primes-only best approximate (POBA), and we write "p/q in B(x)", if 0 < |x - p/q| < |x - u/v| for all primes u and v such that v < q. Note that for some choices of x, there are values of q for which there are two POBAs. In these cases, the greater is placed first; e.g., B(3) = (7/2, 5/2, 17/5, 13/5, 23/7, 19/7, ...).
See A265772 and A265774 for definitions of lower POBA and upper POBA. In the following guide, for example, A001359/A006512 represents (conjecturally in some cases) the Lower POBAs p(n)/q(n) to 1, where p = A001359 and q = A006512 except for first terms in some cases. Every POBA is either a lower POBA or an upper POBA.
x Lower POBA Upper POBA POBA

Examples

			The POBAs for 1 start with 3/2, 2/3, 5/7, 13/11, 11/13, 19/17, 17/19, 31/29, 29/31, 43/41, 41/43, 61/59, 59/61. For example, if p and q are primes and q > 13, then 11/13 is closer to 1 than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = 1; z = 200; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265759/A265760 *)
    Numerator[tL]   (* A001359 *)
    Denominator[tL] (* A006512 *)
    Numerator[tU]   (* A006512 *)
    Denominator[tU] (* A001359 *)
    Numerator[y]    (* A265759 *)
    Denominator[y]  (* A265760 *)

A158015 Primes p such that 6*p-1 is also prime.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 23, 29, 43, 47, 53, 59, 67, 103, 107, 109, 113, 127, 137, 157, 163, 197, 199, 227, 229, 239, 269, 283, 313, 317, 347, 359, 373, 379, 383, 389, 397, 439, 443, 449, 457, 463, 467, 523, 569, 577, 593, 599, 613, 617, 647, 653, 709, 733, 743, 773
Offset: 1

Views

Author

Roger L. Bagula, Mar 11 2009

Keywords

Crossrefs

Cf. A005382 for the type 2p-1, A062737 for 4p-1, A158016 for 8p-1, A158017 for 10p-1.
Primes in A024898, i.e., intersection of A024898 with A000040.

Programs

  • Magma
    [p: p in PrimesUpTo(800) | IsPrime(6*p-1)]; // Vincenzo Librandi, Apr 14 2013
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[(6 # - 1)]&] (* Vincenzo Librandi, Apr 14 2013 *)

Extensions

Edited by the Associate Editors of the OEIS, Apr 22 2009

A158017 Primes p such that 10*p-1 is also prime.

Original entry on oeis.org

2, 3, 11, 23, 41, 71, 83, 101, 107, 113, 149, 167, 179, 227, 239, 269, 311, 317, 347, 353, 389, 479, 491, 521, 557, 569, 587, 647, 653, 683, 809, 821, 827, 839, 863, 911, 977, 983, 1091, 1229, 1259, 1283, 1289, 1301, 1367, 1373, 1439, 1487, 1493, 1607, 1619
Offset: 1

Views

Author

Roger L. Bagula, Mar 11 2009

Keywords

Comments

The family of prime sequences that generate primes k*p-1 for k = 2, 4, 6, 8, ... also comprises A005382 (k=2), A062737 (k=4), A158015 (k=6), and A158016 (k=8).

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(3000)|IsPrime(10*p-1)] // Vincenzo Librandi, Jan 29 2011
  • Mathematica
    Flatten[Table[If[PrimeQ[n] && PrimeQ[10*n - 1], n, {}], {n, 1, 10000}]]
    Select[Prime[Range[600]], PrimeQ[(10 # - 1)]&] (* Vincenzo Librandi, Apr 14 2013 *)

A158016 Primes p such that 8*p-1 is also prime.

Original entry on oeis.org

3, 13, 19, 61, 79, 103, 163, 181, 193, 223, 229, 313, 331, 349, 409, 433, 439, 541, 571, 613, 619, 691, 751, 769, 853, 859, 919, 991, 1021, 1033, 1039, 1321, 1381, 1423, 1483, 1543, 1549, 1621, 1699, 1759, 1801, 1861, 1873, 1879, 1951, 1999, 2011, 2029, 2113
Offset: 1

Views

Author

Roger L. Bagula, Mar 11 2009

Keywords

Crossrefs

Cf. A005382 for the type 2p-1, A062737 for 4p-1, A158015 for 6p-1, A158017 for 10p-1.

Programs

  • Magma
    [p: p in PrimesUpTo(2200) | IsPrime(8*p - 1)]; // Vincenzo Librandi, Apr 14 2013
  • Mathematica
    Select[Prime[Range[600]], PrimeQ[(8 # - 1)]&] (* Vincenzo Librandi, Apr 14 2013 *)

Extensions

Edited by the Associate Editors of the OEIS, Apr 22 2009

A162857 Primes of the form 4p - 1, p a prime.

Original entry on oeis.org

7, 11, 19, 43, 67, 163, 211, 283, 331, 523, 547, 691, 787, 907, 1051, 1123, 1171, 1531, 1723, 1867, 2011, 2083, 2251, 2347, 2371, 2467, 2707, 2731, 2803, 2971, 3187, 3307, 3547, 3643, 3907, 3931, 4051, 4243, 4363, 4603, 4651, 4723, 5107, 5227, 5443, 5923
Offset: 1

Views

Author

Daniel Tisdale, Jul 14 2009

Keywords

Comments

If 4p - 1 is prime then n^2 + n + p = p(4p - 1) for some n = 1, 2, 3, ... [Proof. Let n + 1 = 2p, etc.]
From Alonso del Arte, Jan 14 2024: (Start)
The first six terms correspond to rings of algebraic integers of Q(sqrt(-a(n))) which are unique factorization domains.
In the ring of algebraic integers of Q(sqrt(-a(n))), the corresponding prime p = (a(n) + 1)/4 is divisible by 1/2 - sqrt(-a(n))/2 and 1/2 + sqrt(-a(n))/2, both of those being algebraic integers with minimal polynomial x^2 - x + p. For example, in Q(sqrt(-163)), we see that (1/2 - sqrt(-163)/2)(1/2 + sqrt(-163)/2) = 1/4 + 163/4 = 41, with both of the divisors having the minimal polynomial x^2 - x + 41. (End)

Crossrefs

Cf. A062737 for the corresponding primes p.
Overlaps with A003173, the Heegner numbers (last six terms of that one match the first six of this one).

Programs

Formula

a(n) >> n log^2 n. - Charles R Greathouse IV, Jun 14 2022

Extensions

More terms from N. J. A. Sloane, Jul 19 2009

A265765 Numerators of primes-only best approximates (POBAs) to 4; see Comments.

Original entry on oeis.org

11, 7, 13, 11, 19, 29, 43, 53, 67, 149, 163, 173, 211, 269, 283, 293, 317, 331, 389, 509, 523, 547, 557, 653, 691, 773, 787, 797, 907, 1051, 1109, 1123, 1171, 1229, 1493, 1531, 1637, 1723, 1733, 1867, 1949, 1997, 2011, 2083, 2251, 2309, 2347, 2371, 2467
Offset: 1

Views

Author

Clark Kimberling, Dec 18 2015

Keywords

Comments

Suppose that x > 0. A fraction p/q of primes is a primes-only best approximate (POBA), and we write "p/q in B(x)", if 0 < |x - p/q| < |x - u/v| for all primes u and v such that v < q, and also, |x - p/q| < |x - p'/q| for every prime p' except p. Note that for some choices of x, there are values of q for which there are two POBAs. In these cases, the greater is placed first; e.g., B(3) = (7/2, 5/2, 17/5, 13/5, 23/7, 19/7, ...). See A265759 for a guide to related sequences.

Examples

			The POBAs for 4 start with  11/2, 7/2, 13/3, 11/3, 19/5, 29/7, 43/11, 53/13, 67/17. For example, if p and q are primes and q > 13, then 53/13 is closer to 3 than p/q is.
		

Crossrefs

Programs

  • Mathematica
    x = 4; z = 200; p[k_] := p[k] = Prime[k];
    t = Table[Max[Table[NextPrime[x*p[k], -1]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tL = Select[d, # > 0 &] (* lower POBA *)
    t = Table[Min[Table[NextPrime[x*p[k]]/p[k], {k, 1, n}]], {n, 1, z}];
    d = DeleteDuplicates[t]; tU = Select[d, # > 0 &] (* upper POBA *)
    v = Sort[Union[tL, tU], Abs[#1 - x] > Abs[#2 - x] &];
    b = Denominator[v]; s = Select[Range[Length[b]], b[[#]] == Min[Drop[b, # - 1]] &];
    y = Table[v[[s[[n]]]], {n, 1, Length[s]}] (* POBA, A265765/A120639 *)
    Numerator[tL]   (* A162857 *)
    Denominator[tL] (* A062737 *)
    Numerator[tU]   (* A090866 *)
    Denominator[tU] (* A023212 *)
    Numerator[y]    (* A265765 *)
    Denominator[y]  (* A120639 *)

A292024 a(n) is the smallest k such that n divides psi(k!) (k > 0).

Original entry on oeis.org

1, 3, 2, 3, 10, 3, 13, 4, 5, 10, 22, 3, 26, 13, 10, 4, 34, 5, 37, 10, 13, 22, 46, 4, 15, 26, 6, 13, 58, 10, 61, 5, 22, 34, 13, 5, 73, 37, 26, 10, 82, 13, 86, 22, 10, 46, 94, 4, 14, 15, 34, 26, 106, 6, 22, 13, 37, 58, 118, 10, 122, 61, 13, 6, 26, 22, 134, 34, 46, 13, 142, 5, 146, 73, 15, 37, 22, 26, 157
Offset: 1

Views

Author

Altug Alkan, Sep 07 2017

Keywords

Comments

From Robert Israel, Sep 14 2017: (Start)
If m and n are coprime then a(m*n) = max(a(m),a(n)).
a(n) <= 2n.
Suppose p is a prime >= 5. Then
a(p) = 2p-1 if p is in A005382, otherwise 2p.
a(p^2) = 2p if p is in A005382, otherwise 3p.
a(p^3) = 3p if p is in A005382, 4p-1 if p is in A062737, otherwise 4p.
(End)

Examples

			a(4) = 3 because 4 divides psi(3!) = 12 and 3 is the least number with this property.
		

Crossrefs

Programs

  • Maple
    A:= proc(n) option remember;
        local F, p, e, t, k;
        F:= ifactors(n)[2];
        if nops(F)=1 then
          p:= F[1][1];
          e:= F[1][2];
          if p = 3 then
            t:= 1; if e =1 then return 2 fi
          else t:= 0:
          fi;
          for k from 2*p by p do
            if isprime(k-1) then
              t:= t+padic:-ordp(k, p);
              if t >= e then return(k-1) fi;
            fi;
            t:= t + padic:-ordp(k, p);
            if t >= e then return k fi;
          od
        else
          max(seq(procname(t[1]^t[2]), t=F))
        fi
    end proc:
    A(1):= 1:
    map(A, [$1..100]); # Robert Israel, Sep 14 2017
  • Mathematica
    psi[n_] := Module[{p, e}, Product[{p, e} = pe; p^e + p^(e-1), {pe, FactorInteger[n]}]];
    a[n_] := Module[{k = 1}, While[!Divisible[psi[k!], n], k++]; k]; a[2] = 3;
    Array[a, 100] (* Jean-François Alcover, Oct 15 2020, after PARI *)
  • PARI
    a001615(n) = my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1));
    a(n) = {my(k=1); while(a001615(k!) % n, k++); k; } \\ after Charles R Greathouse IV at A001615

A337055 Numbers that are k+A000010(k) for at least two different k.

Original entry on oeis.org

24, 32, 33, 38, 45, 48, 56, 64, 76, 86, 93, 96, 112, 113, 128, 140, 150, 152, 153, 172, 182, 192, 200, 203, 213, 216, 224, 225, 231, 256, 258, 263, 280, 293, 297, 300, 304, 320, 325, 326, 333, 342, 344, 345, 352, 364, 374, 380, 383, 384, 393, 397, 400, 402, 410, 413, 429, 432, 448, 459, 470, 473
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 12 2020

Keywords

Comments

If p>2 and 4*p-1 are prime, then 12*p-4 is in the sequence.
If p>3 and (5*p-1)/2 are prime, then 5*p-2 is in the sequence.

Examples

			a(3)=33 is in the sequence because 33 = 17 + A000010(17) = 21 + A000010(21).
		

Crossrefs

Programs

  • Maple
    N:= 20000: # for terms <= N
    V:= Vector(N):
    for n from 1 to N do
      v:= n + numtheory:-phi(n);
      if v <= N then V[v]:= V[v]+1 fi
    od:
    select(t -> V[t]>=2, [$1..N]);

A200997 Terms of A135506 sorted (after removing the 1's).

Original entry on oeis.org

2, 2, 5, 5, 5, 5, 7, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 19, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 31, 37, 41, 41, 41, 43, 43, 43, 43, 43, 47, 47, 47, 47, 47, 53, 53, 53, 59, 59, 59, 59, 59, 61, 61, 61, 61, 61, 61, 61, 67, 67, 67, 67, 67, 71, 71, 71, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 79, 83, 83, 83, 89
Offset: 1

Views

Author

Benoit Cloitre, Jan 08 2013

Keywords

Comments

Terms of the sequence are primes and all primes except 3 appear finitely many times. p>=5 occurs 1 time iff 2p-1 is prime (cf. A005382). p>=11 occurs 3 times iff 4p-1 is prime (cf. A062737). In general p occurs 2m-1 times iff 2mp-1 is prime and 2ip-1 is composite for i=1,2,3,...,m-1.

Programs

  • PARI
    v=[];u1=1;for(n=2,1000,u2=u1+lcm(n,u1);r=u1;u1=u2;if(u2/r-1>1,v=concat(v,[u2/r-1]);));w=vecsort(v);a(n)=w[n];
Showing 1-9 of 9 results.