cp's OEIS Frontend

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.

Showing 1-5 of 5 results.

A023890 Sum of the nonprime divisors of n.

Original entry on oeis.org

1, 1, 1, 5, 1, 7, 1, 13, 10, 11, 1, 23, 1, 15, 16, 29, 1, 34, 1, 35, 22, 23, 1, 55, 26, 27, 37, 47, 1, 62, 1, 61, 34, 35, 36, 86, 1, 39, 40, 83, 1, 84, 1, 71, 70, 47, 1, 119, 50, 86, 52, 83, 1, 115, 56, 111, 58, 59, 1, 158, 1, 63, 94, 125, 66, 128, 1, 107, 70, 130, 1, 190, 1, 75
Offset: 1

Views

Author

Keywords

Comments

Obviously a(n) < sigma(n) for all n > 1, where sigma(n) is the sum of divisors function (A000203). It thus follows that a(n) = 1 when n = 1 or n is prime. - Alonso del Arte, Mar 16 2013

Examples

			a(8) = 13 because the divisors of 8 are 1, 2, 4, 8, and without the 2 they add up to 13.
a(9) = 10 because the divisors of 9 are 1, 3, 9, and without the 3 they add up to 10.
		

Crossrefs

Programs

  • Haskell
    a023890 n = sum $ zipWith (*) divs $ map ((1 -) . a010051) divs
                where divs = a027750_row n
    -- Reinhard Zumkeller, Apr 12 2014
    
  • Mathematica
    Array[ Plus @@ (Select[ Divisors[ # ], (!PrimeQ[ # ])& ])&, 75 ]
    Table[DivisorSum[n, # &, Not[PrimeQ[#]] &], {n, 75}] (* Alonso del Arte, Mar 16 2013 *)
    Table[CoefficientList[Series[Log[Product[(1 - x^Prime[k])/(1 - x^k), {k, 1, 100}]], {x, 0, 100}], x][[n + 1]] n, {n, 1, 100}] (* Benedict W. J. Irwin, Jul 05 2016 *)
    a[n_] := DivisorSigma[1, n] - Plus @@ FactorInteger[n][[;; , 1]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Jun 20 2022 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, !isprime(d)*d)) /* Michael Somos, Jun 08 2005 */
    
  • Python
    from sympy import isprime
    def A023890(n):
        s=0
        for i in range(1,n+1):
            if n%i==0 and not isprime(i):
                s+=i
        return s # Indranil Ghosh, Jan 30 2017

Formula

Equals A051731 * A037282. - Gary W. Adamson, Nov 06 2007
a(n) = A023891(n) + 1 (sum of composite divisors of n + 1). [Alonso del Arte, Oct 01 2008]
a(n) = A000203(n) - A008472(n). - R. J. Mathar, Aug 14 2011
a(n) = Sum (a027750(n,k)*(1-A010051(a027750(n,k))): k=1..A000005(n)). - Reinhard Zumkeller, Apr 12 2014
L.g.f.: log(Product_{ k>0 } (1-x^prime(k))/(1-x^k)) = Sum_{ n>0 } (a(n)/n)*x^n. - Benedict W. J. Irwin, Jul 05 2016
a(n) = Sum_{d|n} d * (1 - [Omega(d) = 1]), where Omega is the number of prime factors with multiplicity (A001222) and [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jan 28 2021

A060278 Sum of composite divisors of n less than n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 12, 0, 15, 0, 14, 0, 0, 0, 30, 0, 0, 9, 18, 0, 31, 0, 28, 0, 0, 0, 49, 0, 0, 0, 42, 0, 41, 0, 26, 24, 0, 0, 70, 0, 35, 0, 30, 0, 60, 0, 54, 0, 0, 0, 97, 0, 0, 30, 60, 0, 61, 0, 38, 0, 59, 0, 117, 0, 0, 40, 42, 0, 71, 0, 98, 36, 0, 0, 127, 0, 0, 0
Offset: 1

Views

Author

Jack Brennen, Mar 28 2001

Keywords

Crossrefs

Programs

  • Haskell
    a060278 1 = 0
    a060278 n = sum $ filter ((== 0) . a010051) $ tail $ a027751_row n
    -- Reinhard Zumkeller, Apr 05 2013
    
  • Maple
    for n from 1 to 300 do s := 0: for j from 2 to n-1 do if isprime(j) then else if n mod j = 0 then s := s+j fi; fi: od: printf(`%d,`,s) od:
  • Mathematica
    Join[{0},Table[Total[Select[Most[Rest[Divisors[n]]],!PrimeQ[#]&]],{n,2,90}]] (* Harvey P. Dale, Oct 25 2011 *)
    a[n_] := DivisorSigma[1, n] - Plus @@ FactorInteger[n][[;; , 1]] - If[PrimeQ[n], 0, n] - 1; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jun 20 2022 *)
  • PARI
    a(n) = sumdiv(n, d, if ((d1) && !isprime(d), d)); \\ Michel Marcus, Jan 13 2020

Formula

From Reinhard Zumkeller, Apr 05 2013: (Start)
a(n) = Sum_{k=2..A000005(n)-1} A010051(A027751(n,k));
a(A037143(n)) = 0;
a(A033942(n)) > 0. (End)

Extensions

More terms from James Sellers and Matthew Conroy, Mar 29 2001

A035321 Sum of composite divisors of n that are not primes nor prime powers.

Original entry on oeis.org

0, 0, 0, 0, 0, 6, 0, 0, 0, 10, 0, 18, 0, 14, 15, 0, 0, 24, 0, 30, 21, 22, 0, 42, 0, 26, 0, 42, 0, 61, 0, 0, 33, 34, 35, 72, 0, 38, 39, 70, 0, 83, 0, 66, 60, 46, 0, 90, 0, 60, 51, 78, 0, 78, 55, 98, 57, 58, 0, 153, 0, 62, 84, 0, 65, 127, 0, 102, 69, 129, 0, 168, 0, 74, 90, 114, 77
Offset: 1

Views

Author

Keywords

Crossrefs

One less than A178637.

Programs

  • Maple
    pp := array(1..100); for i from 1 to 100 do pp[i] := 0; od: for i from 1 to 25 do for j from 1 to 6 do t1 := ithprime(i)^j; if t1<100 then pp[t1] := 1; fi; od: od: pp[1] := 1; A035321 := proc(n) local i,d,t1,t2; t1 := 0; for d from 1 to n do if n mod d = 0 and pp[d] = 0 then t1 := t1+d; fi; od; t1; end;
  • Mathematica
    Array[ Plus @@ (Select[ Divisors[ # ], (Length[ FactorInteger[ # ] ]>1)& ])&, 80 ]
  • PARI
    A035321(n) = sumdiv(n,d,(omega(d)>1)*(d)); \\ Antti Karttunen, Aug 06 2018

Formula

a(n) = A178637(n) - 1. - Antti Karttunen, Aug 06 2018

Extensions

Description corrected by Jack Brennen, Mar 28 2001

A035322 Sum of composite divisors of n that are less than n and are not primes nor prime powers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 10, 0, 0, 0, 18, 0, 0, 0, 14, 0, 31, 0, 0, 0, 0, 0, 36, 0, 0, 0, 30, 0, 41, 0, 22, 15, 0, 0, 42, 0, 10, 0, 26, 0, 24, 0, 42, 0, 0, 0, 93, 0, 0, 21, 0, 0, 61, 0, 34, 0, 59, 0, 96, 0, 0, 15, 38, 0, 71, 0, 70, 0, 0, 0, 123, 0, 0, 0, 66, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[ Plus @@ Select[ Divisors[ n ], (Length[ FactorInteger[ # ] ]>1 && #Harvey P. Dale, Jan 09 2019 *)

Extensions

Description corrected by Jack Brennen, Mar 28 2001

A239668 Sum of the composite divisors of n^2.

Original entry on oeis.org

0, 4, 9, 28, 25, 85, 49, 124, 117, 209, 121, 397, 169, 389, 394, 508, 289, 841, 361, 953, 730, 917, 529, 1645, 775, 1265, 1089, 1757, 841, 2810, 961, 2044, 1714, 2129, 1754, 3745, 1369, 2645, 2362, 3929, 1681, 5174, 1849, 4109, 3742, 3845, 2209, 6637, 2793, 5459, 3970
Offset: 1

Views

Author

Janet Lee, Mar 23 2014

Keywords

Examples

			For n=2, the sum of the composite factors of n^2 is equal to 4.
		

Crossrefs

Programs

  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    f:=n->numtheory[sigma](n^2)-A008472(n)-1; [seq(f(n),n=1..100)]; # N. J. A. Sloane, Mar 31 2014
  • Mathematica
    a[n_] := DivisorSum[n^2, If[# == 1 || PrimeQ[#], 0, #]& ]; Array[a, 60] (* Jean-François Alcover, Dec 18 2015 *)
    Table[Total[Select[Divisors[n^2],CompositeQ]],{n,60}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 06 2017 *)
  • PARI
    a(n) = sumdiv(n^2, d, d*(!isprime(d) && (d != 1))); \\ Michel Marcus, Mar 31 2014

Formula

a(n) = sigma(n^2) - sopf(n^2) - 1.
a(n) = A000203(n^2) - A008472(n^2) - 1. - Wesley Ivan Hurt, Mar 30 2014
a(n) = A023891(n^2). - Michel Marcus, Mar 31 2014
a(n) = n^2 if n is prime. - Zak Seidov, Mar 31 2014

Extensions

Formula corrected by Wesley Ivan Hurt, Mar 30 2014
More terms from N. J. A. Sloane, Mar 31 2014
Showing 1-5 of 5 results.