%I #12 Feb 26 2017 13:25:35
%S 1,4,67,84,88
%N Numbers n such that prime(n) divides prime(2*n) + prime(3*n).
%C Almost surely the sequence is finite and complete, since the ratio (p(3n)+p(2n))/p(n) tends to 5 from above. For n = 5*10^9 the ratio is 5.19958, for n = 10^100 we can estimate it as 5.02. - _Giovanni Resta_, May 22 2013
%e Prime(4)=7 divides prime(8)+prime(12)=19+37=56, so 4 is in the sequence.
%t Select[Range[100],Divisible[Prime[2#]+Prime[3#],Prime[#]]&] (* _Harvey P. Dale_, Feb 26 2017 *)
%o (C)
%o #include <stdio.h>
%o #define TOP (1ULL<<32)
%o typedef unsigned long long U64;
%o int main() {
%o U64 i, j, k, n=1, *primes = (U64*)malloc(TOP);
%o char *c = (char*)malloc(TOP/2);
%o memset(c, 0, TOP/2);
%o for (primes[0] = 2, i = 3; i < TOP; i+=2)
%o if (c[i>>1]==0) {
%o primes[n++] = i;
%o if ((n%3)==0 && (i+primes[n*2/3-1]) % primes[n/3-1]==0)
%o printf("%llu, ", n/3);
%o for (j = i*i>>1; j < TOP/2; j += i) c[j] = 1;
%o }
%o return 0;
%o }
%Y Cf. A000040, A066896.
%K nonn,more
%O 1,2
%A _Alex Ratushnyak_, May 21 2013
|