cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A082123 Smallest difference > 1 between d and p/d for any divisor d of the partial product p of the sequence, starting with 17.

This page as a plain text file.
%I A082123 #14 May 21 2015 10:38:26
%S A082123 17,16,26,36,76,94,432,37220,996768,158267352,973348166592,
%T A082123 8429202561226344,419324164827901536306744,
%U A082123 339991740461303603766175692597227316,12025891484499365294341150949542442100059557280661504
%N A082123 Smallest difference > 1 between d and p/d for any divisor d of the partial product p of the sequence, starting with 17.
%p A082123 branch:= proc(m,dm, bestyet)
%p A082123     local t,x, nby,r;
%p A082123     nby:= bestyet;
%p A082123     for t from F[m][2] by -1 to 0 do
%p A082123       x:= dm*F[m][1]^t;
%p A082123       if x >= nby then next
%p A082123       elif x >= c then nby:= x
%p A082123       elif (x*R[m] < c) or (m=nF) then break
%p A082123       else nby:= branch(m+1,x,nby);
%p A082123       fi
%p A082123     od;
%p A082123     nby
%p A082123 end proc:
%p A082123 P:= 17: A[1]:= 17:
%p A082123 for n from 2 to 15 do
%p A082123   c:= ceil(1/2+1/2*sqrt(5+4*P));
%p A082123   while not type(c,integer) do Digits:= 2*Digits; c:= eval(c) od:
%p A082123   F:= ifactors(P)[2]; nF:= nops(F);
%p A082123   F:= sort(F,(s,t)->s[1]>t[1]);
%p A082123   R:= [seq(mul(F[i][1]^F[i][2],i=j+1..nF),j=1..nF)];
%p A082123   d:= branch(1,1,P);
%p A082123   A[n]:= d - P/d;
%p A082123   P:= P*A[n]
%p A082123 od:
%p A082123 seq(A[n],n=1..15); # _Robert Israel_, May 20 2015
%o A082123 (PARI) p=17; print1(p,","); for(n=1,13,r=floor(sqrt(p)); d1=1; d2=1; nE=omega(p); P=factor(p); E=P[,2]; P=P[,1]; forvec(v=vector(nE,i,[0,E[i]]),x=prod(k=1,nE,P[k]^v[k]); if(x<=r && x>=d2,d1=d2; d2=x,if(x<=d2 && x>=d1,d1=x))); difer=p/d2-d2; if(difer<=1,difer=p/d1-d1); print1(difer","); p*=difer)
%Y A082123 Cf. A082120, A003681 (starts with 2, 3), A082124.
%K A082123 nonn,hard,more
%O A082123 1,1
%A A082123 _Ralf Stephan_, Apr 04 2003
%E A082123 a(12) from Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 02 2006
%E A082123 a(13) from Herman Jamke (hermanjamke(AT)fastmail.fm), Nov 14 2006
%E A082123 a(14) and a(15) from _Robert Israel_, May 20 2015