OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..750 from Harry J. Smith)
MATHEMATICA
sqQ[n_] := IntegerQ[Sqrt[n]]; f1[p_, e_] := p^e + 1; f2[p_, e_] := (p^(e+1)-1)/(p-1); q[n_] := Module[{fct = FactorInteger[n], u}, If[AllTrue[fct[[;; , 2]], # == 1 &], False, u = Times @@ f1 @@@ fct; sqQ[u] && sqQ[Times @@ f2 @@@ fct - u]]]; Select[Range[10^6], q] (* Amiram Eldar, Jul 27 2024 *)
PROG
(PARI) {usigma(n, s=1, fac, i) = fac=factor(n); for(i=1, matsize(fac)[1], s=s*(1+fac[i, 1]^fac[i, 2])); return(s); } nu(n) = sigma(n)-usigma(n); for(n=1, 10^8, if(nu(n)>0 && issquare(nu(n)) && issquare(usigma(n)), print1(n, ", ")))
(PARI) usigma(n)= { local(f, s=1); f=factor(n); for(i=1, matsize(f)[1], s*=1 + f[i, 1]^f[i, 2]); return(s) }
{ n=0; for (m = 1, 10^9, u=usigma(m); nu=sigma(m) - u; if (nu>0 && issquare(nu) && issquare(u), write("b064730.txt", n++, " ", m); if (n==750, break)) ) } \\ Harry J. Smith, Sep 24 2009
(PARI) is(n) = {my(f = factor(n), u); if(issquarefree(f), 0, u = prod(k=1, #f~, f[k, 1]^f[k, 2]+1); issquare(u) && issquare(sigma(f) - u)); } \\ Amiram Eldar, Jul 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Oct 17 2001
STATUS
approved