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.

A048050 Chowla's function: sum of divisors of n except for 1 and n.

Original entry on oeis.org

0, 0, 0, 2, 0, 5, 0, 6, 3, 7, 0, 15, 0, 9, 8, 14, 0, 20, 0, 21, 10, 13, 0, 35, 5, 15, 12, 27, 0, 41, 0, 30, 14, 19, 12, 54, 0, 21, 16, 49, 0, 53, 0, 39, 32, 25, 0, 75, 7, 42, 20, 45, 0, 65, 16, 63, 22, 31, 0, 107, 0, 33, 40, 62, 18, 77, 0, 57, 26, 73, 0, 122, 0, 39, 48, 63, 18, 89
Offset: 1

Views

Author

Keywords

Comments

a(n) = 0 if and only if n is a noncomposite number (cf. A008578). - Omar E. Pol, Jul 31 2012
If n is semiprime, a(n) = A008472(n). - Wesley Ivan Hurt, Aug 22 2013
If n = p*q where p and q are distinct primes then a(n) = p+q.
If k,m > 1 are coprime, then a(k*m) = a(k)*a(m) + (m+1)*a(k) + (k+1)*a(m) + k + m. - Robert Israel, Apr 28 2015
a(n) is also the total number of parts in the partitions of n into equal parts that contain neither 1 nor n as a part (see example). More generally, a(n) is the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts that contain neither k nor k*n as a part. - Omar E. Pol, Nov 24 2019
Named after the Indian-American mathematician Sarvadaman D. S. Chowla (1907-1995). - Amiram Eldar, Mar 09 2024

Examples

			For n = 20 the divisors of 20 are 1,2,4,5,10,20, so a(20) = 2+4+5+10 = 21.
On the other hand, the partitions of 20 into equal parts that contain neither 1 nor 20 as a part are [10,10], [5,5,5,5], [4,4,4,4,4], [2,2,2,2,2,2,2,2,2,2]. There are 21 parts, so a(20) = 21. - _Omar E. Pol_, Nov 24 2019
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 92.

Crossrefs

