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

A380277 A version of the array A229607 without duplicates, read by antidiagonals: each row starts with the least prime not in a previous row, and each number p in a row is followed by the greatest prime q in the interval p < q < 2*p not in a previous row (or 0 if no such q exists).

Original entry on oeis.org

2, 3, 11, 5, 19, 17, 7, 37, 31, 29, 13, 73, 61, 53, 41, 23, 139, 113, 103, 79, 47, 43, 277, 223, 199, 157, 89, 59, 83, 547, 443, 397, 313, 173, 109, 67, 163, 1093, 883, 787, 619, 337, 211, 131, 71, 317, 2179, 1759, 1571, 1237, 673, 421, 257, 137, 97
Offset: 1

Views

Author

Pontus von Brömssen, Jan 18 2025

Keywords

Comments

It appears that the first column is A104272.
Proof: (This proof assumes that all terms of the array are nonzero. It would be nice to see a proof of this.) Let n >= 2 and p = T(n,1). To prove that p = A104272(n) we need to prove that pi(x)-pi(x/2) >= n for x >= p and that pi(p-1)-pi((p-1)/2) < n. Let x >= p and let q be the smallest prime larger than x. In each of the rows 1..n there are consecutive terms r < r' with r < q <= r' < 2*r, so q/2 < r < q. Hence there are at least n primes between q/2 and q (not counting q itself), i.e., pi(q)-pi(q/2) >= n+1. It follows that pi(x)-pi(x/2) = pi(q)-1-pi(x/2) >= pi(q)-1-pi(q/2) >= n. Finally, if pi(p-1)-pi((p-1)/2) >= n there would exist two consecutive terms r and r' in one of the rows 1..(n-1) with (p-1)/2 < r < r' <= p-1. This is impossible, because then p (or some larger prime) would have been chosen instead of r' as the successor of r. Hence pi(p-1)-pi((p-1)/2) < n. This concludes the proof (with the caveat above).

Examples

			Array starts:
   2,   3,   5,   7,   13,   23,   43,    83,   163,   317, ...
  11,  19,  37,  73,  139,  277,  547,  1093,  2179,  4357, ...
  17,  31,  61, 113,  223,  443,  883,  1759,  3517,  7027, ...
  29,  53, 103, 199,  397,  787, 1571,  3137,  6271, 12541, ...
  41,  79, 157, 313,  619, 1237, 2473,  4943,  9883, 19763, ...
  47,  89, 173, 337,  673, 1327, 2647,  5281, 10559, 21107, ...
  59, 109, 211, 421,  839, 1669, 3331,  6661, 13313, 26597, ...
  67, 131, 257, 509, 1013, 2017, 4027,  8053, 16103, 32203, ...
  71, 137, 271, 541, 1069, 2137, 4273,  8543, 17077, 34147, ...
  97, 193, 383, 761, 1511, 3019, 6037, 12073, 24137, 48271, ...
  ...
The least prime not in any of the first 6 rows is T(7,1) = 59. The greatest prime less than 2*59 = 118 is 113, but that number appears in a previous row as T(3,4). The next smaller prime is 109, which does not appear in a previous row, so T(7,2) = 109.
		

Crossrefs

Cf. A000720, A006992 (first row), A104272, A229607.

A006992 Bertrand primes: a(n) is largest prime < 2*a(n-1) for n > 1, with a(1) = 2.

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 5003, 9973, 19937, 39869, 79699, 159389, 318751, 637499, 1274989, 2549951, 5099893, 10199767, 20399531, 40799041, 81598067, 163196129, 326392249, 652784471, 1305568919, 2611137817
Offset: 1

Views

Author

Keywords

Comments

a(n) < a(n+1) by Bertrand's postulate (Chebyshev's theorem). - Jonathan Sondow, May 31 2014
Let b(n) = 2^n - a(n). Then b(n) >= 2^(n-1) - 1 and b(n) is a B_2 sequence: 0, 1, 3, 9, 19, 41, 85, 173, 349, ... - Thomas Ordowski, Sep 23 2014 See the link for B_2 sequence.
These primes can be obtained of exclusive form using a restricted variant of Rowland's prime-generating recurrence (A106108), making gcd(n, a(n-1)) = -1 when GCDs are greater than 1 and less than n (see program). These GCDs are also a divisor of each odd number from a(n) + 2 to 2*a(n-1) - 1 in reverse order, so that this subtraction with -1's invariably leads to the prime. - Manuel Valdivia, Jan 13 2015
First row of array in A229607. - Robert Israel, Mar 31 2015
Named after the French mathematician Joseph Bertrand (1822-1900). - Amiram Eldar, Jun 10 2021

