This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A382929 #57 Apr 11 2025 16:25:03 %S A382929 4,1,21,17,17,10,13,5,6,0,5,456,1,458,457,449,461,439,457,434,443,438, %T A382929 449,412,440,428,429,412,437,394,433,401,415,408,413,369,421,398,401, %U A382929 366,413,358,409,368,373,378,401,324,390,353,373,346,389,322,369,320,359,348,377,268 %N A382929 Smallest number k such that k + n + sigma(n) is a perfect number. %H A382929 David A. Corneth, <a href="/A382929/b382929.txt">Table of n, a(n) for n = 1..10000</a> (first 2500 terms from Michel Marcus) %e A382929 a(10) = 0, because 10 + sigma(10) = 28, which is perfect. %e A382929 a(12) = 456, because 456 + 12 + sigma(12) = 496, which is perfect. %e A382929 As 496 is the smallest perfect number at least as large as sigma(60) + 60 = 168 + 60 = 228 we have a(60) = 496 - 228 = 268. - _David A. Corneth_, Apr 10 2025 %t A382929 Do[k=0;s=DivisorSigma[1,n];While[DivisorSigma[1,s+n+k]!=2*(s+n+k),k++];a[n]=k,{n,60}];Array[a,60] (* _James C. McMahon_, Apr 10 2025 *) %o A382929 (PARI) a(n) = my(k=0); while (sigma(k+n+sigma(n)) != 2*(k+n+sigma(n)), k++); k; \\ _Michel Marcus_, Apr 09 2025 %o A382929 (PARI) a(n) = {my(s = sigma(n) + n); %o A382929 forprime(p = 2, oo, %o A382929 my(c = 2^p-1); %o A382929 if(isprime(c) && binomial(c+1, 2) >= s, %o A382929 return(binomial(c+1, 2) - s))) %o A382929 } \\ _David A. Corneth_, Apr 10 2025 %o A382929 (PARI) a(n) = my(v = [6, 28, 496, 8128, 33550336, 8589869056], x=n+sigma(n), k=0); for (i=1, #v-1, if ((x > v[i]) && (x <= v[i+1]), k = i; break)); v[k+1] - x; \\ _Michel Marcus_, Apr 11 2025 %Y A382929 Cf. A000396, A155085, A382506. %K A382929 nonn %O A382929 1,1 %A A382929 _Leo Hennig_, Apr 09 2025