OFFSET
1,1
COMMENTS
Old name was "Solutions to {A094471[x]=prime} that is to {x; x*tau[x]-sigma[x]=prime}."
All terms after the first are even, because A094471(n) is even if n is odd. The first term == 2 (mod 4) is a(135) = 9653618. - Robert Israel, Nov 11 2015
Except for 3, all the terms are either even squares or twice squares. - Amiram Eldar, Feb 14 2025
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..100 from Harvey P. Dale)
EXAMPLE
8 is a term since 8*tau(8) - sigma(8) = 8*4 - 15 = 32 - 15 = 17 is a prime.
MAPLE
A094471:= n -> n*numtheory:-tau(n) - numtheory:-sigma(n):
select(t -> isprime(A094471(t)), 2*[3/2, $1..10^6]); # Robert Israel, Nov 11 2015
MATHEMATICA
Do[s=n*DivisorSigma[0, n]-DivisorSigma[1, n]; If[PrimeQ[s], Print[{n, s}]; ta[[u]]=n; tb[[u]]=s; u=u+1], {n, 1, 1000000}]; ta
Select[Range[215000], PrimeQ[# DivisorSigma[0, #]-DivisorSigma[1, #]]&] (* Harvey P. Dale, Dec 07 2021 *)
q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; PrimeQ[n * Times @@ (e + 1) - Times @@ ((p^(e + 1) - 1)/(p - 1))]]; seq[lim_] := Module[{m1 = Floor[Sqrt[lim/2]], m2 = Floor[Sqrt[lim]/2]}, Join[{3}, Union[Select[2*Range[m1]^2, q], Select[4*Range[m2]^2, q]]]]; seq[220000] (* Amiram Eldar, Feb 14 2025 *)
PROG
(PARI) isok(n) = isprime(n*numdiv(n)-sigma(n)); \\ Michel Marcus, Nov 12 2015
(PARI) isok(k) = if(k % 2, k == 3, if(!issquare(k) && !issquare(2*k), 0, my(f = factor(k)); isprime(k * numdiv(f) - sigma(f)))); \\ Amiram Eldar, Feb 14 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Labos Elemer, Jul 15 2004
EXTENSIONS
Name modified by Tom Edgar, Nov 12 2015
STATUS
approved