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

A031924 Primes followed by a gap of 6, i.e., next prime is p + 6.

Original entry on oeis.org

23, 31, 47, 53, 61, 73, 83, 131, 151, 157, 167, 173, 233, 251, 257, 263, 271, 331, 353, 367, 373, 383, 433, 443, 503, 541, 557, 563, 571, 587, 593, 601, 607, 647, 653, 677, 727, 733, 751, 941, 947, 971, 977, 991, 1013, 1033, 1063, 1097, 1103, 1117, 1123, 1181
Offset: 1

Views

Author

Keywords

Comments

Original name: Lower prime of a difference of 6 between consecutive primes.
Conjecture: The sequence is infinite and for every n >= 7746, a(n+1) < a(n)^(1+1/n). Namely for n >= 7746, a(n)^(1/n) is a strictly decreasing function of n (See comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Examples

			23 is a term as the next prime 29 = 23 + 6.
		

Crossrefs

Cf. A001359, A023201, A031925; A031924 and A007529 together give A023201.

Programs

  • GAP
    P:=Filtered([1..1200],IsPrime);;
    List(Filtered([1..Length(P)-1],i->P[i+1]-P[i]=6),k->P[k]); # Muniru A Asiru, Jan 30 2019
  • Magma
    [p: p in PrimesUpTo(1200) | NextPrime(p)-p eq 6]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    A031924 := proc(n)
        option remember;
        if n = 1 then
            return 23;
        else
            p := nextprime(procname(n-1)) ;
            q := nextprime(p) ;
            while q-p <> 6 do
                p := q ;
                q := nextprime(p) ;
            end do:
            return p;
        end if;
    end proc: # R. J. Mathar, Jan 23 2013
  • Mathematica
    Transpose[Select[Partition[Prime[Range[200]], 2, 1], Last[#] - First[#] == 6 &]][[1]] (* Bruno Berselli, Apr 09 2013 *)
  • PARI
    is(n)=isprime(n)&&nextprime(n+1)-n==6 \\ Charles R Greathouse IV, Mar 21 2013
    
  • PARI
    apply( A031924(n,p=2,show=0,g=6)={forprime(q=p+1,, p+g!=(p=q) || (show&&print1(p-g",")) || n-- || return(p-g))}, [1..99]) \\ Use nxt(p)=A031924(1,p) to get the term following p, use show=1 to print all a(1..n), g to select a different gap. - M. F. Hasler, Jan 02 2020
    

Extensions

New name from M. F. Hasler, Jan 02 2020

A031926 Lower prime of a difference of 8 between consecutive primes.

Original entry on oeis.org

89, 359, 389, 401, 449, 479, 491, 683, 701, 719, 743, 761, 911, 929, 983, 1109, 1163, 1193, 1373, 1439, 1523, 1559, 1571, 1733, 1823, 1979, 2003, 2153, 2213, 2243, 2273, 2459, 2531, 2609, 2663, 2699, 2741, 2843, 2879, 2909, 3011, 3041
Offset: 1

Views

Author

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely a(n)^(1/n) is a strictly decreasing function of n (see comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Crossrefs

Cf. A023202.

Programs

  • Magma
    [p: p in PrimesUpTo(4000) | NextPrime(p)-p eq 8]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    for i from 1 to 446 do if ithprime(i+1) = ithprime(i) + 8 then print({ithprime(i)}); fi; od; # Zerinvary Lajos, Mar 19 2007
    p:=ithprime; nx:=nextprime; f:=proc(d) global p,nx; local i,t0,n; t0:=[]; for n from 1 to 100000 do i:=p(n); if nx(i)-i=d then t0:=[op(t0),i]; fi; od: t0; end; f(8); # N. J. A. Sloane, Jan 17 2012
  • Mathematica
    Transpose[Select[Partition[Prime[Range[500]], 2, 1], Last[#] - First[#] == 8 &]][[1]] (* Bruno Berselli, Apr 09 2013 *)
  • PARI
    is_A031926(p)={precprime(p-1)==p-8 && isprime(p)} \\ M. F. Hasler, Apr 20 2013
    
  • PARI
    q=0;forprime(p=1,5000,q+8==(q=p)&&print1(p-8",")) \\ M. F. Hasler, Apr 20 2013

A031928 Lower prime of a difference of 10 between consecutive primes.

Original entry on oeis.org

139, 181, 241, 283, 337, 409, 421, 547, 577, 631, 691, 709, 787, 811, 829, 919, 1021, 1039, 1051, 1153, 1171, 1249, 1399, 1471, 1627, 1699, 1723, 1801, 1879, 2017, 2029, 2053, 2089, 2143, 2521, 2647, 2719, 2731, 2767, 2887, 2917, 3001, 3109, 3361, 3517, 3547, 3571, 3583, 3709, 3769, 3823, 3853, 4201, 4219, 4231, 4243, 4261, 4273, 4327, 4339, 4363, 4483, 4663, 4861, 4909, 4957, 5011, 5179, 5323, 5581, 5659, 5701, 5791, 5869, 6079, 6091
Offset: 1

Views

Author

Lekraj Beedassy, Jul 23 2003

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely, a(n)^(1/n) is a strictly decreasing function of n (see comments at A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(7000) | NextPrime(p)-p eq 10]; // Bruno Berselli, Apr 09 2013
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[800]], 2, 1], #[[2]] - #[[1]] == 10&]] [[1]] (* Harvey P. Dale, Oct 02 2014 *)
    p = Prime@Range@800; p[[Flatten@Position[Differences@p, 10]]] (* Hans Rudolf Widmer, Aug 28 2022 *)
  • PARI
    forprime(p=o=1,1e4,10+o==(o=p)&&print1(p-10",")) \\ M. F. Hasler, Mar 10 2017

Formula

a(n) = prime(A320703(n)). - R. J. Mathar, Apr 30 2024

Extensions

Edited by Labos Elemer, Jul 25 2003

A031930 Lower prime of a difference of 12 between consecutive primes.

Original entry on oeis.org

199, 211, 467, 509, 619, 661, 797, 997, 1201, 1237, 1307, 1459, 1499, 1511, 1531, 1709, 1789, 1811, 1889, 2069, 2099, 2297, 2399, 2447, 2579, 2621, 2777, 2927, 3049, 3067, 3169, 3191, 3259, 3331, 3347, 3499, 3559, 3659, 3931, 3989
Offset: 1

Views

Author

Keywords

Comments

Some of the terms of this sequence are primes that are separated from both their predecessor and successor primes by 12, e.g., 211, 1511, 4409, 4691, 7841, 9871, 11299, 11411, 11731. See A053072. - Harvey P. Dale, Apr 07 2013
Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely a(n)^(1/n) is a strictly decreasing function of n (See comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014
Aside from 2 and 3, all primes are congruent to 1, 5, 7, 11 mod 12. Thus the least significant duodecimal digit of any term in this sequence is 1, 5, 7 or B. - Alonso del Arte, Aug 19 2017

Examples

			199 is a term as the next prime is 199 + 12 = 211.
211 is also a term since the next prime is 211 + 12 = 223.
But 223 is not a term since the next prime is 227, and 223 + 12 = 235 = 5 * 47.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(4000) | NextPrime(p)-p eq 12]; // Bruno Berselli, Apr 09 2013
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[600]], 2, 1], Last[#] - First[#] == 12 &]][[1]] (* Harvey P. Dale, Apr 07 2013 *)
  • PARI
    is(n)=nextprime(n+1)==n+12 && isprime(n) \\ Charles R Greathouse IV, Jul 02 2013

Formula

a(n) = prime(A320704(n)). - R. J. Mathar, Apr 30 2024

A031932 Lower prime of a pair of consecutive primes having a difference of 14.

Original entry on oeis.org

113, 293, 317, 773, 839, 863, 953, 1409, 1583, 1847, 2039, 2357, 2423, 2633, 2753, 2819, 2939, 3023, 3593, 3677, 3779, 3833, 3863, 4139, 4493, 4817, 4889, 4973, 5153, 5309, 5333, 5669, 5939, 6053, 6719, 7043, 7193, 7283, 7607, 7703
Offset: 1

Views

Author

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n); i.e., a(n)^(1/n) is a strictly decreasing function of n (see comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Crossrefs

Subsequence of A124586.
Cf. A248855.

Programs

  • Magma
    [p: p in PrimesUpTo(8000) | NextPrime(p)-p eq 14]; // Bruno Berselli, Apr 09 2013
    
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1000]],2,1],Last[#]-First[#] == 14&]] [[1]] (* Harvey P. Dale, Aug 24 2012 *)
  • PARI
    is(n)=isprime(n) && nextprime(n+1)==n+14 \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = prime(A320705(n)). - R. J. Mathar, Apr 30 2024

A031934 Lower prime of a pair of consecutive primes having a difference of 16.

Original entry on oeis.org

1831, 1933, 2113, 2221, 2251, 2593, 2803, 3121, 3373, 3391, 3433, 3643, 4057, 4111, 4567, 4621, 5023, 5281, 5623, 5881, 6637, 6763, 6841, 6883, 7333, 7417, 7993, 8581, 8647, 9013, 9241, 9661, 9907, 10273, 10513, 10867, 10957, 11197
Offset: 1

Views

Author

Keywords

Comments

Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n); i.e., a(n)^(1/n) is a strictly decreasing function of n (see comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014
All terms are == 1 mod 6. - Zak Seidov, Mar 27 2015
n such that A000720(n) = A000720(n-1)+1 = A000720(n+15) = A000720(n+16)-1. - Robert Israel, Mar 27 2015

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(12000) | NextPrime(p)-p eq 16]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    P:= select(isprime,[seq(2*i+1,i=1..10000)]):
    P[select(t -> P[t+1]-P[t]=16, [$1..nops(P)-1])]; # Robert Israel, Mar 27 2015
  • Mathematica
    Transpose[Select[Partition[Prime[Range[1500]], 2, 1], Last[#] - First[#] == 16 &]][[1]] (* Bruno Berselli, Apr 09 2013 *)
  • PARI
    is(n)=isprime(n) && nextprime(n+1)==n+16 \\ Charles R Greathouse IV, Sep 14 2015

Formula

a(n) = prime(A320706(n)). - R. J. Mathar, Apr 30 2024

A262061 Least prime(i) such that prime(i)^(1+1/i) - prime(i) > n.

Original entry on oeis.org

2, 3, 5, 7, 11, 11, 17, 17, 23, 29, 29, 37, 41, 53, 59, 67, 79, 89, 97, 127, 127, 137, 163, 179, 211, 223, 251, 293, 307, 337, 373, 419, 479, 521, 541, 587, 691, 727, 797, 853, 929, 1009, 1151, 1201, 1277, 1399, 1523, 1693, 1777, 1931, 2053, 2203, 2333, 2521, 2647, 2953, 3119, 3299, 3527, 3847, 4127
Offset: 1

Views

Author

Keywords

Comments

Where A246778(i) first exceeds n, stated by p_i.
Similar to A245396.
Number of terms < 10^n: 4, 19, 41, 75, 120, 176, 242, 319, 407, 506, ..., .
Concerning Firoozbakht's Conjecture (1982): (prime(n+1))^(1/(n+1)) < prime(n)^(1/n), for all n = 1 or prime(n+1) < prime(n)^(1+1/n), which can be rewritten as: (log(prime(n+1))/log(prime(n)))^n < (1+1/n)^n. This suggests a weaker conjecture: (log(prime(n+1))/log(prime(n)))^n < e.
Prime index of a(n): 1, 1, 3, 4, 5, 5, 7, 7, 9, 10, 10, 12, 13, 16, 17, 19, 22, 24, 25, 31, 31, ..., .
All terms are unique for n > 21. Indices not unique: 1 & 2, 5 & 6, 7 & 8, 10 & 11 and 20 & 21.
The distribution of initial digits, 1...9, for a(n), n<508: 140, 91, 60, 50, 44, 36, 32, 27 and 26.

Examples

			a(20) = 127 since for all primes less than the 31st prime, 127, p_k^(32/31) - p_k are less than 20.
a(100) = 38113,
a(200) = 2400407,
a(300) = 57189007,
a(400) = 828882731,
a(500) = 8748565643,
a(1000) = 91215796479037,
a(1064) = 246842748060263, limit of Mathematica by direct computation, i.e., the first Mathematica line.
		

References

  • Paulo Ribenboim, The little book Of bigger primes, second edition, Springer, 2004, p. 185.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2, k = 1}, While[n > p^(1 + 1/k) - p, p = NextPrime@ p; k++]; p]; Array[f, 60] (* or  quicker *)
    (* or quicker *) p = 2; i = 1; lst = {}; Do[ While[ p^(1 + 1/i) < n + p, p = NextPrime@ p; i++]; AppendTo[lst, p]; Print[{n, p}], {n, 100}]; lst
  • PARI
    a(n) = {i = 0; forprime(p=2,, i++; if (p^(1+1/i) - p > n, return (p)););} \\ Michel Marcus, Oct 04 2015

Formula

Log(y) ~= g + x^(1/2) where g = Euler's Gamma.

Extensions

a(2) corrected in b-file by Andrew Howroyd, Feb 22 2018
Showing 1-7 of 7 results.