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

A175089 Numbers m with result 0 under iterations of {r mod (max prime p <= r)} starting at r = m.

Original entry on oeis.org

2, 3, 5, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 26, 28, 29, 31, 33, 34, 36, 37, 39, 40, 41, 43, 45, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 63, 64, 66, 67, 69, 70, 71, 73, 75, 76, 78, 79, 81, 82, 83, 85, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100
Offset: 1

Views

Author

Jaroslav Krizek, Jan 28 2010

Keywords

Comments

Complement of A175088.
Union of A000040 (primes) and A175090. [Jaroslav Krizek, Feb 05 2010]
Numbers m such that A121559(m) = 0. - Michel Marcus, Aug 22 2014

Examples

			Iteration procedure for a(3) = 5: 5 mod 5 = 0.
Iteration procedure for a(5) = 9: 9 mod 7 = 2, 2 mod 2 = 0.
		

Crossrefs

Cf. A007917 and A064722 (both for the iterations).

Extensions

More terms from Michel Marcus, Aug 22 2014

A350496 Positive integers k such that if p is the largest prime less than k then k - p is prime.

Original entry on oeis.org

5, 7, 9, 10, 13, 15, 16, 19, 21, 22, 25, 26, 28, 31, 33, 34, 36, 39, 40, 43, 45, 46, 49, 50, 52, 55, 56, 58, 61, 63, 64, 66, 69, 70, 73, 75, 76, 78, 81, 82, 85, 86, 88, 91, 92, 94, 96, 99, 100, 103, 105, 106, 109, 111, 112, 115, 116, 118, 120, 124, 126, 129
Offset: 1

Views

Author

Ryan Bresler, Jan 01 2022

Keywords

Comments

a(n) is prime only when n is the greater of a twin prime pair (A006512). All other terms are composite.

Examples

			9 is a term because the previous prime < 9 is 7, and 9 - 7 = 2, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 130], PrimeQ[# - NextPrime[#, -1]] &] (* Amiram Eldar, Jan 02 2022 *)
  • PARI
    isok(k) = if (k>2, my(q=precprime(k-1)); isprime(k-q)); \\ Michel Marcus, Jan 02 2022
  • Python
    from sympy import isprime, prevprime
    def ok(n): return n > 2 and isprime(n-prevprime(n))
    print([k for k in range(249) if ok(k)]) # Michael S. Branicky, Jan 01 2022
    

A350472 Positive integers k such that if p is the next prime > k, and q is the previous prime < k, then p - k is prime and k - q is prime.

Original entry on oeis.org

5, 9, 15, 21, 26, 34, 39, 45, 50, 56, 64, 69, 76, 81, 86, 92, 94, 99, 105, 111, 116, 120, 124, 129, 134, 142, 144, 146, 154, 160, 165, 170, 176, 184, 186, 188, 195, 204, 206, 216, 218, 225, 231, 236, 244, 246, 248, 254, 260, 266, 274, 279, 286, 288, 290, 296
Offset: 1

Views

Author

Ryan Bresler, Jan 01 2022

Keywords

Comments

a(n) can only be composite (excluding a(1) = 5).

Examples

			9 is a term because the next prime > 9 is 11 and the previous prime < 9 is 7, and 11 - 9 = 2 (which is prime) and 9 - 7 = 2 (which is also prime).
		

Crossrefs

Intersection of A350496 and A350460.

Programs

  • Maple
    q:= n-> andmap(isprime, [nextprime(n)-n, n-prevprime(n)]):
    select(q, [$3..400])[];  # Alois P. Heinz, Jan 01 2022
  • Mathematica
    Select[Range[350], And @@ PrimeQ[{# - NextPrime[#, -1], NextPrime[#] - #}] &] (* Amiram Eldar, Jan 01 2022 *)
  • PARI
    isok(k) = my(p=nextprime(k+1), q=precprime(k-1)); isprime(p-k) && isprime(k-q); \\ Michel Marcus, Jan 01 2022
  • Python
    from sympy import isprime, nextprime, prevprime
    def ok(n):
        return n > 2 and isprime(nextprime(n) - n) and isprime(n - prevprime(n))
    print([k for k in range(341) if ok(k)]) # Michael S. Branicky, Jan 01 2022
    
Showing 1-3 of 3 results.