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.

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

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

Original entry on oeis.org

4, 6, 7, 8, 11, 13, 15, 19, 21, 23, 25, 27, 37, 39, 41, 45, 51, 55, 57, 63, 69, 73, 75, 81, 87, 93, 99, 105, 111, 117, 123, 135, 147, 153, 159, 165, 171, 195, 201, 213, 219, 225, 231, 237, 243, 255, 267, 273, 285, 297, 315, 321, 363, 369, 399, 405, 411, 423, 435, 447
Offset: 1

Views

Author

T. D. Noe, Nov 18 2004

Keywords

Comments

Is the sequence finite? If so, then A039669 is finite.

Examples

			27 is here because 27-2 is a semiprime and 27-4, 27-8 and 27-16 are primes.
		

Crossrefs

Cf. A039669 (n such that n-2^k is prime), A100350 (primes p such that p-2^k is prime or semiprime), A100351 (n such that n-2^k is semiprime).

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n]<2, False, (2==Plus@@Transpose[FactorInteger[Abs[n]]][[2]])]; lst={}; Do[k=1; While[p=n-2^k; p>0 && (SemiPrimeQ[p] || PrimeQ[p]), k++ ]; If[p<=0, AppendTo[lst, n]], {n, 3, 1000}]; lst

A100350 Primes p such that p-2^k is a prime or semiprime for all k > 0 with 2^k < p.

Original entry on oeis.org

7, 11, 13, 19, 23, 37, 41, 73
Offset: 1

Views

Author

T. D. Noe, Nov 18 2004

Keywords

Comments

These are the primes in A100349. No others < 10^9; conjecture that this sequence is finite.

Examples

			37 is here because 37-2, 37-4, 37-16 are semiprimes and 37-8, 37-32 are primes.
		

Crossrefs

Cf. A039669 (n such that n-2^k is prime), A100349 (n such that n-2^k is prime or semiprime), A100351 (n such that n-2^k is semiprime).

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n]<2, False, (2==Plus@@Transpose[FactorInteger[Abs[n]]][[2]])]; lst={}; Do[k=1; While[n=Prime[i]; p=n-2^k; p>0 && (SemiPrimeQ[p] || PrimeQ[p]), k++ ]; If[p<=0, AppendTo[lst, n]], {i, 2, 1000}]; lst
Showing 1-3 of 3 results.