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.

Previous Showing 21-30 of 35 results. Next

A076994 a(1) = 2, a(n+1) is the largest squarefree number < 2*a(n).

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 43, 85, 167, 331, 661, 1321, 2641, 5281, 10561, 21121, 42241, 84481, 168961, 337921, 675841, 1351681, 2703361, 5406721, 10813441, 21626881, 43253761, 86507521, 173015041, 346030081, 692060161, 1384120321, 2768240641
Offset: 1

Views

Author

Amarnath Murthy, Oct 26 2002

Keywords

Comments

Analogous to Bertrand's primes.

Crossrefs

Programs

  • Maple
    with(numtheory):a[1] := 2:for n from 2 to 84 do q := 2*a[n-1]-1:while(not issqrfree(q)) do q := q-1:od:a[n] := q:od:seq(a[l],l=1..84);
  • Mathematica
    lsfn[n_]:=Module[{s=2n-1},While[!SquareFreeQ[s],s--];s]; NestList[ lsfn,2,40] (* Harvey P. Dale, Nov 28 2018 *)

Extensions

More terms from Sascha Kurz, Jan 26 2003

A118909 a(1) = 4; a(n) is least semiprime > a(n-1)^2.

Original entry on oeis.org

4, 21, 445, 198026, 39214296677, 1537761063871773242347, 2364709089560047865452947255794201194068433, 5591849078247910476736920566826713466552016538943524658263883555662554776622687075541
Offset: 1

Views

Author

Jonathan Vos Post, May 05 2006

Keywords

Comments

Semiprime analog of A055496 a(1) = 2; a(n) is smallest prime > 2*a(n-1). See also A059785 a(n+1)=prevprime(a(n)^2), with a(1) = 2. With that, of course, there's always a prime between n and 2n, so a(n) < 2^n. The obverse of this is A118908 a(1) = 4; a(n) is greatest semiprime < a(n-1)^2.

Examples

			a(8) = a(7)^2 + 52 and there is no smaller k such that a(7)^2 + k is semiprime.
		

Crossrefs

Programs

  • Mathematica
    nxt[n_]:=Module[{sp=n^2+1},While[PrimeOmega[sp]!=2,sp++];sp]; NestList[nxt,4,7] (* Harvey P. Dale, Oct 22 2012 *)
  • Python
    from itertools import accumulate
    from sympy.ntheory.factor_ import primeomega
    def nextsemiprime(n):
      while primeomega(n + 1) != 2: n += 1
      return n + 1
    def f(anm1, _): return nextsemiprime(anm1**2)
    print(list(accumulate([4]*6, f))) # Michael S. Branicky, Apr 21 2021

A185231 a(n) = largest prime <= 2a(n-1), with a(0)=1.

Original entry on oeis.org

1, 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: 0

Views

Author

N. J. A. Sloane, Jan 24 2012, following a suggestion from Frank M Jackson

Keywords

Comments

Equals 1 followed by A006992.
This is a complete sequence (cf. A075058).

Crossrefs

Programs

  • Mathematica
    np[n_]:=Module[{p=NextPrime[2n]},If[p<=2n,p,NextPrime[p,-1]]]; NestList[ np,1,40] (* Harvey P. Dale, Sep 29 2019 *)
  • PARI
    lista(nn) = {p = 1; for (n = 1, nn, print1(p, ", "); p = precprime(2*p););} \\ Michel Marcus, Aug 26 2013

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.

A076995 a(1) = 4, a(n+1) is the largest composite number < 2a(n).

Original entry on oeis.org

4, 6, 10, 18, 35, 69, 136, 270, 539, 1077, 2152, 4303, 8605, 17208, 34415, 68829, 137657, 275313, 550625, 1101249, 2202497, 4404993, 8809985, 17619969, 35239936, 70479871, 140959741, 281919481, 563838961, 1127677921, 2255355841
Offset: 1

Views

Author

Amarnath Murthy, Oct 26 2002

Keywords

Crossrefs

Programs

  • Maple
    a[1] := 4:for n from 2 to 84 do q := 2*a[n-1]-1:while(isprime(q)) do q := q-1:od: a[n] := q:od:seq(a[l],l=1..84);

Extensions

Corrected and extended by Sascha Kurz, Jan 26 2003

A118912 a(1) = 2; a(n) is greatest prime < a(n-1)^4.

Original entry on oeis.org

2, 13, 28559, 665230244078823349, 195833931687186822327230545227550596864953022841534058316595001440791433
Offset: 1

Views

Author

Jonathan Vos Post, May 05 2006

Keywords

Comments

Exponent-4 analog of A059785 a(n+1)=prevprime(a(n)^2), with exponent 3 being A118910 a(1) = 2; a(n) is greatest prime < a(n-1)^3.

