login
Primes p=prime(k) such that p - nonprime(k) is prime and p + nonprime(k) is not prime, where prime(n) is the n-th prime and nonprime(n) is the n-th nonprime starting with nonprime(1) = 0.
1

%I #14 Aug 07 2017 04:53:14

%S 3,17,37,53,71,79,113,127,151,167,277,317,383,397,419,421,509,577,599,

%T 641,643,653,683,761,797,829,877,937,1049,1051,1087,1097,1163,1249,

%U 1283,1297,1367,1439,1483,1607,1699,1913,1933,1993,2017,2081,2089,2129,2131

%N Primes p=prime(k) such that p - nonprime(k) is prime and p + nonprime(k) is not prime, where prime(n) is the n-th prime and nonprime(n) is the n-th nonprime starting with nonprime(1) = 0.

%e 3(2) - 1(2) = 2 (prime) and 3(2) + 1(2) = 4 (nonprime), so 3 is in the sequence.

%e 17(7) - 10(7) = 7 (prime) and 17(7) + 10(7) = 27 (nonprime), so 17 is in the sequence.

%e 37(12) - 18(12) = 19 (prime) and 37(12) + 18(12) = 55 (nonprime), so 37 is in the sequence.

%e 53(16) - 24(16) = 29(prime) and 53(16) + 24(16) = 77 (nonprime), so 53 is in the sequence.

%e 71(20) - 28(20) = 43(prime) and 71(20) + 28(20) = 99 (nonprime), so 71 is in the sequence.

%p A141468 := proc(n) option remember ; local a; if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od; fi; end: for n from 1 to 700 do p := ithprime(n) ; if isprime( p- A141468(n)) and not isprime(p+A141468(n)) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, Jan 17 2009

%Y Cf. A000040, A141468, A144517.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Dec 15 2008

%E 227, 619, 1039, etc. removed, and 797, 1087, etc. added, by _R. J. Mathar_, Jan 17 2009

%E Better definition from _Michel Marcus_, Aug 07 2017