%I #10 Oct 03 2022 10:58:55
%S 127,193,431,705,795,798,1282,1601,1635,1659,1784,1862,2245,2257,2301,
%T 2424,2532,2635,2776,2830,3007,3022,3076,3089,3125,3193,3296,3307,
%U 3325,3349,3546,3609,3649,3741,3895,3932,3940,3958,4065,4093,4153,4318,4489
%N Numbers k such that (k + prime(k)) and (k+1 + prime(k+1)) are divisible by 11.
%H Robert Israel, <a href="/A107380/b107380.txt">Table of n, a(n) for n = 1..10000</a>
%p R:= NULL: count:= 0: p:= 1: state:= 0:
%p for n from 1 while count < 100 do
%p p:= nextprime(p);
%p if n+p mod 11 = 0 then
%p if state = 1 then count:= count+1; R:= R, n-1 fi;
%p state:= 1
%p else
%p state:= 0
%p fi;
%p od:
%p R; # _Robert Israel_, Oct 02 2022
%t Select[Range[5000], Mod[Prime[ # ]+#, 11]+Mod[Prime[ #+1]+#+1, 11]==0&]
%t Flatten[ Position[Partition[Table[n+Prime[n],{n,5000}],2,1],_?(Mod[ First[ #],11]+ Mod[Last[#],11]==0&),{1},Heads->False]] (* _Harvey P. Dale_, Mar 12 2013 *)
%K easy,nonn
%O 1,1
%A _Zak Seidov_, Jun 10 2005
|