reserve a,b,k,m,n,s for Nat;
reserve c,c1,c2,c3 for Complex;
reserve i,j,z for Integer;
reserve p for Prime;
reserve x for object;

theorem Th46:
  for k, s being non zero Nat holds
  k <= s implies primenumber(k-1) divides sequenceA(s).k + 1
  proof
    let k, s be non zero Nat;
    set f = sequenceA(s);
    set p = primenumber(k-1);
    set g = PrimeNumbersFS(s);
    assume
A1: k <= s;
    k-1 < k-0 by XREAL_1:8;
    then k-1 < s by A1,XXREAL_0:2;
    then reconsider e = Product g / p as Nat by Th45;
    set x = CRT(0,e,-1,p);
A2: 0+1 <= k by NAT_1:13;
    len g = s by Th42;
    then
A3: k in dom g by A1,A2,FINSEQ_3:25;
A4: 1 * (Product g / p) * p = Product g by XCMPLX_1:87;
    g.k = p by A1,Th44;
    then p,e are_coprime by A3,INT_6:25;
    then x solves_CRT 0,e,-1,p by NUMBER14:def 2;
    then x + 1*Product g solves_CRT 0,e,-1,p by A4,NUMBER14:26;
    then x+Product g,-1 are_congruent_mod p;
    hence thesis by A1,Def5;
  end;
