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-4 of 4 results.

A070824 Number of divisors of n which are > 1 and < n (nontrivial divisors).

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 2, 1, 2, 0, 4, 0, 2, 2, 3, 0, 4, 0, 4, 2, 2, 0, 6, 1, 2, 2, 4, 0, 6, 0, 4, 2, 2, 2, 7, 0, 2, 2, 6, 0, 6, 0, 4, 4, 2, 0, 8, 1, 4, 2, 4, 0, 6, 2, 6, 2, 2, 0, 10, 0, 2, 4, 5, 2, 6, 0, 4, 2, 6, 0, 10, 0, 2, 4, 4, 2, 6, 0, 8, 3, 2, 0, 10, 2, 2
Offset: 1

Views

Author

Wolfdieter Lang, May 08 2002

Keywords

Comments

These are sometimes called the proper divisors, but see A032741 for the usual meaning of that term.
a(n) = number of ordered factorizations of n into two factors, n = 2, 3, ... If n has the prime factorization n=Product p^e(j), j=1..r, the number of compositions of the vector (e(1), ..., e(r)) equals the number of ordered factorizations of n. Andrews (1998, page 59) gives a formula for the number of m-compositions of (e(1), ..., e(r)) which equals the number f(n,m) of ordered m-factorizations of n. But with m=2 the formula reduces to f(n,2) = d(n)-2 = a(n). - Augustine O. Munagi, Mar 31 2005
a(n) = 0 if and only if n is 1 or prime. - Jon Perry, Nov 08 2008
For n > 2: number of zeros in n-th row of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
a(n) = number of partitions of n in which largest and least parts occur exactly once and their difference is 2. Example: a(12) = 4 because we have [7,5], [5,4,3], [4,3,3,2], and [3,2,2,2,2,1]. In general, if d is a nontrivial divisor of n, then [d+1,{d}^(n/d-2),d-1] is a partition of n of the prescribed type. - Emeric Deutsch, Nov 03 2015
Absolute values of the inverse Möbius transform of (-1)^prime(n), n >= 2. - Wesley Ivan Hurt, Jun 22 2024

Examples

			a(12) = 4 with the nontrivial divisors 2,3,4,6.
a(24) = 6 = card({{2,12},{3,8},{4,6},{6,4},{8,3},{12,2}}). - _Peter Luschny_, Nov 14 2011
		

References

  • George E. Andrews, The Theory of Partitions, Addison-Wesley, Reading 1976; reprinted, Cambridge University Press, Cambridge, 1984, 1998.

Crossrefs

First column in the matrix power A175992^2.
Row sums of A175992 starting from the second column.
Column k=2 of A251683.

Programs

  • Haskell
    a070824 n = if n == 1 then 0 else length $ tail $ a027751_row n -- Reinhard Zumkeller, Dec 03 2014
    
  • Maple
    0, seq(numtheory[tau](n)-2,n=2..100); # Augustine O. Munagi, Mar 31 2005
  • Mathematica
    Join[{0},Rest[DivisorSigma[0,Range[90]]-2]] (* Harvey P. Dale, Jun 23 2012 *)
    a[ n_] := SeriesCoefficient[ Sum[x^(2 k)/(1 - x^k), {k, 2, n/2}], {x, 0, n}]; (* Michael Somos, Jun 24 2019 *)
  • PARI
    {a(n) = if( n<1, 0, my(v = vector(n, i, i>1)); dirmul(v, v)[n])}; /* Michael Somos, Jun 24 2019 */
    
  • PARI
    apply( A070824(n)=numdiv(n+(n<2))-2, [1..90]) \\ M. F. Hasler, Oct 11 2019
    
  • Python
    from sympy import divisor_count
    def A070824(n): return 0 if n == 1 else divisor_count(n)-2 # Chai Wah Wu, Jun 03 2022

Formula

a(n) = A000005(n)-2, n>=2 (with the number-of-divisors function d(n) = A000005(n)).
a(n) = d(n)-2, for n>=2, where d(n) is the number-of-divisors function. E.g., a(12) = 4 because 12 has 4 ordered factorizations into two factors: 2*6, 6*2, 3*4, 4*3. - Augustine O. Munagi, Mar 31 2005
G.f.: Sum_{k>=2} x^(2k)/(1-x^k). - Jon Perry, Nov 08 2008
Dirichlet generating function: (zeta(s)-1)^2. - Mats Granvik May 25 2013
Sum_{k=1..n} a(k) ~ n*log(n) + (2*gamma - 3)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
a(n) = abs( Sum_{d|n} (-1)^prime(d) ), n >= 2 with a(1) = 0. - Wesley Ivan Hurt, Jun 22 2024
a(n) = Sum_{k=2..n-1} floor(n/k) - floor((n-1)/k), see Chhimpa and Yadav. - Stefano Spezia, Oct 13 2024

Extensions

a(1)=0 added by Peter Luschny, Nov 14 2011
Several minor edits by M. F. Hasler, Oct 14 2019

A211159 Number of integer pairs (x,y) such that 0

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Apr 06 2012

Keywords

Comments

For a guide to related sequences, see A211266.

Examples

			a(11) counts these pairs: (2,6), (3,4).
		

Crossrefs

