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

A104094 Largest prime <= 9^n.

Original entry on oeis.org

7, 79, 727, 6553, 59029, 531383, 4782961, 43046623, 387420479, 3486784393, 31381059607, 282429536453, 2541865828309, 22876792454939, 205891132094623, 1853020188851807, 16677181699666513, 150094635296999111
Offset: 1

Views

Author

Cino Hilliard, Mar 03 2005

Keywords

Crossrefs

Cf. A013604.
Largest prime <= b^n: 2^n-A013603(n), 3^n-A013604(n), 4^n-A013606(n), 5^n-A013605(n), 6^n-A013607(n), 7^n-A013608(n), 8^n-A013603(3*n), 10^n-A033874(n).

Programs

  • Maple
    f:= n -> prevprime(9^n):
    map(f, [$1..30]); # Robert Israel, Aug 12 2019
  • Mathematica
    NextPrime[#,-1]&/@(9^Range[20]) (* Harvey P. Dale, Apr 21 2024 *)
  • PARI
    g(n,b) = for(x=0,n,print1(precprime(b^x)","))

Formula

a(n) = 9^n - A013604(2*n) = A001019(n) - A013604(2*n), n > 0. A.H.M. Smeets, Aug 12 2019

A338376 (Smallest prime >= 6^n) - (largest prime <= 6^n).

Original entry on oeis.org

2, 6, 12, 6, 30, 14, 22, 18, 32, 12, 94, 54, 52, 18, 98, 66, 84, 18, 36, 18, 30, 138, 80, 96, 30, 142, 36, 80, 52, 26, 78, 64, 126, 138, 94, 136, 162, 276, 110, 162, 206, 94, 78, 324, 186, 128, 118, 56, 102, 390, 78, 90, 18, 62, 94, 108, 220, 100, 336, 618
Offset: 1

Views

Author

A.H.M. Smeets, Oct 26 2020

Keywords

Comments

Size of prime gap containing the number 6^n, for n > 1.
From Gauss's prime counting function approximation, the expected gap size should be approximately n*log(6), however, the observed values seem to be closer to n*log(36) = n*A016659.
The arithmetic mean of a(n)/n for the terms 1..1000 is 3.605 ~ 2*log(6).

Crossrefs

Cf. A058249 (2^n), A338155 (3^n), A338419 (5^n), A038804 (10^n).

Programs

  • Mathematica
    a[n_] := First @ Differences @ NextPrime[6^n, {-1, 1}]; Array[a, 60] (* Amiram Eldar, Oct 30 2020 *)
  • PARI
    a(n) = my(pw=6^n); nextprime(pw+1) - precprime(pw-1); \\ Michel Marcus, Oct 27 2020

Formula

a(n) = A013607(n) + A013600(n).

A182262 Least prime p that 6^n - p is prime.

Original entry on oeis.org

3, 5, 5, 5, 17, 7, 17, 7, 7, 7, 59, 19, 17, 13, 7, 19, 137, 13, 19, 7, 23, 97, 19, 89, 17, 223, 29, 109, 5, 19, 5, 59, 197, 5, 17, 307, 59, 83, 109, 157, 19, 23, 43, 109, 103, 7, 23, 19, 7, 269, 43, 13, 5, 67, 89, 83, 479, 53, 53, 383, 7, 83, 113, 37, 5, 23
Offset: 1

Views

Author

Mateusz SzymaƄski, Apr 21 2012

Keywords

Examples

			For n=3 p=5 is the least prime that 6^3-p is prime (211).
		

Crossrefs

Cf. A013607, A059614 (n such that a(n)=5).

Programs

  • Maple
    f:= proc(n) local t,p;
      t:= 6^n;
      p:= 2;
      do
        p:= nextprime(p);
      until isprime(t-p);
      p
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 05 2020
  • Mathematica
    f[n_] := Block[{p = 2}, While[! PrimeQ[6^n - p], p = NextPrime[p]];
      p]; Array[f, 60]
  • PARI
    a(n) = my(p = 2); while(!isprime(6^n-p), p = nextprime(p+1)); p; \\ Michel Marcus, Mar 23 2016

A309527 Numbers k such that 6^k + 17 is prime.

Original entry on oeis.org

1, 2, 3, 5, 8, 10, 19, 27, 79, 198, 565, 787, 2183, 3811, 4748, 6210, 7887, 8965, 13303, 20125, 23433, 28797
Offset: 1

Views

Author

Daniel Starodubtsev, Aug 06 2019

Keywords

Comments

a(20) > 14000. - Daniel Starodubtsev, Apr 17 2020

Examples

			3 is in the sequence because 6^3 + 17 = 233, which is prime.
		

Crossrefs

Programs

  • PARI
    lista(nn)=for(k=0,nn,if(ispseudoprime(6^k+17),print1(k", ")))

Extensions

a(17)-a(18) from Daniel Starodubtsev, Mar 16 2020
a(19) from Daniel Starodubtsev, Apr 17 2020
a(20)-a(22) from Michael S. Branicky, Mar 14 2023
Showing 1-4 of 4 results.