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

A179234 a(n) is the smallest prime q such that, for the previous prime p and the following prime r, the fraction (r-q)/(q-p) has denominator n in lowest terms.

Original entry on oeis.org

3, 11, 29, 367, 149, 521, 127, 1847, 1087, 1657, 1151, 4201, 2503, 2999, 5779, 10831, 1361, 9587, 30631, 19373, 16183, 36433, 81509, 28277, 31957, 25523, 40343, 82129, 44351, 102761, 34123, 89753, 282559, 134581, 173429, 705389, 404671, 212777, 371027, 1060861, 265703, 461801, 156007, 544367, 576881, 927961, 1101071, 1904407, 604171, 396833
Offset: 1

Views

Author

Vladimir Shevelev, Jan 05 2011

Keywords

Comments

The conjecture that a(n) exists for every n is a weaker conjecture than a related one in the comment to A179210.

Examples

			For q=3 we have (r-q)/(q-p)=2/1. Therefore, a(1)=3.
For q=5: (r-q)/(q-p) = 1/1; for q = 7: (r-q)/(q-p) = 2/1; for q = 11: (r-q)/(q-p) = 1/2. Therefore, a(2)=11.
		

Crossrefs

Programs

Extensions

Revised definition, new program, and terms past a(5) from Charles R Greathouse IV, Jan 12 2011

A179256 a(n) is the smallest prime q such that (q-p)/(r-q) = n, where p

Original entry on oeis.org

5, 11, 29, 6421, 149, 521, 84913, 1949, 1277, 43391, 1151, 4547, 933151, 2999, 6947, 1568867, 10007, 32297, 4131223, 25301, 78779, 12809491, 91079, 28277, 13626407, 35729, 117497, 37305881, 399851, 102761, 217795433, 288647, 296909, 240485461, 173429, 1026029, 213158501, 1053179, 371027, 1163010421, 1885151, 461801, 1661688551, 1155821, 576881, 3403741987, 4876607, 4252679, 10394432611, 838349, 1775171
Offset: 1

Views

Author

Vladimir Shevelev, Jan 05 2011

Keywords

Comments

Conjecture: a(n)>0 for n >= 1.
It would appear that a(3n+1) is greater than either a(3n) or a(3n+2).
Records appear for a(n) for n's: 1, 2, 3, 4, 7, 13, 16, 19, 22, 25, 28, 31, 34, 40, 43, 46, 49, ..., .

Crossrefs

Programs

A275785 Primes such that the ratio between the distance to the next prime and from the previous prime appears for the first time.

Original entry on oeis.org

3, 5, 11, 23, 29, 31, 37, 89, 113, 127, 139, 149, 199, 251, 293, 331, 337, 367, 409, 521, 523, 631, 701, 787, 797, 953, 1087, 1129, 1151, 1259, 1277, 1327, 1361, 1381, 1399, 1657, 1669, 1847, 1933, 1949, 1951, 1973, 2477, 2503, 2579, 2633, 2861, 2879, 2971, 2999, 3089, 3137, 3163, 3229, 3407
Offset: 1

Views

Author

Andres Cicuttin, Nov 14 2016

Keywords

Comments

Number of terms less than 10^n: 2, 8, 26, 85, 224, 511, 1035, 1905, 3338, ..., . - Robert G. Wilson v, Nov 30 2016

Examples

			a(1) = 3 because this is the first prime for which it is possible to determine the ratio between the distance to the next prime (5) and from the previous prime (2). This first ratio is 2.
a(2) = 5 because the ratio between the distance to the next prime (7) and from the previous prime (3) is 1 and this ratio has not appeared before.
The third element a(3) is not 7 because (11-7)/(7-5) = 2, a ratio that appeared before with a(1), so a(3) = 11 because (13-11)/(11-7) = 1/2, a ratio that did not appear before.
		

Crossrefs

Programs

  • Mathematica
    nmax = 720;
    a = Prime[Range[nmax]];
    gaps = Rest[a] - Most[a];
    gapsratio = Rest[gaps]/Most[gaps];
    newpindex = {}; newgratios = {}; i = 1;
    While[i < Length[gapsratio] + 1,
    If[Cases[newgratios, gapsratio[[i]]] == {},
      AppendTo[newpindex, i + 1];
      AppendTo[newgratios, gapsratio[[i]]] ];
      i++];
    Prime[newpindex]
    p = 2; q = 3; r = 5; rtlst = qlst = {}; While[q < 10000, rt = (r - q)/(q - p); If[ !MemberQ[rtlst, rt], AppendTo[rtlst, rt]; AppendTo[qlst, q]]; p = q; q = r; r = NextPrime@ r]; qlst (* Robert G. Wilson v, Nov 30 2016 *)

A179240 a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator equal to A006843(n) (or 0, if such a prime does not exist).

Original entry on oeis.org

5, 11, 17, 19, 29, 41, 47, 67, 73, 97, 101, 359, 367, 379, 383, 389, 397, 419, 421, 449, 467, 547, 613, 631, 647, 683, 691, 733, 769, 797, 811, 929, 941, 1021, 1087, 1153, 1181, 1193, 1249, 1709, 1721, 1747, 1847, 1889, 2017, 2153, 2357
Offset: 1

Views

Author

Vladimir Shevelev, Jan 06 2011

Keywords

Comments

Conjecture: a(n) > 0 for all n.

Examples

			For n = 1..3, A006843(n) = 1, and p,q,r have to obey the condition
r-q | q-p. Thus a(1) = 5, a(2) = 11, a(3) = 17.
		

Crossrefs

