OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harry J. Smith)
EXAMPLE
3 is a term since usigma(3) = 4 and (4-1, 4+1) = (3, 5) are twin primes.
MATHEMATICA
f[n_] := Block[ {a = FactorInteger[n], k = l = s = 1}, l = Length[a]; While[k <= l, s = s * (a[[k, 1]]^a[[k, 2]] + 1); k++ ]; Return[s]]; Select[ Range[250], PrimeQ[ f[ # ] + 1] && PrimeQ[ f[ # ] - 1] & ]
PROG
(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); if (isprime(u - 1) && isprime(u + 1), write("b065873.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Nov 02 2009
(Magma) usigma:=func<n|&+[d:d in Divisors(n)| Gcd(d, n div d) eq 1]>; [k:k in [1..230]| IsPrime(a) and (NextPrime(a)-2 eq a) where a is usigma(k)-1]; // Marius A. Burtea, Jan 16 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Dec 07 2001
STATUS
approved