%I #11 Sep 10 2020 03:02:16
%S 6,6,9,12,9,12,18,12,15,26,15,18,30,18,21,34,21,30,34,26,30,26,50,30,
%T 34,30,39,34,50,34,76,50,39,60,39,42,76,42,45,86,45,60,64,50,60,50,56,
%U 60,64,56,60,56,129,60,64,60,69,64,93,64,76,134,69,76,69,72,76
%N Least s(k) such that n divides s(k)-s(j) for some j<k, where s=A024675.
%C For a guide to related sequences, see A204892.
%C a(n) >= n+4, with equality if and only if n+4 is in A024675.
%H Robert Israel, <a href="/A205372/b205372.txt">Table of n, a(n) for n = 1..10000</a>
%p N:= 200: # for terms before the first > the greatest prime <= N
%p P:= select(isprime, [seq(i,i=3..N,2)]):
%p S:= (P[1..-2]+P[2..-1])/2:
%p f:= proc(n) local T,R,i;
%p T:= S mod n;
%p R:= {}:
%p for i from 1 to nops(T)-1 do
%p R:= R union {T[i]};
%p if member(T[i+1],R) then return S[i+1] fi;
%p od;
%p FAIL
%p end proc:
%p Res:= NULL:
%p for n from 1 do
%p v:= f(n);
%p if v = FAIL then break fi;
%p Res:= Res, v
%p od:
%p Res; # _Robert Israel_, Sep 09 2020
%t (See the program at A205153.)
%Y Cf. A024675, A205153, A204892.
%K nonn
%O 1,1
%A _Clark Kimberling_, Jan 26 2012
|