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.

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.

This page as a plain text file.
%I A284967 #32 Apr 22 2017 15:14:08
%S A284967 0,2,8,118,868
%N 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.
%C A284967 Terms 0 and 2 formally satisfy the definition.
%C A284967 The definition is similar to A284919, where the condition "n+p is composite" is replaced by "n+odd part of p-1 is composite".
%C A284967 If there is a(6), it is more than 300000. - _Peter J. C. Moses_, Apr 15 2017
%e A284967 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.
%e A284967 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.
%t A284967 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 *)
%o A284967 (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
%Y A284967 Cf. A284919.
%K A284967 nonn,more
%O A284967 1,2
%A A284967 _Vladimir Shevelev_, Apr 15 2017
%E A284967 a(5) was calculated by _Peter J. C. Moses_, Apr 15 2017