login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118372 S-perfect numbers. 6
6, 24, 28, 96, 126, 224, 384, 496, 1536, 1792, 6144, 8128, 14336, 15872, 24576, 98304, 114688, 393216, 507904, 917504, 1040384, 1572864, 5540590, 6291456, 7340032, 9078520, 16252928, 22528935, 25165824, 33550336, 56918394, 58720256 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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

Subsequence of A083207. [From Reinhard Zumkeller, Oct 28 2010]

LINKS

Table of n, a(n) for n=1..32.

Jean-Marie De Koninck and Aleksandar Ivic, On a sum of divisors problem.

FORMULA

S={1}. Assume n>1 and that all numbers m<n have already been tested. Let s=sum{d: d|n, d<n and d in S}. If s<=n, then n is now in S. The paper linked to above has some characterization results. - Walter Kehowski, May 20 2006

I take the preceding comment to mean: S_0 = {1}. s_n = sum{ d: d | n & d < n & d in S_{n-1} }. 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.

EXAMPLE

2 is in S since s=sum{d: d|n, d<n and d in S} = sum{1} = 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

MAPLE

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

MATHEMATICA

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 (* From Jean-François Alcover, Dec 06 2011, after Walter Kehowski *)

PROG

(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

(Haskell)

a118372_list = sPerfect 1 [] where

   sPerfect x ss | v > x = sPerfect (x + 1) ss

                 | v < x = sPerfect (x + 1) (x : ss)

                 | otherwise = x : sPerfect (x + 1) (x : ss)

                 where v = sum (filter ((== 0) . mod x) ss)

-- Reinhard Zumkeller, Feb 25 2012, Oct 28 2010

CROSSREFS

Cf. A000396, A181487.

Sequence in context: A072710 A069235 A175200 * A219362 A216793 A064510

Adjacent sequences:  A118369 A118370 A118371 * A118373 A118374 A118375

KEYWORD

nonn,changed

AUTHOR

Vladeta Jovovic, May 15 2006

EXTENSIONS

More terms from R. J. Mathar, May 17 2006, a(18) and a(19) Oct 28 2010

Two more terms added and C-program reduced by R. J. Mathar, Oct 28 2010

More terms from William Rex Marshall, Oct 28 2010

Haskell program improved by Reinhard Zumkeller, Nov 02 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 21 05:14 EDT 2013. Contains 225474 sequences.