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

A141340 Positive integers n such that A061358(n) = #{primes p | n/2 <= p < n-1}.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 24, 30, 36, 42, 48, 60, 90, 210
Offset: 1

Views

Author

Rick L. Shepherd, Jun 25 2008

Keywords

Comments

According to Brouwers et al., Deshouillers et al. showed that the maximum term of this sequence is 210. A141341 is a subsequence.
Positive integers k such that, for each prime p with k/2 <= p <= k - 2, k - p is prime. - Charles R Greathouse IV, May 28 2017

Examples

			For each prime 210/2 <= p <= 210, 210 - p is prime, and so 210 is in this sequence: 210 - 107 = 103, 210 - 109 = 101, 210 - 113 = 97, 210 - 127 = 83, 210 - 131 = 79, 210 - 137 = 73, 210 - 139 = 71, 210 - 149 = 61, 210 - 151 = 59, 210 - 157 = 53, 210 - 163 = 47, 210 - 167 = 43, 210 - 173 = 37, 210 - 179 = 31, 210 - 181 = 29, 210 - 191 = 19, 210 - 193 = 17, 210 - 197 = 13, 210 - 199 = 11. - _Charles R Greathouse IV_, May 28 2017
		

Crossrefs

Programs

  • Mathematica
    Block[{r = {}}, Do[ If[ AllTrue[i - #, PrimeQ] &@ NextPrime[i/2, Range[ PrimePi[i - 2] - PrimePi[i/2]]], AppendTo[r, i]], {i, 210}]; r] (* Mikk Heidemaa, May 29 2024 *)
  • PARI
    is(n)=forprime(p=n/2,n-2, if(!isprime(n-p),return(0))); 1 \\ Charles R Greathouse IV, May 28 2017; corrected by Michel Marcus, May 30 2024

A323215 Numbers k such that row k of A322936 is not empty and has only primes as members.

Original entry on oeis.org

5, 8, 9, 10, 12, 18, 24, 30
Offset: 1

Views

Author

Peter Luschny, Apr 01 2019

Keywords

Comments

a is strongly prime to n if and only if a <= n is prime to n and a does not divide n-1. See the link to 'Strong Coprimality'. (Our terminology follows the plea of Knuth, Graham and Patashnik in Concrete Mathematics, p. 115.)
From Robert Israel, Apr 02 2019: (Start)
If there is at least one prime <= sqrt(n) that divides neither n nor n-1, then its square is strongly prime to n and not prime. If there does not exist such a prime, then the first Chebyshev function theta(sqrt(n)) = Sum_{p <= sqrt(n)} log(p) <= 2 log(n). Now it is known that theta(x) = x + O(x/log(x)), so this can't happen if n is sufficiently large. Thus the sequence is finite.
The largest n for which no such p exists appears to be 120. There are none between 121 and 10^7. It is possible that a sufficiently tight lower bound on theta together with a finite search can be used to prove that there are no other terms of the sequence. (End)
There are no more terms. See proof at A307345. - Robert Israel, Apr 03 2019

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k, found;
      found:= false;
      for k from 2 to n-2 do
        if igcd(k,n)=1 and (n-1) mod k <> 0 then
          found:= true;
          if not isprime(k) then return false fi;
        fi
      od;
      found
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Apr 02 2019
  • Mathematica
    Select[Range[10^3], With[{n = #}, AllTrue[Select[Range[2, n], And[GCD[#, n] == 1, Mod[n - 1, #] != 0] &] /. {} -> {0}, PrimeQ]] &] (* Michael De Vlieger, Apr 01 2019 *)
  • Sage
    # uses[A322936row from A322936]
    def isA323215(n):
        return all(is_prime(p) for p in A322936row(n))
    [n for n in (1..100) if isA323215(n)] # Peter Luschny, Apr 03 2019

Extensions

Name corrected after a notice from Robert Israel by Peter Luschny, Apr 02 2019
Showing 1-2 of 2 results.