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.

A039669 Numbers n > 2 such that n - 2^k is a prime for all k > 0 with 2^k < n.

Original entry on oeis.org

4, 7, 15, 21, 45, 75, 105
Offset: 1

Views

Author

Keywords

Comments

Erdős conjectures that these are the only values of n with this property.
No other terms below 2^120. - Max Alekseyev, Dec 08 2011
Curiously, Mientka and Weitzenkamp say there are 9 such numbers below 20000. - Michel Marcus, May 12 2013
Presumably, Mientka and Weitzenkamp are including 1 and 2. - Robert Israel, Dec 23 2015
Observation: The prime numbers of the form (n-2) associated with each element of the series are (2,5,13,19,43,73,103). These prime numbers are exactly the first elements of A068374 (primes n such that positive values of n - A002110(k) are all primes for k>0). - David Morales Marciel, Dec 14 2015

Examples

			45 is here because 43, 41, 37, 29 and 13 are primes.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A19.
  • F. Le Lionnais, Les Nombres Remarquables, Paris, Hermann, 1983, p. 96, 1983.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, p. 306.
  • D. Wells, Curious and interesting numbers, Penguin Books, p. 118.

Crossrefs

Cf. A067526 (n such that n-2^k is prime or 1), A067527 (n such that n-3^k is prime), A067528 (n such that n-4^k is prime or 1), A067529 (n such that n-5^k is prime), A100348 (n such that n-4^k is prime), A100349 (n such that n-2^k is prime or semiprime), A100350 (primes p such that p-2^k is prime or semiprime), A100351 (n such that n-2^k is semiprime).
Cf. A022005.

Programs

  • MATLAB
    N = 10^8; % to get terms < N
    p = primes(N);
    A = [3:N];
    for k = 1:floor(log2(N))
      A = intersect(A, [1:(2^k), (p+2^k)]);
    end
    A % Robert Israel, Dec 23 2015
  • Mathematica
    lst={}; Do[k=1; While[p=n-2^k; p>0 && PrimeQ[p], k++ ]; If[p<=0, AppendTo[lst, n]], {n, 3, 1000}]; lst (* T. D. Noe, Sep 15 2002 *)
  • PARI
    isok(n) = {my(k = 1); while (2^k < n, if (! isprime(n-2^k), return (0)); k++;); return (1);} \\ Michel Marcus, Dec 14 2015
    

Extensions

Additional comments from T. D. Noe, Sep 15 2002
Definition edited by Robert Israel, Dec 23 2015