References

  • Martin Aigner and Günter M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 7.
  • Martin Griffiths, The Backbone of Pascal's Triangle, United Kingdom Mathematics Trust (2008), page 115. [From Martin Griffiths, Mar 28 2009]
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 344.
  • Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 189.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A185231 for another version.

Programs

  • Haskell
    a006992 n = a006992_list !! (n-1)
    a006992_list = iterate (a007917 . (* 2)) 2
    -- Reinhard Zumkeller, Sep 17 2014
    
  • Maple
    A006992 := proc(n) option remember; if n=1 then 2 else prevprime(2*A006992(n-1)); fi; end;
  • Mathematica
    bertrandPrime[1] = 2; bertrandPrime[n_] := NextPrime[ 2*a[n - 1], -1]; Table[bertrandPrime[n], {n, 40}]
    (* Second program: *)
    NestList[NextPrime[2#, -1] &, 2, 40] (* Harvey P. Dale, May 21 2012 *)
    k = 3; a[n_] := If[GCD[n,k] > 1 && GCD[n, k] < n, -1, GCD[n, k]]; Select[Differences@Table[k = a[n] + k, {n, 2611137817}], # > 1 &] (* Manuel Valdivia, Jan 13 2015 *)
  • PARI
    print1(t=2);for(i=2,60,print1(", "t=precprime(2*t))) \\ Charles R Greathouse IV, Apr 01 2013
    
  • Python
    from sympy import prevprime
    l = [2]
    for i in range(1, 51):
        l.append(prevprime(2 * l[i - 1]))
    print(l) # Indranil Ghosh, Apr 26 2017

Formula

a(n+1) = A007917(2*a(n)). - Reinhard Zumkeller, Sep 17 2014
Limit_{n -> infinity} a(n)/2^n = 0.303976447924... - Thomas Ordowski, Apr 05 2015

Extensions

Definition completed by Jonathan Sondow, May 31 2014
B_2 sequence link added by Wolfdieter Lang, Oct 09 2014

A229608 Square array read by antidiagonals downwards: each row starts with the least prime not in a previous row, and each prime p in a row is followed by the least prime > 2*p.

Original entry on oeis.org

2, 5, 3, 11, 7, 13, 23, 17, 29, 19, 47, 37, 59, 41, 31, 97, 79, 127, 83, 67, 43, 197, 163, 257, 167, 137, 89, 53, 397, 331, 521, 337, 277, 179, 107, 61, 797, 673, 1049, 677, 557, 359, 223, 127, 71, 1597, 1361, 2099, 1361, 1117, 719, 449, 257, 149, 73, 3203
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2013

Keywords

Comments

Conjectures: (row 1) = A055496, (column 1) = A193507, and for each row r(k), the limit of r(k)/2^k exists. For rows 1 to 4, the respective limits are 1.569985..., 2.677285..., 8.230592..., 10.709142...; see Franklin T. Adams-Watters's comment at A055496.
The above conjecture row 1 = A055496 is true; additionally, row 2 = A065545; row 3 = A065546; the first 5 terms of row 6 are a contiguous subsequence of A064934; and column 1 = A194598. - Bob Selcoe, Oct 27 2015; corrected by Peter Munn, Jul 30 2017
The conjecture for column 1 is true iff A194598 and A193507 are equivalent. Is this the case? - Bob Selcoe, Oct 29 2015
Column 1 diverges from A193507 at A(14,1) = 113, a prime not in A193507. 113 is in column 1 as it does not follow a prime in a row: 107 follows 53 and 127 follows 59, the next prime after 53. - Peter Munn, Jul 30 2017

Examples

			Northwest corner:
    2    5   11   23   47   97  197
    3    7   17   37   79  163  331
   13   29   59  127  257  521 1049
   19   41   83  167  337  677 1361
   31   67  137  277  557 1117 2237
   43   89  179  359  719 1439 2879
   53  107  223  449  907 1823 3659
		

Crossrefs

Programs

  • Mathematica
    seqL = 14; arr2[1] = {2}; Do[AppendTo[arr2[1], NextPrime[2*Last[arr2[1]]]], {seqL}];
    Do[tmp = Union[Flatten[Map[arr2, Range[z]]]]; arr2[z] = {Prime[NestWhile[# + 1 &, 1, PrimePi[tmp[[#]]] - # == 0 &]]}; Do[AppendTo[arr2[z], NextPrime[2*Last[arr2[z]]]], {seqL}], {z, 2, 12}]; m = Map[arr2, Range[12]]; m // TableForm
    t = Table[m[[n - k + 1]][[k]], {n, 12}, {k, n, 1, -1}] // Flatten (* Peter J. C. Moses, Sep 26 2013 *)

Extensions

Incorrect comment deleted and example extended by Peter Munn, Jul 30 2017

A229609 Array: each row starts with the least prime not in a previous row, and each prime p in a row is followed by the greatest prime < 3*p.

Original entry on oeis.org

2, 5, 3, 13, 7, 11, 37, 19, 31, 17, 109, 53, 89, 47, 23, 317, 157, 263, 139, 67, 29, 947, 467, 787, 409, 199, 83, 41, 2837, 1399, 2357, 1223, 593, 241, 113, 43, 8501, 4177, 7069, 3659, 1777, 719, 337, 127, 59, 25471, 12527, 21193, 10973, 5323, 2153, 1009
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2013

Keywords

Comments

Conjectures: (row 1) = A126031, (column 1) = A164952, and for each row r(k), the limit of r(k)/3^k exists. For rows 1 to 4, the respective limits are 0.431270..., 0.636059..., 3.229697..., 5.015914... .

Examples

			Northwest corner:
   2,  5,  13,  37,  109,  317, ...
   3,  7,  19,  53,  157,  467, ...
  11, 31,  89, 263,  787, 2357, ...
  17, 47, 139, 409, 1223, 3659, ...
  23, 67, 199, 593, 1777, 5323, ...
  29, 83, 241, 719, 2153, 6451, ...
		

Crossrefs

Programs

  • Mathematica
    seqL = 14; arr1[1] = {2}; Do[AppendTo[arr1[1], NextPrime[3*Last[arr1[1]], -1]], {seqL}];  Do[tmp = Union[Flatten[Map[arr1, Range[z]]]]; arr1[z] = {Prime[NestWhile[# + 1 &, 1, PrimePi[tmp[[#]]] - # == 0 &]]}; Do[AppendTo[arr1[z], NextPrime[3*Last[arr1[z]], -1]], {seqL}], {z, 2, 22}]; m = Map[arr1, Range[22]]; m // TableForm
    t = Table[m[[n - k + 1]][[k]], {n, 12}, {k, n, 1, -1}] // Flatten (* Peter J. C. Moses, Sep 26 2013 *)

Extensions

Incorrect comment deleted by Peter Munn, Aug 15 2017

A229610 Array: each row starts with the least prime not in a previous row, and each prime p in a row is followed by the least prime > 3*p.

Original entry on oeis.org

2, 7, 3, 23, 11, 5, 71, 37, 17, 13, 223, 113, 53, 41, 19, 673, 347, 163, 127, 59, 29, 2027, 1049, 491, 383, 179, 89, 31, 6089, 3163, 1481, 1151, 541, 269, 97, 43, 18269, 9491, 4447, 3457, 1627, 809, 293, 131, 47, 54829, 28477, 13367, 10391, 4889, 2437, 881
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2013

Keywords

Comments

Conjectures: (row 1) = A076656, (column 1) = A164958, and for each row r(k), the limit of r(k)/3^k exists. For rows 1 to 4, the respective limits are 0.928655..., 1.447047..., 2.038260..., 4.753271... .

Examples

			Northwest corner:
   2,  7,  23,  71,  223,  673, ...
   3, 11,  37, 113,  347, 1049, ...
   5, 17,  53, 163,  491, 1481, ...
  13, 41, 127, 383, 1151, 3457, ...
  19, 59, 179, 541, 1627, 4889, ...
  29, 89, 269, 809, 2437, 7331, ...
		

Crossrefs

Programs

  • Mathematica
    seqL = 14; arr2[1] = {2}; Do[AppendTo[arr2[1], NextPrime[3*Last[arr2[1]]]], {seqL}]; Do[tmp = Union[Flatten[Map[arr2, Range[z]]]]; arr2[z] = {Prime[NestWhile[# + 1 &, 1, PrimePi[tmp[[#]]] - # == 0 &]]}; Do[AppendTo[arr2[z], NextPrime[3*Last[arr2[z]]]], {seqL}], {z, 2, 12}]; m = Map[arr2, Range[12]]; m // TableForm
    t = Table[m[[n - k + 1]][[k]], {n, 12}, {k, n, 1, -1}] // Flatten (* Peter J. C. Moses, Sep 26 2013 *)

Extensions

Incorrect comment deleted by Peter Munn, Aug 15 2017
Showing 1-5 of 5 results.