Examples

			a(1) = 2, by definition.
a(2) = 13 = 2^4 - 3.
a(3) = 28559 = 13^4 - 2.
a(4) = 665230244078823349 = 28559^4 - 12.
a(5) = 195833931687186822327230545227550596864953022841534058316595001440791433 = 665230244078823349^4 - 168.
a(6) is too large to include.
		

Crossrefs

Programs

  • Mathematica
    NestList[NextPrime[#^4,-1]&,2,5] (* Harvey P. Dale, Feb 18 2025 *)

Formula

a(1) = 2; a(n) is greatest prime < a(n-1)^4.

A164920 Primes which are obtained at least by two ways using the iterations of the Bertrand operator (see A164917) beginning with primes of A164368.

Original entry on oeis.org

113, 139, 199, 211, 223, 277, 293, 397, 421, 443
Offset: 1

Views

Author

Vladimir Shevelev, Aug 31 2009

Keywords

Comments

The sequence is connected with our sieve selecting the primes of A164368 from all primes.

Examples

			113 is in the sequence since it is obtained either by iterations of Bertrand operator beginning from 17 (17=>31=>61=>113) or by such iterations beginning with 59 (59=>113), and both of primes 17 and 59 are in A164368.
		

Crossrefs

A164962 a(n) is the least prime from the union {2,3} and A164333, beginning with which the n-th prime p_n is obtained by some number of iterations of the S operator g(see A164960).

Original entry on oeis.org

2, 3, 2, 3, 2, 13, 3, 19, 2, 13, 31, 3, 19, 43, 2, 53, 13, 61, 31, 71, 73, 3, 19, 43, 2, 101, 103, 53, 109, 113, 13, 131, 31
Offset: 1

Views

Author

Vladimir Shevelev, Sep 02 2009

Keywords

Comments

The sequence is connected with our sieve selecting the primes of the union {2,3} and A164333 from all primes. Note that a(n)=n iff p_n is in the considered union, which corresponds to 0's iterations of g.

Crossrefs

A217836 a(n) is largest semiprime < 2*a(n-1), with a(1) = 4.

Original entry on oeis.org

4, 6, 10, 15, 26, 51, 95, 187, 371, 737, 1473, 2942, 5878, 11755, 23507, 47013, 94021, 188041, 376069, 752135, 1504261, 3008503, 6017001, 12034001, 24068001, 48135995, 96271987, 192543973, 385087943, 770175883, 1540351763, 3080703523, 6161407045, 12322814089, 24645628171
Offset: 1

Views

Author

Jonathan Vos Post, Oct 19 2012

Keywords

Comments

This is to Bertrand primes A006992 as semiprimes A001358 are to primes A000040.

Examples

			a(2) = 6 because that is the largest semiprime < 2*a(1) = 8, where a(1) is the first semiprime.
a(3) = 10, the largest semiprime < 2*6 = 12.
		

Crossrefs

Programs

  • Mathematica
    PrevSemiPrime[n_, k_] := Block[{c = 0, sp = n - 1}, While[c < k, While[ PrimeOmega[sp] != 2, sp--]; sp--; c++]; sp + 1]; NestList[ PrevSemiPrime[ 2#, 1] &, 4, 34] (* Robert G. Wilson v, Oct 19 2012 *)

Extensions

Terms greater than a(15) from Robert G. Wilson v, Oct 19 2012

A227770 Bertrand primes II: a(n) is the largest prime < 2*a(n-1)-2.

Original entry on oeis.org

5, 7, 11, 19, 31, 59, 113, 223, 443, 883, 1759, 3511, 7019, 14033, 28057, 56101, 112199, 224363, 448703, 897401, 1794787, 3589571, 7179127, 14358247, 28716487, 57432961, 114865903, 229731787, 459463553, 918927083, 1837854119, 3675708217, 7351416419, 14702832827, 29405665651, 58811331281, 117622662557, 235245325061, 470490650107, 940981300211, 1881962600417
Offset: 1

Views

Author

Jonathan Sondow, Jul 30 2013

Keywords

Comments

A strong form of Bertrand's postulate (Chebyshev's theorem) says there exists a prime number p with n < p < 2*n - 2 if n > 3.
The first prime > 3 is 5, so the sequence begins a(1) = 5.
For references, links, and crossrefs, see A006992 (Bertrand primes I).

Examples

			The largest prime < 2*a(1)-2 = 2*5-2 = 8 is 7, so a(2) = 7 = A006992(4).
The largest prime < 2*a(2)-2 = 2*7-2 = 12 is 11, so a(3) = 11 < 13 = A006992(5).
		

Crossrefs

Cf. A006992.

Programs

  • Mathematica
    NestList[NextPrime[2 # - 2, -1] &, 5, 40]
Previous Showing 21-30 of 35 results. Next