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.

A023890 Sum of the nonprime divisors of n.

This page as a plain text file.
%I A023890 #53 Jun 20 2022 04:21:42
%S A023890 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,
%T A023890 47,1,62,1,61,34,35,36,86,1,39,40,83,1,84,1,71,70,47,1,119,50,86,52,
%U A023890 83,1,115,56,111,58,59,1,158,1,63,94,125,66,128,1,107,70,130,1,190,1,75
%N A023890 Sum of the nonprime divisors of n.
%C A023890 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
%H A023890 Indranil Ghosh, <a href="/A023890/b023890.txt">Table of n, a(n) for n = 1..20000</a> (terms 1..1000 from T. D. Noe)
%H A023890 Yash Puri and Thomas Ward, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/WARD/short.html">Arithmetic and growth of periodic orbits</a>, J. Integer Seqs., Vol. 4 (2001), Article 01.2.1.
%F A023890 Equals A051731 * A037282. - _Gary W. Adamson_, Nov 06 2007
%F A023890 a(n) = A023891(n) + 1 (sum of composite divisors of n + 1). [_Alonso del Arte_, Oct 01 2008]
%F A023890 a(n) = A000203(n) - A008472(n). - _R. J. Mathar_, Aug 14 2011
%F A023890 a(n) = Sum (a027750(n,k)*(1-A010051(a027750(n,k))): k=1..A000005(n)). - _Reinhard Zumkeller_, Apr 12 2014
%F A023890 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
%F A023890 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
%e A023890 a(8) = 13 because the divisors of 8 are 1, 2, 4, 8, and without the 2 they add up to 13.
%e A023890 a(9) = 10 because the divisors of 9 are 1, 3, 9, and without the 3 they add up to 10.
%t A023890 Array[ Plus @@ (Select[ Divisors[ # ], (!PrimeQ[ # ])& ])&, 75 ]
%t A023890 Table[DivisorSum[n, # &, Not[PrimeQ[#]] &], {n, 75}] (* _Alonso del Arte_, Mar 16 2013 *)
%t A023890 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 *)
%t A023890 a[n_] := DivisorSigma[1, n] - Plus @@ FactorInteger[n][[;; , 1]]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Jun 20 2022 *)
%o A023890 (PARI) a(n)=if(n<1, 0, sumdiv(n,d, !isprime(d)*d)) /* _Michael Somos_, Jun 08 2005 */
%o A023890 (Haskell)
%o A023890 a023890 n = sum $ zipWith (*) divs $ map ((1 -) . a010051) divs
%o A023890             where divs = a027750_row n
%o A023890 -- _Reinhard Zumkeller_, Apr 12 2014
%o A023890 (Python)
%o A023890 from sympy import isprime
%o A023890 def A023890(n):
%o A023890     s=0
%o A023890     for i in range(1,n+1):
%o A023890         if n%i==0 and not isprime(i):
%o A023890             s+=i
%o A023890     return s # _Indranil Ghosh_, Jan 30 2017
%Y A023890 Cf. A000203, A001222, A010051, A023891, A027750, A051731, A037282.
%K A023890 nonn,nice,easy
%O A023890 1,4
%A A023890 _Olivier Gérard_