Extensions

More terms from Alois P. Heinz, Jan 06 2011

A179328 a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator prime(n) (or 0, if such a prime does not exist).

Original entry on oeis.org

3, 23, 139, 293, 1129, 2477, 8467, 30593, 81463, 85933, 190409, 404597, 535399, 840353, 1100977, 2127163, 4640599, 6613631, 6958667, 10343761, 24120233, 49269581, 83751121, 101649649, 166726367, 273469741, 310845683, 568951459
Offset: 1

Views

Author

Vladimir Shevelev, Jan 06 2011

Keywords

Comments

Conjecture: a(n) > 0 for all n.

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local k, p, q, r, pn;
          pn:= ithprime(n);
          for k from `if`(n=1, 1, pi(a(n-1))) do
            p:= ithprime(k);
            q:= ithprime(k+1);
            r:= ithprime(k+2);
            if denom((q-p)/(r-q)) = pn then break fi
          od; q
        end:
    seq(a(n), n=1..10);  # Alois P. Heinz, Jan 06 2011
  • Mathematica
    a[n_] := a[n] = Module[{k, p, q, r, pn},
         pn = Prime[n];
         For[k = If[n == 1, 1, PrimePi[a[n - 1]]], True, k++,
         p = Prime[k];
         q = Prime[k + 1];
         r = Prime[k + 2];
         If [Denominator[(q - p)/(r - q)] == pn, Break[]]]; q];
    Table[a[n], {n, 1, 10}] (* Jean-François Alcover, Mar 18 2022, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jan 06 2011

A178942 a(1) = 3; for n >= 2, a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator equal to A001223(n)/2 (or 0, if no such prime exists).

Original entry on oeis.org

3, 5, 11, 13, 17, 19, 29, 37, 47, 53, 61, 67, 71, 79, 83, 131, 137, 151, 163, 173, 233, 277, 331, 359, 379, 397, 401, 419, 439, 773, 823, 941, 947, 1021, 1031, 1033, 1063, 1087, 1097, 1117, 1123, 1153, 1187, 1237, 1277, 1709, 1789, 1823
Offset: 1

Views

Author

Vladimir Shevelev, Jan 06 2011

Keywords

Comments

Conjecture: a(n) > 0 for all n.
The smallest prime(k) > a(n-1) such that the denominator of A001223(k-1)/A001223(k) equals A001223(n)/2. - R. J. Mathar, Jan 07 2011

Crossrefs

Programs

  • Maple
    A001223 := proc(n) ithprime(n+1)-ithprime(n) ; end proc:
    A178942 := proc(n) option remember; local p,q,r ; if n = 1 then 3; else for q from procname(n-1)+1 do if isprime(q) then p := prevprime(q) ; r := nextprime(q) ; denom((q-p)/(r-q)) ; if % = A001223(n)/2 then return q; end if; end if; end do: end if; end proc: # R. J. Mathar, Jan 07 2011
  • Mathematica
    A001223[n_] := Prime[n + 1] - Prime[n];
    a[n_] := a[n] = Module[{p, q, r, d}, If[n == 1, 3, For[q = a[n - 1] + 1, True, q++, If [PrimeQ[q], p = NextPrime[q, -1]; r = NextPrime[q]; d = Denominator[(q - p)/(r - q)]; If[d == A001223[n]/2, Return[q]]]]]];
    Array[a, 48] (* Jean-François Alcover, May 21 2020, after Maple *)

Extensions

More terms from Alois P. Heinz, Jan 06 2011

A179479 a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator 2, for odd n and 1 for even n (or 0, if such a prime does not exist).

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 29, 43, 53, 67, 71, 79, 97
Offset: 1

Views

Author

Vladimir Shevelev, Jan 08 2011

Keywords

Comments

Conjecture: a(n) > 0 for all n.
Since, as it is accepted in the OEIS, we consider the uncancelled fractions, then, by the condition, for even n, we have (r-q)|(q-p).

Examples

			If n=1, then denominator should be 2. Thus a(1)=3, since (3-2)/(5-3)=1/2. If n=2, then denominator should be 1. Thus a(2)=5, since (5-3)/(7-5)=1/1, etc.
		

Crossrefs

A179921 a(n) = prime(n) if n<=3; for n>3, a(n) is the smallest prime >a(n-1), such that the denominator of fraction (a(n-1)-a(n-2))/(a(n)-a(n-1)) did not appear earlier.

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 31, 53, 67, 79, 113, 131, 151, 193, 233, 271, 307, 353, 379, 409, 457, 557, 613, 691, 761, 809, 883, 907, 1013, 1069, 1123, 1181, 1213, 1279, 1361, 1423, 1483, 1571, 1657, 1709, 1811, 1933, 1997, 2087, 2179, 2273, 2341, 2459
Offset: 1

Views

Author

Vladimir Shevelev, Jan 12 2011

Keywords

Comments

Using Dirichlet's theorem on arithmetic progressions, it is easy to prove that the sequence is infinite. The sequence of the corresponding denominators begins with 2,1,3,5,4,11,7,6,17, ...

Examples

			The first four terms 2,3,5,13 give three denominators: 2,1,3. Then a(5) is not in {17, 19}, since (13-5)/(17-13) = 2/1, (13-5)/(19-13) = 4/3 and denominators 1 and 3 already appeared earlier. Since (13-5)/(23-13) = 4/5 and 5 is not yet in the denominator sequence, a(5) = 23.
		

Crossrefs

Extensions

Edited by Alois P. Heinz, Jan 12 2011
Showing 1-8 of 8 results.