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 33 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

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

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

A065545 a(n) is smallest prime > 2*a(n-1), a(1) = 3.

Original entry on oeis.org

3, 7, 17, 37, 79, 163, 331, 673, 1361, 2729, 5471, 10949, 21911, 43853, 87719, 175447, 350899, 701819, 1403641, 2807303, 5614657, 11229331, 22458671, 44917381, 89834777, 179669557, 359339171, 718678369, 1437356741, 2874713497
Offset: 1

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Comments

There is no common term with A055496? - Zak Seidov, Feb 04 2016
Correct, there is no common term with A055496. - Flávio V. Fernandes, Apr 10 2021

Crossrefs

Cf. A055496.

Programs

  • Mathematica
    NextPrim[n_Integer] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; Return[k]]; a[1] = 3; a[n_] := NextPrim[ 2*a[n - 1]]; Table[ a[n], {n, 1, 20} ]
    NestList[NextPrime[2*#] &, 3, 29] (* Zak Seidov, Feb 04 2016 *)
  • PARI
    lista(nn) = {print1(a = 3, ", "); for (n=1, nn, a = nextprime(2*a+1); print1(a, ", "););} \\ Michel Marcus, Feb 04 2016

A290183 a(n) is least p to label a node of height n in the rooted tree which has the primes (A000040) as labels for its nonroot nodes, and the parent of the node labeled p is the node labeled with the greatest prime less than p/2 (or the root if there is no such node).

Original entry on oeis.org

59, 331, 163, 79, 37, 17, 724777, 941593, 3578683, 73397147, 52457707, 26228849, 2600553509, 1300276753
Offset: 0

Views

Author

Peter Munn, Jul 23 2017

Keywords

Comments

The parent of the node labeled p is the adjacent node through which it is connected to the root.
The "tree of primes" defined above relates to many older sequences. The node labeled A055377(n) is parent of the node labeled n. The node labeled prime(k) has A102820(k) child nodes and unless it has no child nodes, these are labeled with the primes from A059786(k) to A059788(k+1). The leaf node labels are A080192. The nodes of depth m are those with labels in the interval [A055496(m), A055496(m+1)). The full tree may be defined using A000040 read as a table with row lengths given by A102820 prefixed by 2.
If the set of heights of nodes has a greatest finite value, k, this sequence is finite with k+1 contiguous defined terms.
That said, the author's initial assessment is that occurrence of height n nodes will have similarities to occurrence of least primes of prime k-tuples, namely: (1) labels of nodes of height n will occur almost as though at random intervals amongst the primes; (2) for any n, the apparent odds against a prime p being such a label will not be greater than polynomial in log(p); and thus (3) a(n) plausibly exists for all n.
Some initial empirical observation suggests nodes of height n+1 may occur something like 5 to 10 times less frequently than those of height n.
Terms a(1) to a(5) come from the subtree consisting of the node labeled 17 and its descendants, as depicted in the example section below. This implies 4 consecutive negative first differences, which may be rare later in the sequence.

Examples

			The only prime between 2 * 331 = 662 and 2 * nextprime(331) = 2 * 337 = 674 is 673, so the node labeled 331 is parent only to the node labeled 673. There are no primes between 2 * 673 = 1346 and 2 * nextprime(673) = 2 * 677 = 1354, so the node labeled 673 is a leaf. Thus the node labeled 331 has height 1. It is the least such prime, so a(1) = 331.
The "tree of primes" defined above starts:
                            Root
               +----------------------------+
               2                            3
               |                            |
               5                            7
       +--------------+                 +-------+
      11             13                17      19
       |         +-----------+          |    +----+
      23        29          31         37   41   43
    +----+    +----+    +----+----+     |    |    |
   47   53   59   61   67   71   73    79   83   89
The subtree consisting of the node labeled 17 and all 5 of its descendants is:
      17
       |
      37
       |
      79
       |
     163
       |
     331
       |
     673
From _Peter Munn_, Nov 22 2018: (Start)
The subtree consisting of the node labeled with a(7) = 941593 and its descendants is:
             941593
        +------+--------+
     1883191         1883197
        |               |
     3766387         3766397
                        |
                     7532813
      +-----------------+-----------------+
  15065627          15065639           15065641
      |           +-----------+           |
  30131267    30131279    30131281     30131291
                                          |
                                       60262597
                                          |
                                      120525217
(End)
		

Crossrefs

Cf. A080192 is a list of leaf nodes.
Cf. A055377, A059786, A059788, and A102820 are associated with the parent/child node relationship.

Programs

  • PARI
    lista(nbp) = {my(v = primes(nbp), nv, x); for (n=0, oo, nv = Set(apply(x->precprime(x >> 1), v)); x = vecmin(setminus(v, nv)); if (x > vecmax(nv), break); print1(x, ", "); v = nv;);} /* use nbp=6*10^6 for 7 terms and nbp=2*10^7 for 8 terms */ \\ Michel Marcus, Nov 19 2018
    
  • PARI
    ntimes(p, n) = for (k=1, n, p = precprime(p>>1)); p;
    a(n) = {p = 2; x = ntimes(p, n); p = nextprime(p+1); q = 5; y = ntimes(q, n+1); q = nextprime(q+1); for (k= 1, oo, if (y != x, return (x)); until((ny = ntimes(q, n+1)) != x, q = nextprime(q+1)); until((nx = ntimes(p, n)) != x, p = nextprime(p+1)); x = nx; y = ny;);} \\ Michel Marcus, Dec 08 2018

Formula

a(n) = min (A055377^(n+1) \ A055377^(n+2)), where A055377^(i) denotes the image set of N after i applications of A055377. - clarified following suggestion by Michel Marcus, Nov 13 2018

Extensions

Candidate for a(8) confirmed by Michel Marcus, Nov 14 2018
a(9)-a(13) from Michel Marcus, Jan 02 2019

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

A080735 a(1)=1, then a(n)=2*a(n-1) if a(n-1) is prime, a(n)=a(n-1)+1 otherwise.

Original entry on oeis.org

1, 2, 4, 5, 10, 11, 22, 23, 46, 47, 94, 95, 96, 97, 194, 195, 196, 197, 394, 395, 396, 397, 794, 795, 796, 797, 1594, 1595, 1596, 1597, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 6406, 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416
Offset: 1

Views

Author

Benoit Cloitre, Mar 08 2003

Keywords

Comments

Conjectures: (Strong) Let x,y be 2 positive integers and define a(n) as a(1)=1, a(n)=x*a(n-1) if a(n-1) is prime, a(n)=a(n-1)+y otherwise; then lim_{n->oo} log(a(n))/sqrt(n) = C(x,y) exists. (Weak) log(a(n))/sqrt(n) is bounded.

Crossrefs

Programs

  • Mathematica
    NestList[If[PrimeQ[#],2#,#+1]&,1,50] (* Harvey P. Dale, Aug 26 2013 *)
  • PARI
    u=1; for(n=2,100,v=if(isprime(u),u+1,2*u); u=v; print1(v,","))

Formula

It seems that log(a(n))/sqrt(n) -> C, a constant around 1.3.....
a(n) = A055496(m) when a(n+1) > a(n) + 1. - Bill McEachen, Mar 24 2024

A105120 a(1) = 2; k(1) = 0; for n > 1: k(n) = smallest number j >= k(n-1) such that 2*a(n-1) + j is prime; a(n) = 2*a(n-1) + k(n).

Original entry on oeis.org

2, 5, 11, 23, 47, 97, 197, 397, 797, 1597, 3203, 6421, 12889, 25841, 51749, 103567, 207227, 414553, 829211, 1658533, 3317177, 6634469, 13269059, 26538257, 53076679, 106153547, 212307299, 424614829, 849229907, 1698460067, 3396920419
Offset: 1

Views

Author

Yasutoshi Kohmoto, Apr 08 2005

Keywords

Comments

Numbers k(n) are given in A105121.
a(n) appears to tend toward C*A055496(n), C~ 0.992521946129820000. - Bill McEachen, Feb 21 2022

Examples

			a(10) = 1597; k(10) = 3; 2*1597 + j is not prime for 3 <= j < 9, but 2*1597 + 9 = 3203 is prime. Hence k(11) = 9 and a(11) = 3203.
		

Crossrefs

k(n) is in A105121.

Programs

  • Mathematica
    a[1] = {2, 0}; a[n_] := a[n] = Block[{m = 2a[n - 1][[1]], k = a[n - 1][[2]]}, While[ !PrimeQ[m + k], k++ ]; {m + k, k}]; Table[ a[n][[1]], {n, 30}] (* Robert G. Wilson v, Apr 08 2005 *)
  • PARI
    print1(a=2,","); k=0; for(n=2,31, j=k; while(!isprime(2*a+j),j++); k=j; print1(a=2*a+k,",")) \\ Klaus Brockhaus, Apr 08 2005

Extensions

Edited, corrected and extended by Klaus Brockhaus and Robert G. Wilson v, Apr 08 2005

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
Previous Showing 11-20 of 33 results. Next