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”).

a(n) = smallest prime > a(n-1) such that a(n)+a(n-1) is multiple of k, a(1)=2, k=101.
3

%I #9 Sep 25 2019 11:27:38

%S 2,503,709,907,911,1109,2729,2927,3739,4139,4547,5351,5557,6361,6971,

%T 7573,7577,8179,10607,11411,11617,12421,12829,13229,14243,15451,15859,

%U 16057,16061,17471,19697,21107,21313,21713,22727,23531,26161,26561

%N a(n) = smallest prime > a(n-1) such that a(n)+a(n-1) is multiple of k, a(1)=2, k=101.

%H Harvey P. Dale, <a href="/A178468/b178468.txt">Table of n, a(n) for n = 1..1000</a>

%e 2+503=505=5*101, 503+709=1212=12*101, 709+907=1616=16*101.

%t k=101; a=p=2; s={2}; Do[p=NextPrime[p]; If[Mod[a+p, k]==0, a=p; AppendTo[s, a]], {10000}]; s

%t sp[n_]:=Module[{p=NextPrime[n]},While[Mod[n+p,101]!=0,p=NextPrime[p]];p]; NestList[sp,2,40] (* _Harvey P. Dale_, Sep 25 2019 *)

%Y Cf. A178429 - A178467 cases k=23(2)99, A175442 - A175451 cases k=3(2)21.

%K nonn

%O 1,1

%A _Zak Seidov_, May 28 2010