OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1849 from Robert Israel)
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
EXAMPLE
We have sigma(68) = sigma(82) = 126, and gcd(68, 82) = 2, hence 126 is in the sequence.
On the other hand, for x in [20, 26, 41], sigma(x) = 42, and gcd(20, 26, 41) = 1, hence 42 is not here, although gcd(20, 26) is 2.
MAPLE
N:= 10^5: # for terms <= N
V:= Vector(N):
for x from 1 to N do
s:= numtheory:-sigma(x);
if s <= N then
if V[s] = 0 then V[s]:= x
else V[s]:= igcd(V[s], x)
fi
fi
od: select(t -> V[t]=2, [$1..N]); # Robert Israel, Aug 18 2019
PROG
(PARI) is(k) = gcd(invsigma(k)) == 2; \\ Amiram Eldar, Dec 19 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 26 2014
STATUS
approved