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 A118372 #62 Jun 01 2024 02:53:02 %S A118372 6,24,28,96,126,224,384,496,1536,1792,6144,8128,14336,15872,24576, %T A118372 98304,114688,393216,507904,917504,1040384,1572864,5540590,6291456, %U A118372 7340032,9078520,16252928,22528935,25165824,33550336,56918394,58720256,100663296,133169152 %N A118372 S-perfect numbers. %C A118372 In base 12 the sequence becomes 6, 20, 24, 80, X6, 168, 280, 354, X80, 1054, 3680, 4854, 8368, 9228, 12280, 48X80, 56454, where X is 10 and E is 11. The perfect numbers (A000396) in this sequence in base 12 are 6, 24, 354, 4854. - _Walter Kehowski_, May 20 2006 %C A118372 Subsequence of A083207. - _Reinhard Zumkeller_, Oct 28 2010 %C A118372 Conjecture: If k is an S-perfect number, then A000203(k)/2 is a Zumkeller number (A083207). - _Ivan N. Ianakiev_, Apr 23 2017 %C A118372 Called "Granville numbers" by De Koninck (2009), after Andrew Granville, who proposed the problem of calculating these numbers in December 1996. - _Amiram Eldar_, Aug 11 2023 %D A118372 Jean-Marie De Koninck, Those Fascinating Numbers, American Mathematical Society, 2009. %H A118372 Donovan Johnson, <a href="/A118372/b118372.txt">Table of n, a(n) for n = 1..40</a> (terms < 4*10^9) %H A118372 Jean-Marie De Koninck and Aleksandar Ivić, <a href="http://www.emis.de/journals/PIMB/078/2.html">On a sum of divisors problem</a>, Publications de l'Institut Mathématique (Beograd), New Series, Vol. 64 (78) (1998), pp. 9-20. %H A118372 Gérard Villemin, <a href="http://villemin.gerard.free.fr/aNombre/TYPDIVIS/ParfaitS.htm">Nombres S-PARFAITS ou Nombres de Granville</a>, NOMBRES - Curiosités, théorie et usages, 2019 (in French). %H A118372 Wikipedia, <a href="https://en.wikipedia.org/wiki/Granville_number">Granville number</a>. %F A118372 S = {1}. Assume n>1 and that all numbers m<n have already been tested. Let s = Sum_{d|n, d<n and d in S} d. If s<=n, then n is now in S. The paper linked to above has some characterization results. - _Walter Kehowski_, May 20 2006 %F A118372 I take the preceding comment to mean: S_0 = {1}. s_n = Sum_{d|n, d<n and d in S_{n-1}} d. Then S_n := S_{n-1} if s_n > n, and S_{n-1} U {n} if s_n <= n. - _Hugo van der Sanden_, Oct 28 2010 %e A118372 2 is in S since s = Sum_{d|2, d<2 and d in S} d = 1 and 1 <= 2. Similarly, 3, 4, 5, 6 are in S with 6 as the first element such that s = n, that is, 6 is the first S-perfect number. - _Walter Kehowski_, May 20 2006 %p A118372 with(numtheory); S:={1}: SP:=[]: for w to 1 do for n from 1 to 2*10^5 do d:=select(proc(z) z in S and z<n end,divisors(n)); s:=convert(d,`+`); if s<=n then S:=S union {n} fi; if s=n then SP:=[op(SP),n]; print(n); fi; od; od; SP; # _Walter Kehowski_, May 20 2006 %t A118372 S = {1}; SP = {}; Do[ s = Total[ Intersection[S , Divisors[n]]]; If[s <= n, S = Union[S, {n}]]; If[s == n, Print[n]; AppendTo[SP, n]] , {n, 2, 2*10^5} ]; SP (* _Jean-François Alcover_, Dec 06 2011, after _Walter Kehowski_ *) %o A118372 (C) #include <stdlib.h> #include <stdio.h> #define MAX_SIZE_SSET 1000000 int main(int argc, char*argv[]) { int Sset[MAX_SIZE_SSET] ; int Ssetsize= 1; Sset[0]=1 ; for(int n=2; n < MAX_SIZE_SSET; n++) { int dsum=0 ; for(int i=0; i< Ssetsize; i++) { if( n % Sset[i] ==0 && Sset[i] < n) dsum += Sset[i] ; if (dsum > n || Sset[i] >=n) break ; } if( dsum <= n) { if(dsum==n) printf("%d\n",n) ; Sset[Ssetsize++ ]= n ; } } } /* _R. J. Mathar_, Oct 28 2010 */ %o A118372 (Haskell) %o A118372 a118372_list = sPerfect 1 [] where %o A118372 sPerfect x ss | v > x = sPerfect (x + 1) ss %o A118372 | v < x = sPerfect (x + 1) (x : ss) %o A118372 | otherwise = x : sPerfect (x + 1) (x : ss) %o A118372 where v = sum (filter ((== 0) . mod x) ss) %o A118372 -- _Reinhard Zumkeller_, Oct 28 2010, Nov 02 2010, Feb 25 2012 %o A118372 (Sage) %o A118372 def S_perfect_list(search_limit): %o A118372 S = []; T = [] %o A118372 for n in (1..search_limit): %o A118372 d = [t for t in divisors(n) if t in S and t < n] %o A118372 s = sum(d) %o A118372 if s <= n: S.append(n) %o A118372 if s == n: T.append(n) %o A118372 return T %o A118372 S_perfect_list(25555) # after _Walter Kehowski_, _Peter Luschny_, Sep 03 2018 %Y A118372 Subsequence of A023196 and A083207. %Y A118372 A000396 is a subsequence. %Y A118372 Cf. A000203, A181487. %K A118372 nonn %O A118372 1,1 %A A118372 _Vladeta Jovovic_, May 15 2006 %E A118372 More terms from _R. J. Mathar_, May 17 2006, a(18) and a(19) Oct 28 2010 %E A118372 Two more terms added and C-program reduced by _R. J. Mathar_, Oct 28 2010 %E A118372 More terms from _William Rex Marshall_, Oct 28 2010