login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k such that prime(2k) mod prime(k) = prime(2k+2) mod prime(k+1).
1

%I #21 Jun 27 2024 22:15:35

%S 1,8,18,21,39,40,51,55,67,85,86,87,123,175,179,185,199,200,216,227,

%T 247,248,260,292,314,351,360,361,407,413,434,441,445,465,479,494,514,

%U 515,565,573,576,580,583,622,629,670,679,684,691,698,712,717,724,734

%N Numbers k such that prime(2k) mod prime(k) = prime(2k+2) mod prime(k+1).

%F prime(2*a(n)) mod prime(a(n)) = prime(2*a(n)+2) mod prime(a(n)+1).

%e a(2)=8 because prime(2*8) mod prime(8) = prime(2*8+2) mod prime(8+1) = 15.

%p A178180:=n->`if`((ithprime(2*n) mod ithprime(n)) = (ithprime(2*n+2) mod ithprime(n+1)),n,NULL): seq(A178180(n), n=1..10^3); # _Wesley Ivan Hurt_, Sep 14 2014

%t Select[Range[800],Mod[Prime[2#],Prime[#]]==Mod[Prime[2#+2],Prime[#+1]]&] (* _Harvey P. Dale_, May 28 2019 *)

%o (PARI) s=[]; for(n=1, 1000, if(prime(2*n)%prime(n) == prime(2*n+2)%prime(n+1), s=concat(s, n))); s \\ _Colin Barker_, Jun 27 2014

%Y Cf. A000040.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Dec 22 2010

%E Corrected by _R. J. Mathar_, Dec 22 2010

%E More terms from _Colin Barker_, Jun 27 2014