Programs

  • Mathematica
    a = 1; b = n; z1 = 120;
    t[n_] := t[n] = Flatten[Table[x*y, {x, a, b - 1}, {y, x + 1, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    Table[c[n, n], {n, 1, z1}]           (* A056924 *)
    Table[c[n, n + 1], {n, 1, z1}]       (* A211159 *)
    Table[c[n, 2*n], {n, 1, z1}]         (* A211261 *)
    Table[c[n, 3*n], {n, 1, z1}]         (* A211262 *)
    Table[c[n, Floor[n/2]], {n, 1, z1}]  (* A211263 *)
    Print
    c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, a, m}]
    Table[c1[n, n], {n, 1, z1}]          (* A211264 *)
    Table[c1[n, n + 1], {n, 1, z1}]      (* A211265 *)
    Table[c1[n, 2*n], {n, 1, z1}]        (* A211266 *)
    Table[c1[n, 3*n], {n, 1, z1}]        (* A211267 *)
    Table[c1[n, Floor[n/2]], {n, 1, z1}] (* A181972 *)
  • PARI
    A211159(n) = (numdiv(1+n)-issquare(1+n)-2)/2; \\ Antti Karttunen, Jul 07 2017
    
  • Scheme
    (define (A211159 n) (/ (- (A000005 (+ 1 n)) (A010052 (+ 1 n)) 2) 2)) ;; Antti Karttunen, Jul 07 2017

Formula

a(n) = (A000005(1+n) - A010052(1+n) - 2)/2 = A200213(1+n)/2. - Antti Karttunen, Jul 07 2017

A161840 Number of noncentral divisors of n.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 0, 2, 2, 2, 0, 4, 0, 2, 2, 4, 0, 4, 0, 4, 2, 2, 0, 6, 2, 2, 2, 4, 0, 6, 0, 4, 2, 2, 2, 8, 0, 2, 2, 6, 0, 6, 0, 4, 4, 2, 0, 8, 2, 4, 2, 4, 0, 6, 2, 6, 2, 2, 0, 10, 0, 2, 4, 6, 2, 6, 0, 4, 2, 6, 0, 10, 0, 2, 4, 4, 2, 6, 0, 8, 4, 2, 0, 10, 2, 2, 2, 6, 0, 10, 2, 4, 2, 2, 2, 10, 0, 4, 4, 8
Offset: 1

Views

Author

Omar E. Pol, Jun 21 2009

Keywords

Comments

Noncentral divisors in the following sense: if we sort the divisors of n in natural order, there is one "central", median divisor if the number of divisors tau(n) = A000005(n) is odd, and there are two "central" divisors if tau(n) is even. a(n) is the number of divisors not counting the median or two central divisors.

Examples

			The divisors of 4 are 1, 2, 4 so the noncentral divisors of 4 are 1, 4 because its central divisor is 2.
The divisors of 12 are 1, 2, 3, 4, 6, 12 so the noncentral divisors of 12 are 1, 2, 6, 12 because its central divisors  are 3, 4.
		

Crossrefs

Programs

Formula

a(n) = tau(n)-2 + (tau(n) mod 2), tau = A000005.
a(n) = A000005(n) - A049240(n) - 1.
a(n) = A000005(n) + A010052(n) - 2.
a(n) = A000005(n) - A169695(n).
For n >= 2, a(n) = A200213(n) + 2*A010052(n). - Antti Karttunen, Jul 07 2017
a(n) = 2*A072670(n-1). - Omar E. Pol, Jul 08 2017
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024

Extensions

More terms from R. J. Mathar, Jul 04 2009

A200214 Ordered factorizations of n with 3 distinct parts, all > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 18, 0, 0, 0, 6, 0, 6, 0, 0, 0, 6, 0, 18, 0, 0, 0, 0, 0, 6, 0, 12, 0, 0, 0, 18
Offset: 1

Views

Author

Peter Luschny, Nov 14 2011

Keywords

Examples

			a(24) = 6 = card({{2,3,4}, {2,4,3}, {3,2,4}, {3,4,2}, {4,2,3}, {4,3,2}}).
a(64) = 6 = card({{2,4,8}, {2,8,4}, {4,2,8}, {4,8,2}, {8,2,4}, {8,4,2}}).
		

Crossrefs

Programs

  • Mathematica
    OrderedFactorizations[1] = {{}}; OrderedFactorizations[n_?PrimeQ] := {{n}}; OrderedFactorizations[n_] := OrderedFactorizations[n] = Flatten[Function[d, Prepend[#, d] & /@ OrderedFactorizations[n/d]] /@ Rest[Divisors[n]], 1]; a[n_] := With[{of3 = Sort /@ Select[OrderedFactorizations[n], Length[#] == 3 && Length[# // Union] == 3 &] // Union}, Length[Permutations /@ of3 // Flatten[#, 1] &]];  Table[a[n], {n, 1, 84}] (* Jean-François Alcover, Jul 02 2013, copied and adapted from The Mathematica Journal *)
  • PARI
    A200214(n) = { my(s=0); fordiv(n, x, if((x>1)&&(xA122180, still quite naive) - Antti Karttunen, Jul 09 2017

Formula

a(n) = 6*A122180(n). - Antti Karttunen, Jul 08 2017

Extensions

Description clarified, term a(0) removed and a second example added by Antti Karttunen, Jul 09 2017
Showing 1-4 of 4 results.