OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
FORMULA
Let S = {n>0 : there exists a k>0 and k<n with sigma(k) = sigma(n)}. Then a(n) := min(k>0: sigma(k) = sigma(n-th element of S).
EXAMPLE
a(3)=10 because 17 is the third integer for which a smaller integer with same sum of divisors exists and sigma(17)=1+17=18 and sigma(10)=1+2+5+10=18 and there is no k>0 less than 10 with sigma(k)=18.
MAPLE
N:= 1000: # to use values of sigma <= N
V:= Vector(N): A:= Vector(N):
for n from 1 to N do
v:= numtheory:-sigma(n);
if v <= N then
if V[v] = 0 then V[v]:= n
else A[n]:= V[v]
fi
fi
od:
subs(0=NULL, convert(A, list)); # Robert Israel, Mar 30 2018
MATHEMATICA
Clear[tmp]; Function[n, If[Head[ #1]===tmp, #1=n; Unevaluated[Sequence[]], #1]& [tmp[DivisorSigma[1, n]]]]/@Range[200]
PROG
(PARI) list(lim) = my(m); for(k = 1, lim, m = invsigmaMin(sigma(k)); if(m < k, print1(m, ", "))); \\ Amiram Eldar, Dec 20 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Peter Pein (petsie(AT)dordos.net), Jul 26 2007
STATUS
approved