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.

A013602 a(n) = nextprime(4^n)-4^n.

Original entry on oeis.org

1, 1, 1, 3, 1, 7, 3, 27, 1, 3, 7, 15, 43, 15, 3, 3, 15, 25, 31, 7, 15, 15, 7, 15, 21, 55, 21, 159, 81, 69, 33, 135, 13, 9, 33, 25, 15, 37, 15, 7, 13, 9, 3, 27, 7, 133, 25, 129, 61, 7, 277, 267, 111, 99, 33, 27, 25, 43, 33, 25, 451, 277, 67, 7, 51, 169, 67, 27, 85, 87
Offset: 0

Views

Author

James Kilfiger (mapdn(AT)csv.warwick.ac.uk)

Keywords

Crossrefs

Programs

  • Maple
    seq(nextprime(4^i)-4^i,i=0..100);
  • Mathematica
    np4[n_]:=Module[{c=4^n},NextPrime[c]-c]; Array[np4,70,0] (* Harvey P. Dale, Jan 23 2012 *)
  • PARI
    a(n) = nextprime(4^n)-4^n; \\ Michel Marcus, Aug 13 2019

Formula

a(n) = A104082(n) - A000302(n). - Michel Marcus, Aug 13 2019
a(n) = A013597(2*n), n >= 0. - A.H.M. Smeets, Aug 13 2019

A104089 Largest prime <= 4^n.

Original entry on oeis.org

3, 13, 61, 251, 1021, 4093, 16381, 65521, 262139, 1048573, 4194301, 16777213, 67108859, 268435399, 1073741789, 4294967291, 17179869143, 68719476731, 274877906899, 1099511627689, 4398046511093, 17592186044399, 70368744177643
Offset: 1

Views

Author

Cino Hilliard, Mar 03 2005

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrime[4^Range[30], -1] (* Paolo Xausa, Oct 28 2024 *)
  • PARI
    g(n,b) = for(x=0,n,print1(precprime(b^x)","))

Formula

a(n) = A007917(A000302(n)). - Paolo Xausa, Oct 28 2024

A340959 Table read by antidiagonals of the smallest prime >= n^k, n >= 1 and k >= 0.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 5, 11, 11, 2, 2, 5, 17, 29, 17, 2, 2, 7, 29, 67, 83, 37, 2, 2, 7, 37, 127, 257, 251, 67, 2, 2, 11, 53, 223, 631, 1031, 733, 131, 2, 2, 11, 67, 347, 1297, 3137, 4099, 2203, 257, 2, 2, 11, 83, 521, 2411, 7789, 15629, 16411, 6563
Offset: 1

Views

Author

Donald S. McDonald, Jan 31 2021

Keywords

Examples

			Table begins:
  2, 2,  2,   2,   2,    2, ...
  2, 2,  5,  11,  17,   37, ...
  2, 3, 11,  29,  83,  251, ...
  2, 5, 17,  67, 257, 1031, ...
  2, 5, 29, 127, 631, 3137, ...
  ...;
yielding the triangle:
  2;
  2, 2;
  2, 2,  2;
  2, 3,  5,  2;
  2, 5, 11, 11,  2;
  2, 5, 17, 29, 17, 2;
  ...
		

Crossrefs

Cf. A104080 (n=2), A104081 (n=3), A104082 (n=4), A104083 (n=5), A104084 (n=7).

Programs

  • Mathematica
    T[n_,k_]:=NextPrime[n^k-1];Flatten[Table[T[n-k,k],{n,11},{k,0,n-1}]] (* Stefano Spezia, Feb 01 2021 *)
  • PARI
    T(n,k) = nextprime(n^k); \\ Michel Marcus, Feb 01 2021

Formula

T(n,k) = next_prime(n^k-1).

A361173 Numbers k such that, in base 4, the greatest prime less than 4^k and the least prime greater than 4^k have no common digit.

Original entry on oeis.org

1, 4, 28, 83, 1816
Offset: 1

Views

Author

Lewis Baxter, Mar 02 2023

Keywords

Comments

In base 4 all consecutive primes with no common digit are of this form, except for 2 and 3.
It is unknown whether this sequence is infinite.
Base 2 and base 3 have no such primes.

Examples

			k=4 is a term: the consecutive primes are 251 and 257. In base 4 their representations are 3323 and 10001, which have no common digit.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], ! IntersectingQ @@ IntegerDigits[NextPrime[4^#, {-1, 1}], 4] &] (* Amiram Eldar, Mar 03 2023 *)
  • PARI
    isok(k) = #setintersect(Set(digits(precprime(4^k), 4)), Set(digits(nextprime(4^k), 4))) == 0; \\ Michel Marcus, Mar 03 2023
    
  • Python
    from sympy.ntheory import digits, nextprime, prevprime
    def ok(n):
        p, q = prevprime(4**n), nextprime(4**n)
        return set(digits(p, 4)[1:]) & set(digits(q, 4)[1:]) == set()
    print([k for k in range(1, 99) if ok(k)]) # Michael S. Branicky, Mar 03 2023
Showing 1-4 of 4 results.