A136446 Numbers n such that some subset of the numbers { 1 < d < n : d divides n } adds up to n.
12, 18, 24, 30, 36, 40, 42, 48, 54, 56, 60, 66, 72, 78, 80, 84, 90, 96, 100, 102, 108, 112, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 176, 180, 186, 192, 196, 198, 200, 204, 208, 210, 216, 220, 222, 224, 228, 234, 240, 246
Offset: 1
Keywords
References
- Mladen Vassilev, Two theorems concerning divisors, Bull. Number Theory Related Topics 12 (1988), pp. 10-19.
Links
- M. F. Hasler, Table of n, a(n) for n = 1..24491 (confirmed by _R. J. Mathar_, Mar 20 2011).
Programs
-
Haskell
a136446 n = a136446_list !! (n-1) a136446_list = map (+ 1) $ findIndices (> 1) a211111_list -- Reinhard Zumkeller, Apr 04 2012
-
Maple
isA136446a := proc(s,n) if n in s then return true; elif add(i,i=s) < n then return false; elif nops(s) = 1 then is(op(1,s)=n) ; else sl := sort(convert(s,list),`>`) ; for i from 1 to nops(sl) do m := op(i,sl) ; if n -m = 0 then return true; end if ; if n-m > 0 then sr := [op(i+1..nops(sl),sl)] ; if procname(convert(sr,set),n-m) then return true; end if; end if; end do; return false; end if; end proc: isA136446 := proc(n) isA136446a( numtheory[divisors](n) minus {1,n},n) ; end proc: for n from 1 to 400 do if isA136446(n) then printf("%d,",n) ; end if; end do ; # R. J. Mathar, Mar 20 2011
-
Mathematica
okQ[n_] := Module[{d}, If[PrimeQ[n], False, d = Most[Rest[Divisors[n]]]; MemberQ[Plus @@@ Subsets[d], n]]]; Select[Range[2, 246], okQ] (* T. D. Noe, Jul 24 2012 *)
-
PARI
N=72 \\ up to this value vv=vector(N); { for(n=2, N, if ( isprime(n), next() ); d=divisors(n); d=vector(#d-2,j,d[j+1]); \\ not n, not 1 for (k=1, (1<<#d)-1, \\ all subsets t=vecextract(d, k); if ( n==sum(j=1,#t,t[j]), vv[n] += 1;););); } for (j=1, #vv, if (vv[j]>0, print1(j,", "))) \\ A005835 (after correction)
-
PARI
is_A136446(n,d=divisors(n))={#d>2 && is_A005835(n,d[2..-2])} \\ Replaced old code not conforming to current PARI syntax. - M. F. Hasler, Jul 28 2016 for( n=1,10^4, is_A136446(n) && print1(n", ")) \\ M. F. Hasler, Apr 13 2008
-
Sage
def isa(s, n): # After R. J. Mathar's Maple code if n in s: return True if sum(s) < n: return False if len(s) == 1: return s[0] == n for i in srange(len(s)-1,-1,-1) : d = n - s[i] if d == 0: return True if d > 0: if isa(s[i+1:], d): return True return False isA136446 = lambda n : isa(divisors(n)[1:-1], n) [n for n in (1..246) if isA136446(n)] # Peter Luschny, Jul 23 2012
Extensions
More terms from M. F. Hasler, Apr 13 2008
Comments