Programs

  • Haskell
    a048050 1 = 0
    a048050 n = (subtract 1) $ sum $ a027751_row n
    -- Reinhard Zumkeller, Feb 09 2013
    
  • Magma
    A048050:=func< n | n eq 1 or IsPrime(n) select 0 else &+[ a: a in Divisors(n) | a ne 1 and a ne n ] >; [ A048050(n): n in [1..100] ]; // Klaus Brockhaus, Mar 04 2011
    
  • Maple
    A048050 := proc(n) if n > 1 then numtheory[sigma](n)-1-n ; else 0; end if; end proc:
  • Mathematica
    f[n_]:=Plus@@Divisors[n]-n-1; Table[f[n],{n,100}] (*Vladimir Joseph Stephan Orlovsky, Sep 13 2009*)
    Join[{0},DivisorSigma[1,#]-#-1&/@Range[2,80]] (* Harvey P. Dale, Feb 25 2015 *)
  • PARI
    a(n)=if(n>1,sigma(n)-n-1,0) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import divisors
    def a(n): return sum(divisors(n)[1:-1]) # Indranil Ghosh, Apr 26 2017
    
  • Python
    from sympy import divisor_sigma
    def A048050(n): return 0 if n == 1 else divisor_sigma(n)-n-1 # Chai Wah Wu, Apr 18 2021

Formula

a(n) = A000203(n) - A065475(n).
a(n) = A001065(n) - 1, n > 1.
For n > 1: a(n) = Sum_{k=2..A000005(n)-1} A027750(n,k). - Reinhard Zumkeller, Feb 09 2013
a(n) = A000203(n) - n - 1, n > 1. - Wesley Ivan Hurt, Aug 22 2013
G.f.: Sum_{k>=2} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017

A007956 Product of the proper divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 8, 3, 10, 1, 144, 1, 14, 15, 64, 1, 324, 1, 400, 21, 22, 1, 13824, 5, 26, 27, 784, 1, 27000, 1, 1024, 33, 34, 35, 279936, 1, 38, 39, 64000, 1, 74088, 1, 1936, 2025, 46, 1, 5308416, 7, 2500, 51, 2704, 1, 157464, 55, 175616, 57, 58, 1, 777600000, 1, 62, 3969, 32768, 65
Offset: 1

Views

Author

R. Muller

Keywords

Comments

From Bernard Schott, Feb 01 2019: (Start)
a(n) = 1 iff n = 1 or n is prime.
a(n) = n when n > 1 iff n has exactly four divisors, equally, iff n is either the cube of a prime or the product of two different primes, so iff n belongs to A030513 (very nice proof in Sierpiński).
a(p^3) = 1 * p * p^2 = p^3; a(p*q) = 1 * p * q = p*q.
As a(1) = 1, {1} Union A030513 = A007422, fixed points of this sequence. (End)

Examples

			a(18) = 1 * 2 * 3 * 6 * 9 = 324. - _Bernard Schott_, Jan 31 2019
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 1, p. 57.
  • Wacław Sierpiński, Elementary Theory of Numbers, Ex. 2 p. 174, Warsaw, 1964.

Crossrefs

Cf. A007422 (fixed points). A030513 (subsequence).
Cf. A001065 (sums of proper divisors).

Programs

  • Haskell
    a007956 = product . a027751_row
    -- Reinhard Zumkeller, Feb 04 2013, Nov 02 2011
    
  • Maple
    A007956 := n -> mul(i,i=op(numtheory[divisors](n) minus {1,n}));
    seq(A007956(i), i=1..79); # Peter Luschny, Mar 22 2011
  • Mathematica
    Table[Times@@Most[Divisors[n]], {n, 65}] (* Alonso del Arte, Apr 18 2011 *)
    a[n_] := n^(DivisorSigma[0, n]/2 - 1); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Oct 07 2013 *)
  • PARI
    A007956(n) = local(a);a=1;fordiv(n,d,a=a*d);a/n \\ Michael B. Porter, Dec 01 2009
    
  • PARI
    a(n)=my(k); if(issquare(n, &k), k^(numdiv(n)-2), n^(numdiv(n)/2-1)) \\ Charles R Greathouse IV, Oct 15 2015
    
  • Python
    from math import isqrt
    from sympy import divisor_count
    def A007956(n): return isqrt(n)**(d-2) if (d:=divisor_count(n))&1 else n**((d>>1)-1) # Chai Wah Wu, Jun 18 2023

Formula

a(n) = A007955(n)/n = n^(A000005(n)/2-1) = sqrt(n^(number of factors of n other than 1 and n)).
a(n) = Product_{k=1..A000005(n)-1} A027751(n,k). - Reinhard Zumkeller, Feb 04 2013
a(n) = A240694(n, A000005(n)-1) for n > 1. - Reinhard Zumkeller, Apr 10 2014
Sum_{k=1..n} 1/a(k) ~ pi(n) + log(log(n))^2 + c_1*log(log(n)) + c_2 + O(log(log(n))/log(n)), where pi(n) = A000720(n) and c_1 and c_2 are constants (Weiyi, 2004; Sandor and Crstici, 2004). - Amiram Eldar, Oct 29 2022

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A048671 a(n) is the least common multiple of the proper divisors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 4, 3, 10, 1, 12, 1, 14, 15, 8, 1, 18, 1, 20, 21, 22, 1, 24, 5, 26, 9, 28, 1, 30, 1, 16, 33, 34, 35, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 7, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60, 1, 62, 63, 32, 65, 66, 1, 68, 69, 70, 1, 72, 1, 74, 75, 76, 77, 78, 1
Offset: 1

Views

Author

Keywords

Comments

A proper divisor d of n is a divisor of n such that 1 <= d < n.
Previous name was: a(n) = q(n)/q(n-1), where q(n) = n!/A003418(n).

Examples

			8!/lcm(8) = 48 = 40320/840 while 7!/lcm(7) = 5040/420 = 12 so a(8) = 48/12 = 4.
a(5) = 1 = lcm(1,2,3,4,5)/lcm(1,5,10,10,5,1).
		

Crossrefs

Cf. A182936 gives the dual (greatest common divisor).

Programs

Formula

a(n) = A025527(n)/A025527(n-1).
a(n) = (n*A003418(n-1))/A003418(n).
a(n) = A003418(n-1)/A002944(n). [corrected by Michel Marcus, May 18 2020]
From Henry Bottomley, May 19 2000: (Start)
a(n) = n/A014963(n) = lcm(A052126(n), A032742(n)).
a(n) = n if n not a prime power, a(n) = n/p if n = p^m (i.e., a(n) = 1 if n = p). (End)
From Vladeta Jovovic, Jul 04 2002: (Start)
a(n) = n*Product_{d | n} d^mu(d).
Product_{d | n} a(d) = A007956(n). (End)
a(n) = Product_{k=1..n-1} if(gcd(n, k) > 1, 1 - exp(2*pi*i*k/n), 1), where i = sqrt(-1). - Paul Barry, Apr 15 2005
From Peter Luschny, Jun 09 2011: (Start)
a(n) = Product_{k=1..n-1} if(gcd(k,n) > 1, 2*Pi/Gamma(k/n)^2, 1).
a(n) = Product_{k=1..n-1} if(gcd(k,n) > 1, 2*sin(Pi*k/n), 1). (End)

Extensions

New definition based on a comment of David Wasserman by Peter Luschny, Mar 23 2011

A380117 a(n) = n - A380118(n).

Original entry on oeis.org

0, 1, 2, 1, 2, 2, 3, 2, 0, 0, 1, 1, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 4, 4, 0, 0, -2, -2, -1, -1, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3
Offset: 1

Views

Author

Peter Luschny, Jan 30 2025

Keywords

Comments

Conjecture: The sign of the terms changes infinitely often.

Crossrefs

Programs

  • Maple
    ExpLambda := n -> n / ilcm(op(numtheory[divisors](n) minus {1, n})):
    A380118 := proc(n) option remember; ifelse(n = 1, 1,
    A380118(n-1) + ExpLambda(n) - ifelse(isprime(n), n, 0)) end:
    a := n -> n - A380118(n): seq(a(n), n = 1..79);

A380118 a(n) = Sum_{k=1..n} (A014963(k) - A061397(k)).

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 4, 6, 9, 10, 10, 11, 11, 12, 13, 15, 15, 16, 16, 17, 18, 19, 19, 20, 25, 26, 29, 30, 30, 31, 31, 33, 34, 35, 36, 37, 37, 38, 39, 40, 40, 41, 41, 42, 43, 44, 44, 45, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 60, 61, 61, 62, 63, 65, 66, 67, 67, 68, 69, 70
Offset: 1

Views

Author

Peter Luschny, Jan 30 2025

Keywords

Crossrefs

Programs

  • Maple
    pSum := L -> ListTools:-PartialSums(L): h := n -> n/A048671(n) - n*A010051(n):
    aList := upto -> pSum([seq(h(k), k = 1..upto)]): aList(70);
  • Mathematica
    Accumulate[Table[Exp[MangoldtLambda[n]] - If[PrimeQ[n], n, 0] , {n, 1, 70}]]

Formula

a(n) = A072107(n) - A034387(n). - Amiram Eldar, Jan 30 2025
Showing 1-5 of 5 results.