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.

User: John-Å. W. Olsen

John-Å. W. Olsen's wiki page.

John-Å. W. Olsen has authored 5 sequences.

A225587 a(n) is the smallest prime of the form prime(n)*q + prime(n) + q, where q is an odd prime.

Original entry on oeis.org

11, 23, 23, 31, 47, 83, 71, 79, 191, 179, 127, 151, 167, 263, 191, 431, 239, 743, 271, 431, 443, 479, 503, 359, 587, 1223, 1871, 431, 439, 683, 6143, 1583, 827, 839, 599, 607, 631, 983, 2351, 2087, 719, 727, 1151, 1163, 1187, 2399, 2543, 2687, 911, 919
Offset: 1

Author

John-Å. W. Olsen, May 11 2013

Keywords

Comments

The odd primes q minimizing prime(n)*q + prime(n) + q are listed in A225581.

Examples

			a(1) = 11 because prime(1) = 2 and the minimal prime of the form 2*q+2+q with q an odd prime is 11 = 2*3+2+3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{q = 3, v, p = Prime@n},While[! PrimeQ[v = p q + p + q], q = NextPrime@q]; v]; Array[a, 50] (* Giovanni Resta, May 11 2013 *)

Formula

a(n) = (1+prime(n))*A225581(n) + prime(n).

Extensions

a(26)-a(50) from Giovanni Resta, May 11 2013

A225626 Primes p such that floor(log(p)) + p^2 is prime.

Original entry on oeis.org

67, 73, 97, 103, 137, 431, 569, 709, 859, 929, 941, 971, 991, 1039, 22093, 22621, 22679, 22697, 22709, 22739, 22943, 22961, 22963, 23087, 23159, 23173, 23197, 23369, 23509, 23971, 24077, 24083, 24097, 24109, 24151, 24373, 24413, 24571, 24623, 24781, 24851
Offset: 1

Author

John-Å. W. Olsen, May 11 2013

Keywords

Crossrefs

Cf. A225625.

Programs

  • Mathematica
    Select[Prime[Range[3000]], PrimeQ[Floor[Log[#]] + #^2] &] (* T. D. Noe, May 13 2013 *)

A225659 Primes p where p + sumOfDigits(p) +- 3 is prime.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 41, 43, 47, 61, 67, 83, 89, 131, 137, 139, 157, 173, 179, 191, 197, 223, 227, 229, 241, 263, 269, 283, 311, 313, 317, 337, 353, 359, 373, 379, 397, 401, 409, 421, 443, 449, 463, 467, 487, 557
Offset: 1

Author

John-Å. W. Olsen, May 11 2013

Keywords

Comments

a(n) = A068690(n), A030144(n), A069556(n), A091727(n), A156756(n) if n<14.

Examples

			If p = 409, then 409 + sod(409) +- 3 = 409+13 - 3 = 419, which is prime.
If p =  23, then  23 + sod(23)  +- 3 = 23+5   + 3 = 31,  which is prime.
		

Programs

  • Mathematica
    Select[Prime[Range[102]],Or@@PrimeQ[#+Total[IntegerDigits[#]]+{3,-3}] &] (* Jayanta Basu, May 23 2013 *)
  • PARI
    ok(p)= {my(s=vecsum(digits(p)));isprime(p) && (isprime(p+s-3) || isprime(p+s+3))}
    select(ok,[1..1000]) \\ Andrew Howroyd, Feb 22 2018

A225625 Primes of the form floor(log(p)) + p^2, where p is prime.

Original entry on oeis.org

4493, 5333, 9413, 10613, 18773, 185767, 323767, 502687, 737887, 863047, 885487, 942847, 982087, 1079527, 488100659, 511709651, 514337051, 515153819, 515698691, 517062131, 526381259, 527207531, 527299379, 533009579, 536339291, 536987939, 538100819, 546110171
Offset: 1

Author

John-Å. W. Olsen, May 11 2013

Keywords

Examples

			Floor(log(67)) + 67^2 = 4493.
Floor(log(22093)) + 22093^2 = 488100659.
		

Crossrefs

Cf. A225626 (primes p).

Programs

  • Mathematica
    p = Prime[Range[3000]]; Select[p^2 + Floor[Log[p]], PrimeQ] (* T. D. Noe, May 13 2013 *)

A225581 a(n) is the minimal odd prime q such that prime(n)*q + prime(n) + q is prime.

Original entry on oeis.org

3, 5, 3, 3, 3, 5, 3, 3, 7, 5, 3, 3, 3, 5, 3, 7, 3, 11, 3, 5, 5, 5, 5, 3, 5, 11, 17, 3, 3, 5, 47, 11, 5, 5, 3, 3, 3, 5, 13, 11, 3, 3, 5, 5, 5, 11, 11, 11, 3, 3, 7, 5, 3, 5, 3, 5, 5, 3, 5, 13, 11, 7, 3, 5, 11, 5, 3, 5, 5, 3, 19, 3, 3, 5, 29, 17, 3, 23, 3, 5, 7, 5, 5, 71, 3, 5, 5, 3, 3, 47, 3, 5, 3, 11, 3, 5, 3, 3, 11, 5, 23
Offset: 1

Author

John-Å. W. Olsen, May 11 2013

Keywords

Examples

			n = 1;  p = 2;  q = 3;
n = 2;  p = 3;  q = 5;
n = 3;  p = 5;  q = 3;
n = 4;  p = 7;  q = 3;
		

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    a[n_] := Block[{q = 3, p = Prime@n},While[! PrimeQ[p*q + p + q], q = NextPrime@q]; q]; Array[a, 101] (* Giovanni Resta, May 11 2013 *)
  • PARI
    a(n) = my(q=3, p=prime(n)); while(!isprime(p*q+p+q), q = nextprime(q+1)); q; \\ Michel Marcus, Sep 06 2021
    
  • Python
    from sympy import isprime, nextprime, prime
    def a(n):
        q, p = 3, prime(n)
        while not isprime(p*q + p + q): q = nextprime(q)
        return q
    print([a(n) for n in range(1, 102)]) # Michael S. Branicky, Sep 06 2021