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-6 of 6 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

A067528 Numbers n such that n - 4^k is a prime or 1 for all k > 0 and n > 4^k.

Original entry on oeis.org

5, 6, 7, 9, 11, 15, 17, 21, 23, 27, 33, 35, 45, 47, 57, 63, 75, 77, 83, 87, 105, 117, 143, 153, 167, 195, 215, 227, 243, 245, 255, 287, 297, 413, 437, 447, 483, 495, 507, 525, 573, 635, 657, 677, 755, 825, 1113, 1133, 1295, 1487, 1515, 1547, 1617, 1623, 2015
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Comments

Is the sequence finite?
The last term appears to be 5833497. - T. D. Noe, Nov 23 2004
A less strict version of A039669, n - 2^k is prime for 0 < k < log_2 k. If a number is in that sequence, then obviously it is also in this sequence. As of this writing, 105 is believed to be the last term of that sequence. - Alonso del Arte, May 24 2017

Examples

			167 is a term as 167 - 4 = 163, 167 - 16 = 151, 167 - 64 = 103 are primes.
		

Crossrefs

Cf. A067526.

Programs

  • Maple
    filter:= proc(n) local k, t;
      for k from 1 do
        if 4^k >= n-1 then return true
        elif not isprime(n-4^k) then return false
        fi
      od
    end proc:
    select(filter, [$5..3000]); # Robert Israel, May 24 2017
  • Mathematica
    A067528 = {}; Do[k = 1; While[p = n - 4^k; p > 0 && (p == 1 || PrimeQ[p]), k++]; If[p <= 0, AppendTo[A067528, n]], {n, 5, 10^7}]; A067528 (* T. D. Noe *)

Extensions

More terms from Sascha Kurz, Mar 19 2002

A067527 n - 3^k is a prime for all k > 0 such that 3^k < n.

Original entry on oeis.org

5, 6, 8, 14, 16, 20, 22, 26, 32, 40, 46, 50, 56, 70, 110, 140, 260, 470, 1190, 1330
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Comments

Is the sequence finite?
No other terms below 3^36. - Max Alekseyev, Dec 12 2011

Examples

			40 is a member as 40 - 3 = 37, 40 - 9 = 31, 40 - 27 = 13 are all primes.
		

Crossrefs

Cf. A067526.
Cf. A039669 (n - 2^k is prime).

Programs

  • Mathematica
    A067527 = {}; Do[k = 1; While[p = n - 3^k; p > 0 && PrimeQ[p], k++]; If[p <= 0, AppendTo[A067527, n]], {n, 4, 10000}]; A067527 (* T. D. Noe, Feb 20 2005 *)

Extensions

More terms from Sascha Kurz, Mar 18 2002
Edited by Max Alekseyev, Dec 12 2011

A067529 n - 5^k is a prime for all k > 0 and n > 5^k.

Original entry on oeis.org

7, 8, 10, 12, 16, 18, 22, 24, 28, 36, 42, 48, 66, 72, 78, 84, 108, 114, 132, 156, 162, 198, 204, 276, 282, 288, 318, 336, 492, 504, 546, 582, 612, 624, 666, 864, 882, 1044, 1134, 1218, 1242, 1326, 1452, 1998, 2136, 2472, 2922, 3234, 3948, 4032, 4572, 4914, 6342
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Comments

Is the sequence finite?
The last term appears to be 7726572. - T. D. Noe, Nov 23 2004

Examples

			624 is a term as 624-5, 624-25,624-125 or 619,599 and 499 are primes.
		

Crossrefs

Cf. A039669 (n-2^k is prime).

Programs

  • Mathematica
    lst={}; Do[k=1; While[p=n-5^k; p>0 && PrimeQ[p], k++ ]; If[p<=0, AppendTo[lst, n]], {n, 6, 10^7}]; lst (T. D. Noe)

Extensions

More terms from Sascha Kurz, Mar 19 2002

A282459 Number of composite numbers of the form 2*n - 2^k + 1 (k > 0, 2^k < 2*n + 1).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 2, 2, 1, 3, 2, 1, 2, 3, 1, 4, 3, 0, 3, 2, 2, 4, 2, 3, 4, 2, 1, 4, 4, 1, 4, 4, 0, 3, 4, 3, 3, 4, 2, 5, 3, 3, 4, 5, 3, 4, 4, 0, 4, 4, 1, 4, 3, 2, 5, 4, 4, 4, 6, 3, 4, 4, 2, 6, 3, 3, 4, 4, 3, 7, 5, 3, 5, 5, 3, 5, 6, 2, 4, 4, 2, 5, 4, 5, 6, 3, 3, 6, 5, 3, 6, 6, 1, 5, 3, 2, 5, 5, 4, 6, 5, 3, 4, 6
Offset: 0

Views

Author

Altug Alkan, Feb 15 2017

Keywords

Comments

It is conjectured that a(n) > 0 for all n > 52. See related conjecture and findings in A039669. Also see the graph of this sequence.

Examples

			a(7) = 0 because 2*7 + 1 - 2^1 = 13, 2*7 + 1 - 2^2 = 11, 2*7 + 1 - 2^3 = 7 are prime numbers.
		

Crossrefs

Programs

  • PARI
    isA002808(n) = n>1 && !isprime(n);
    a(n) = sum(k=1, log(2*n+1)\log(2), isA002808(2*n+1-2^k))

A067530 Numbers k such that k - m! is a prime or 1 for all m > 1 and k > m!.

Original entry on oeis.org

3, 4, 5, 7, 9, 13, 19, 25, 43, 85, 103, 133, 403, 763, 943, 1573, 1603, 2713, 5233, 26023, 37363, 177133, 186043, 276043, 277603, 305863, 968833, 1449313, 1540033, 5854363, 6013873, 26114323, 35088793, 291865753, 724927333
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Comments

Is the sequence finite?
Next term, if it exists, exceeds 6*10^9. - Sean A. Irvine, Dec 18 2023

Examples

			85 is a term as 85 - 2!, 85 -3!, 85-4! or 83,79 and 61 are primes.
		

Crossrefs

Extensions

More terms from Sascha Kurz, Mar 19 2002
Offset corrected and a(33)-a(34) from Sean A. Irvine, Dec 18 2023
Showing 1-6 of 6 results.