|
|
A284967
|
|
Even numbers n such that for every prime p for which n-p is also prime, the number n + (odd part of p-1) is composite.
|
|
1
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Terms 0 and 2 formally satisfy the definition.
The definition is similar to A284919, where the condition "n+p is composite" is replaced by "n+odd part of p-1 is composite".
|
|
LINKS
|
|
|
EXAMPLE
|
For n=76 the suitable primes p are 3, 5, 17, 23, 53, 59, 71, 73; 76 is not in the sequence since only for p=53 n+odd part of (53-1) = 76 + 13 = 89 is prime.
For n=118 the suitable primes p are 5, 11, 17, 29, 47, 59, 71, 89, 101, 107, 113; 118 is a member since all numbers 118+odd part of (p-1) for these primes p are composite.
|
|
MATHEMATICA
|
Select[Range[0, 10^4, 2], Function[n, Times @@ Boole@ Map[CompositeQ, n + Map[NestWhile[#/2 &, #, EvenQ] &, (Select[Prime@ Range@ PrimePi@ n, PrimeQ[n - #] &] - 1)]] == 1]] (* Michael De Vlieger, Apr 22 2017 *)
|
|
PROG
|
(PARI) isok(n) = {if ((n%2)==0, forprime(p=2, n, if (isprime(n-p), if (isprime(n + (p-1)/2^valuation(p-1, 2)), return (0)); ); ); return (1); ); } \\ Michel Marcus, Apr 22 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|