OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n-th element of {x: there exists some k with 0<k<x and sigma_2(m)=sigma_2(n)}, where A001157=sigma_2 is the sum of squares of divisors.
EXAMPLE
This sequence contains 35, because sigma_2(35) = 1^2+5^2+7^2+35^2 = 1+25+49+1225 = 1300, and the sum of the squares of the divisors of 30<35 is sigma_2(30) = 1+4+9+25+36+100+225+900 = 1300.
MAPLE
N:= 100: # to get a(1)..a(N)
count:= 0: Res:= NULL:
for n from 1 while count < N do
v:= numtheory:-sigma[2](n);
if assigned(V[v]) then count:= count+1; Res:= Res, n;
else V[v]:= n
fi
od:
Res; # Robert Israel, Mar 30 2018
MATHEMATICA
Clear[tmp]; First@Transpose[ Function[n, (If[Head[ #1] === tmp, #1 = n; Unevaluated[Sequence[]], {n, #1}] & )[tmp[DivisorSigma[2, n]]]] /@ Range[500]]
Module[{nn=800, ds2, c}, ds2=DivisorSigma[2, Range[nn]]; Table[c=TakeDrop[Take[ds2, n], -1]; If[ MemberQ[c[[2]], c[[1, 1]]], n, Nothing], {n, nn}]] (* Harvey P. Dale, May 22 2024 *)
PROG
(PARI) isok(n) = {sn = sigma(n, 2); for (k=1, n-1, if (sigma(k, 2) == sn, return (1)); ); } \\ Michel Marcus, Apr 03 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Peter Pein (petsie(AT)dordos.net), Jul 26 2007
EXTENSIONS
a(37)-a(54) from Michel Marcus, Apr 03 2015
Edited by Danny Rorabaugh, Apr 03 2015
STATUS
approved