sq=Table[j,{j,1000000}]
sq11=Table[j,{j,1,2000}]
x=Select[sq,IntegerQ,(1005)]
n=Select[sq,PrimeQ,(1005)]
a=n-(Mod[n,x])
b=n-a
c=a+b
d=Mod[x,n]
h=Differences[a]
j={1}
hh=Prepend[h,j]
Count[h, 5]
f = Table[{ n[[i - 1]]},{i,1,Length[n]}]
f1 = Table[{ n[[i - 2]]},{i,1,Length[n]}]
f2 = Table[{ n[[i - 3]]},{i,1,Length[n]}]
h = Table[{ x[[i - 1]]},{i,1,Length[x]}]
h1 = Table[{ x[[i - 2]]},{i,1,Length[x]}]
h2 = Table[{ x[[i - 3]]},{i,1,Length[x]}]
k=Mod[f,h1]
k1=Mod[f1,h2]
kk=Mod[f,h]
ee=hh*x
e=((hh*x)+d)-f
k-k1
l=(ee+kk)-f
m=l+(f1-f)
fg = Table[{ m[[i - 1]]},{i,1,Length[n]}]
fg1 = Table[{ m[[i - 2]]},{i,1,Length[n]}]
fg2 = Table[{ m[[i - 3]]},{i,1,Length[n]}]
n=-l-((fg-fg1)*2)-((k1-k)*2)+2
n1=-l-((fg-fg1)*2)+((k1-k)*2)+2
p=(n-n1)/4
o=b+a
q=f[[-2]]
r=p[[-1]]
b1=kk[[-2]]
s=b1+r
s1=ee[[-2]]
t=s+s1
In the above program how can i get the value of t to append to f1 and use it from f,f1,f2 and after to get to a new value of t every time i loop ....?