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 11-20 of 35 results. Next

A059785 a(n+1) = prevprime(a(n)^2). Largest prime prior to the square of previous prime. Initial value = 2.

Original entry on oeis.org

2, 3, 7, 47, 2207, 4870843, 23725111530599, 562880917139361624513298747, 316834926879648887020732217199607668221645859671769857
Offset: 1

Views

Author

Labos Elemer, Feb 22 2001

Keywords

Comments

The next term is too large to show here - see the b-file.

Crossrefs

Programs

  • Mathematica
    NestList[NextPrime[#^2,-1]&,2,10] (* Harvey P. Dale, Jan 16 2016 *)

Extensions

Offset and some values corrected by Franklin T. Adams-Watters, Jul 30 2009

A229607 Square array read by antidiagonals downwards in which 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 < 2*p.

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, 113, 67, 163, 1093, 883, 787, 619, 337, 223, 131, 71, 317, 2179, 1759, 1571, 1237, 673, 443, 257, 139, 97, 631
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2013

Keywords

Comments

Conjectures: (row 1) = A006992, (column 1) = A104272, and for each row r(k), the limit of r(k)/2^k exists. For rows 1 to 4, the respective limits are 0.303976..., 4.249137..., 6.857407..., 12.235210... .
From Pontus von Brömssen, Jan 18 2025: (Start)
Regarding the conjectures above:
- Row 1 is A006992 by definition.
- Column 1 is A164368, not A104272. It seems that the first column would be A104272 if no duplicates were allowed, i.e., if the prime p in a row were followed by the largest prime < 2*p not in a previous row; see A380277.
- The existence of the limits should follow from a strong version of Bertrand's postulate. For row 1, see formula in A006992.
(End)

Examples

			Northwest corner:
   2,    3,    5,    7,   13,   23,   43,   83, ...
  11,   19,   37,   73,  139,  277,  547, 1093, ...
  17,   31,   61,  113,  223,  443,  883, 1759, ...
  29,   53,  103,  199,  397,  787, 1571, 3137, ...
  41,   79,  157,  313,  619, 1237, 2473, 4943, ...
  47,   89,  173,  337,  673, 1327, 2647, 5281, ...
		

Crossrefs

Programs

  • Mathematica
    seqL = 14; arr1[1] = {2}; Do[AppendTo[arr1[1], NextPrime[2*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[2*Last[arr1[z]], -1]], {seqL}], {z, 2, 12}]; m = Map[arr1, 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

A059784 a(n+1) = nextprime(a(n)^2). Smallest prime following the square of previous prime. Initial value = 2.

Original entry on oeis.org

2, 5, 29, 853, 727613, 529420677791, 280286254072681840639693, 78560384222095957698731679318817728959447134363
Offset: 1

Views

Author

Labos Elemer, Feb 22 2001

Keywords

Crossrefs

Programs

Formula

a(n) = floor[1.5246999605380943599233635756884211622202236231...^(2^n)], similar to Mills Primes A051254. - Henry Bottomley, Oct 19 2003

Extensions

Changed offset to 1 to parallel other such sequences. - Robert G. Wilson v, Nov 15 2012

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

Original entry on oeis.org

4, 15, 221, 48839, 2385247913, 5689407606470855563, 32369358912568429679140929317208046943, 1047775396410673232345014594095988998399127191704501568910205139392491645247
Offset: 1

Views

Author

Jonathan Vos Post, May 05 2006

Keywords

Comments

Semiprime analog of 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. See also A055496 a(1) = 2; a(n) is smallest prime > 2*a(n-1). The obverse of this is A118909 a(1) = 4; a(n) is least semiprime > a(n-1)^2.
a(9), which is too large to be included, is equal to a(8)^2-3. - Giovanni Resta, Jun 16 2016

Examples

			a(6) = 32369358912568429679140929317208046943 = 1816568472934912211 * 17818958874845686213 = 5689407606470855563^2 - 26 < a(5)^2.
		

Crossrefs

A164917 Smallest number of steps to reach prime(n) by applying the map x->A060308(x) starting from any member of A164368.

Original entry on oeis.org

0, 1, 2, 3, 0, 4, 0, 1, 5, 0, 1, 2, 0, 6, 0, 1, 0, 2, 0, 0, 3, 1, 7, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 2, 8, 0, 2, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 0, 0, 3, 9, 1, 3, 0, 0, 1, 1, 0, 0, 1, 2, 1, 2, 0, 0, 0, 2, 0, 0, 0, 3, 1, 1, 0, 1, 1, 1, 0, 0, 2, 0, 3, 0, 1, 2, 3, 1, 1, 0, 0, 2
Offset: 1

Views

Author

Vladimir Shevelev, Aug 31 2009

Keywords

Comments

Starting from some prime, iterated application of A060308 (or of the equivalent A059788) generates a chain of increasing prime numbers.
The nature of these chains is to reach higher in the list of primes, sometimes "over-satisfying" Bertrand's postulate by skipping some nearer primes, almost doubling of possible. On the other hand, A164368 contains the primes that would be skipped by a chain which contains the prime slightly above half of their value. The sequence shows how far up in chains starting from some member of A164368 we find prime(n), or equivalently, how many inverse applications of the map we need to hit a member of A164368 if starting at prime(n).
Note that by construction A164368(k) starts with the smallest prime that is not member of any chain started from any previous A164368. So each prime exists at some place in one of these chains, and the number of steps a(n) to reach it from the start of its chain is well defined.

Examples

			The first prime chains of the mapping with A060308 initialized with members of A164368 are
2->3->5->7->13->23->43->83->163->317->631->1259->2503->..
11->19->37->73->139->277->547->1093->2179->4357->8713->17419->..
17->31->61->113->223->443->883->1759->3517->7027->14051->28099->..
29->53->103->199->397->787->1571->3137->6271->12541->25073->..
41->79->157->313->619->1237->2473->4943->9883->19763->39521->..
47->89->173->337->673->1327->2647->5281->10559->21107->..
The a(1) to a(4) representing the first 4 primes are all on the first chain, and need 0 to 3 steps to be reached from 2 = A164368(1). a(5) asks for the number of steps for A000040(5)=11 which is on the second chain, and needs 0 steps.
		

Crossrefs

Programs

  • Maple
    A060308 := proc(n) prevprime(2*n+1) ; end:
    isA164368 := proc(p) local q ; q := nextprime(floor(p/2)) ; RETURN(numtheory[pi](2*q) -numtheory[pi](p) >= 1); end:
    A164368 := proc(n) option remember; local a; if n = 1 then 2; else a := nextprime( procname(n-1)) ; while not isA164368(a) do a := nextprime(a) ; od: RETURN(a) ; fi; end:
    A164917 := proc(n) local p,a,j,q,itr ; p := ithprime(n) ; a := 1000000000000000 ; for j from 1 do q := A164368(j) ; if q > p then break; fi; itr := 0 ; while q < p do q := A060308(q) ; itr := itr+1 ; od; if q = p then if itr < a then a := itr; fi; fi; od: a ; end:
    seq(A164917(n),n=1..120) ; # R. J. Mathar, Sep 24 2009
  • Mathematica
    A060308[n_] := NextPrime[2*n + 1, -1];
    isA164368[p_] := Module[{q}, q = NextPrime[Floor[p/2]]; Return[PrimePi[2*q] - PrimePi[p] >= 1]];
    A164368[n_] := A164368[n] = Module[{a}, If[n == 1, 2, a = NextPrime[ A164368[n-1]]; While[Not @ isA164368[a], a = NextPrime[a]]; Return[a]]];
    A164917[n_] := Module[{p, a, j, q, itr}, p = Prime[n]; a = 10^15; For[j = 1 , True, j++, q = A164368[j]; If[q > p, Break[]]; itr = 0; While[q < p, q = A060308[q]; itr++]; If[q == p, If[itr < a, a = itr]]]; a];
    Table[A164917[n], {n, 1, 120}] (* Jean-François Alcover, Dec 14 2017, after R. J. Mathar *)

Extensions

Edited, examples added and extended by R. J. Mathar, Sep 24 2009

A090906 Row lengths of the irregular triangle defined in A090905.

Original entry on oeis.org

1, 1, 2, 4, 6, 12, 20, 40, 80, 160, 308, 628, 1256, 2488, 5000, 9940, 19928, 39864, 79660, 159380, 318724, 637496, 1274980, 2549924, 5099884, 10199748, 20399528, 40799020, 81598052, 163196124, 326392240, 652784444, 1305568896, 2611137796
Offset: 1

Views

Author

Amarnath Murthy, Dec 13 2003

Keywords

Comments

Conjecture: For n > 4 the last term of the n-th group is 2p where p is the largest prime in the (n-1)th group. And these are the Bertrand primes.

Crossrefs

Programs

  • Mathematica
    a = {{1, 1}}; Do[k = Last@ a[[i - 1]]; While[! Divisible[Pochhammer[Total@ a[[i - 1]], k], Pochhammer @@ a[[i - 1]]], k++]; AppendTo[a, {Total@a[[i - 1]], k}], {i, 2, 17}]; Last /@ a (* Michael De Vlieger, Dec 15 2016 *)

Formula

For n>4 a(n)= 2*(A006992(n)-A006992(n-1)) - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 05 2004

Extensions

More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 05 2004
More terms from David Wasserman, Feb 10 2006

A090907 Ratio of products of successive rows of the irregular triangle defined in A090905.

Original entry on oeis.org

2, 6, 140, 1287, 2139552000, 2949442889323392, 322686644032484531917367528014184448000000
Offset: 1

Views

Author

Amarnath Murthy, Dec 13 2003

Keywords

Comments

Conjecture: For n > 4 the last term of the n-th group is 2p where p is the largest prime in the (n-1)th group. And these are the Bertrand primes.

Examples

			a(1)=(2!/1!)*(0!/1!)
a(2)=(4!/2!)*(1!/2!)
a(3)=(8!/4!)*(2!/4!)
a(4)=(14!/8!)*(4!/8!)
a(5)=(26!/14!)*(8!/14!)
a(6)=(46!/26!)*(14!/26!)
For n>=6 we have a(n)= ((2*A006992(n))!/(2*A006992(n-1))!)*((2*A006992(n-2))!/(2*A006992(n-1))!), verified for 4<n<21
		

Crossrefs

Extensions

Edited by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 05 2004

A164918 The smallest starting prime which reaches prime(n) by repeated application of the map x->A060308(x).

Original entry on oeis.org

2, 2, 2, 2, 11, 2, 17, 11, 2, 29, 17, 11, 41, 2, 47, 29, 59, 17, 67, 71, 11, 41, 2, 47, 97, 101, 29, 107, 109, 17, 127, 67, 137, 11, 149, 151, 41, 2, 167, 47, 179, 181, 191, 97, 197, 29, 107, 17, 227, 229, 233, 239, 241, 127, 67, 263, 269, 137, 11, 281, 283, 149, 307, 311, 41
Offset: 1

Views

Author

Vladimir Shevelev, Aug 31 2009

Keywords

Comments

a(n) is the starting value of the prime chain described in A164917 which contains (touches) prime(n).
By construction, each member of this sequence here is one of the values of A164368, the head elements of all chains of this map.

Examples

			The first four values are 2 because prime(1)=2, prime(2)=3, prime(3)=5 and prime(4)=7 are all in the prime chain starting at 2.
		

Crossrefs

Programs

  • Maple
    A060308 := proc(n) prevprime(2*n+1) ; end:
    isA164368 := proc(p) local q ; q := nextprime(floor(p/2)) ; return (numtheory[pi](2*q) -numtheory[pi](p) >= 1); end proc:
    A164368 := proc(n) option remember; local a; if n = 1 then 2; else a := nextprime( procname(n-1)) ; while not isA164368(a) do a := nextprime(a) ; end do : RETURN(a) ; end if; end proc:
    A164918 := proc(n) local p, a, j, q, itr ; p := ithprime(n) ; a := 1000000000000000 ; for j from 1 do q := A164368(j) ; if q > p then break; end if; itr := 0 ; while q < p do q := A060308(q) ; itr := itr+1 ; end do; if q = p then return A164368(j) ; end if; end do: end proc:
    seq(A164918(n), n=1..120) ; # R. J. Mathar, Mar 12 2010
  • Mathematica
    lp[n_] := NextPrime[2n, -1];
    a[n_] := For[pn = Prime[n]; p = 2, p <= pn, p = NextPrime[p], nwl = NestWhileList[lp, p, # <= Prime[n]&]; If[MemberQ[nwl, pn], Return[p]]];
    Array[a, 120] (* Jean-François Alcover, Dec 01 2017 *)

Extensions

Edited and extended by R. J. Mathar, Mar 12 2010

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

Original entry on oeis.org

2, 7, 337, 38272739, 56062005704198360319209, 176199995814327287356671209104585864397055039072110696028654438846269
Offset: 1

Views

Author

Jonathan Vos Post, May 05 2006

Keywords

Comments

Exponent 3 analog of A059785.
Obverse of this is A051254.

Examples

			a(5) = 62343227157465615355481 = a(4)^3 - 32 = 39651817^3 - 32 and there is no k < 32 such that 39651817^3 - k is prime.
		

Crossrefs

Programs

  • Mathematica
    a=2; Join[{2}, Table[a=a^3; While[ !PrimeQ[a], a=a-1]; a, {5}]] (* T. D. Noe, Nov 15 2006 *)

Extensions

Corrected by T. D. Noe, Nov 15 2006

A051501 Bertrand primes III: a(n+1) is the smallest prime > 2^a(n).

Original entry on oeis.org

2, 5, 37, 137438953481
Offset: 1

Views

Author

Keywords

Comments

The terms in the sequence are floor(2^b), floor(2^2^b), floor(2^2^2^b), ..., where b is approximately 1.2516475977905.
The existence of b is a consequence of Bertrand's postulate.
a(5) is much larger than the largest known prime, which is currently only 2^32582657-1. - T. D. Noe, Oct 18 2007
This sequence is of course not computed from b; rather b is more precisely computed by determining the next term in the sequence.
Robert Ballie comments that the next term is known to be 2.80248435135615213561103452115581... * 10^41373247570 via Dusart 2016, improving on my 2010 result in the Extensions section. - Charles R Greathouse IV, Aug 11 2020

Examples

			The smallest prime after 2^5 = 32 is 37, so a(5) = 37.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Exercise 4.19.

Crossrefs

Cf. A006992 (Bertrand primes), A079614 (Bertrand's constant), A227770 (Bertrand primes II).

Extensions

Although the exact value of the next term is not known, it has 41373247571 digits.
Next term is 2.8024843513561521356110...e41373247570, where the next digit is 3 or 4. Under the Riemann hypothesis, the first 20686623775 digits are known. [From Charles R Greathouse IV, Oct 27 2010]
Edited by Franklin T. Adams-Watters, Aug 10 2009
Reference and bounds on next term from Charles R Greathouse IV, Oct 27 2010
Name clarified by Jonathan Sondow, Aug 02 2013
Previous Showing 11-20 of 35 results. Next