login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107582 Numbers n such that (n + prime(n)), (n+1 + prime(n+1)), (n+2 + prime(n+2)) and (n+3 + prime(n+3)) are divisible by 5. 1

%I #8 Sep 13 2020 23:20:02

%S 6291,6816,9951,11371,13066,13151,14906,16476,17531,17616,18136,18161,

%T 18816,20441,21036,22256,27211,27756,28926,31801,32601,33481,36616,

%U 37496,38706,39821,40206,41216,41416,41641,41676,41866,42506,43586

%N Numbers n such that (n + prime(n)), (n+1 + prime(n+1)), (n+2 + prime(n+2)) and (n+3 + prime(n+3)) are divisible by 5.

%H Robert Israel, <a href="/A107582/b107582.txt">Table of n, a(n) for n = 1..5000</a>

%p P:= 7: V:= [3,0,3,1]: R:= NULL:

%p for n from 2 to 50000 do

%p P:= nextprime(P);

%p V:= [V[2],V[3],V[4],P+n+3 mod 5];

%p if V = [0,0,0,0] then R:= R, n fi;

%p od:

%p R; # _Robert Israel_, Sep 13 2020

%t Select[Range[60000], Mod[Prime[ # ]+#, 5]+Mod[Prime[ #+1]+#+1, 5]+Mod[Prime[ #+2]+#+2, 5]+Mod[Prime[ #+3]+#+3, 5]==0&]

%t SequencePosition[Table[If[Divisible[n+Prime[n],5],1,0],{n,50000}],{1,1,1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 12 2018 *)

%K easy,nonn

%O 1,1

%A _Zak Seidov_, Jun 10 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:19 EDT 2024. Contains 371254 sequences. (Running on oeis4.)