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.

Previous Showing 11-20 of 213 results. Next

A001065 Sum of proper divisors (or aliquot parts) of n: sum of divisors of n that are less than n.

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 16, 1, 10, 9, 15, 1, 21, 1, 22, 11, 14, 1, 36, 6, 16, 13, 28, 1, 42, 1, 31, 15, 20, 13, 55, 1, 22, 17, 50, 1, 54, 1, 40, 33, 26, 1, 76, 8, 43, 21, 46, 1, 66, 17, 64, 23, 32, 1, 108, 1, 34, 41, 63, 19, 78, 1, 58, 27, 74, 1, 123, 1, 40, 49, 64, 19, 90, 1, 106
Offset: 1

Views

Author

Keywords

Comments

Also total number of parts in all partitions of n into equal parts that do not contain 1 as a part. - Omar E. Pol, Jan 16 2013
Related concepts: If a(n) < n, n is said to be deficient, if a(n) > n, n is abundant, and if a(n) = n, n is perfect. If there is a cycle of length 2, so that a(n) = b and a(b) = n, b and n are said to be amicable. If there is a longer cycle, the numbers in the cycle are said to be sociable. See examples. - Juhani Heino, Jul 17 2017
Sum of the smallest parts in the partitions of n into two parts such that the smallest part divides the largest. - Wesley Ivan Hurt, Dec 22 2017
a(n) is also the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts that do not contain k as a part (the comment dated Jan 16 2013 is the case for k = 1). - Omar E. Pol, Nov 23 2019
Fixed points are in A000396. - Alois P. Heinz, Mar 10 2024

Examples

			x^2 + x^3 + 3*x^4 + x^5 + 6*x^6 + x^7 + 7*x^8 + 4*x^9 + 8*x^10 + x^11 + ...
For n = 44, sum of divisors of n = sigma(n) = 84; so a(44) = 84-44 = 40.
Related concepts: (Start)
From 1 to 17, all n are deficient, except 6 and 12 seen below. See A005100.
Abundant numbers: a(12) = 16, a(18) = 21. See A005101.
Perfect numbers: a(6) = 6, a(28) = 28. See A000396.
Amicable numbers: a(220) = 284, a(284) = 220. See A259180.
Sociable numbers: 12496 -> 14288 -> 15472 -> 14536 -> 14264 -> 12496. See A122726. (End)
For n = 10 the sum of the divisors of 10 that are less than 10 is 1 + 2 + 5 = 8. On the other hand, the partitions of 10 into equal parts that do not contain 1 as a part are [10], [5,5], [2,2,2,2,2], there are 8 parts, so a(10) = 8. - _Omar E. Pol_, Nov 24 2019
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • George E. Andrews, Number Theory. New York: Dover, 1994; Pages 1, 75-92; p. 92 #15: Sigma(n) / d(n) >= n^(1/2).
  • Carl Pomerance, The first function and its iterates, pp. 125-138 in Connections in Discrete Mathematics, ed. S. Butler et al., Cambridge, 2018.
  • H. J. J. te Riele, Perfect numbers and aliquot sequences, pp. 77-94 in J. van de Lune, ed., Studieweek "Getaltheorie en Computers", published by Math. Centrum, Amsterdam, Sept. 1980.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 91.

Crossrefs

Least inverse: A070015, A359132.
Values taken: A078923, values not taken: A005114.
Records: A034090, A034091.
First differences: A053246, partial sums: A153485.
a(n) = n - A033879(n) = n + A033880(n). - Omar E. Pol, Dec 30 2013
Row sums of A141846 and of A176891. - Gary W. Adamson, May 02 2010
Row sums of A176079. - Mats Granvik, May 20 2012
Alternating row sums of A231347. - Omar E. Pol, Jan 02 2014
a(n) = sum (A027751(n,k): k = 1..A000005(n)-1). - Reinhard Zumkeller, Apr 05 2013
For n > 1: a(n) = A240698(n,A000005(n)-1). - Reinhard Zumkeller, Apr 10 2014
A134675(n) = A007434(n) + a(n). - Conjectured by John Mason and proved by Max Alekseyev, Jan 07 2015
Cf. A037020 (primes), A053868, A053869 (odd and even terms).
Cf. A048138 (number of occurrences), A238895, A238896 (record values thereof).
Cf. A007956 (products of proper divisors).
Cf. A005100, A005101, A000396, A259180, A122726 (related concepts).

Programs

  • Haskell
    a001065 n = a000203 n - n  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [SumOfDivisors(n)-n: n in [1..100]]; // Vincenzo Librandi, May 06 2015
    
  • Maple
    A001065 := proc(n)
        numtheory[sigma](n)-n ;
    end proc:
    seq( A001065(n),n=1..100) ;
  • Mathematica
    Table[ Plus @@ Select[ Divisors[ n ], #Zak Seidov, Sep 10 2009 *)
    Table[DivisorSigma[1, n] - n, {n, 1, 80}] (* Jean-François Alcover, Apr 25 2013 *)
    Array[Plus @@ Most@ Divisors@# &, 80] (* Robert G. Wilson v, Dec 24 2017 *)
  • MuPAD
    numlib::sigma(n)-n$ n=1..81 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n==0, 0, sigma(n) - n)} /* Michael Somos, Sep 20 2011 */
    
  • Python
    from sympy import divisor_sigma
    def A001065(n): return divisor_sigma(n)-n # Chai Wah Wu, Nov 04 2022
    
  • Sage
    [sigma(n, 1)-n for n in range(1, 81)] # Stefano Spezia, Jul 14 2025

Formula

G.f.: Sum_{k>0} k * x^(2*k)/(1 - x^k). - Michael Somos, Jul 05 2006
a(n) = sigma(n) - n = A000203(n) - n. - Lekraj Beedassy, Jun 02 2005
a(n) = A155085(-n). - Michael Somos, Sep 20 2011
Equals inverse Mobius transform of A051953 = A051731 * A051953. Example: a(6) = 6 = (1, 1, 1, 0, 0, 1) dot (0, 1, 1, 2, 1, 4) = (0 + 1 + 1 + 0 + 0 + 4), where A051953 = (0, 1, 1, 2, 1, 4, 1, 4, 3, 6, 1, 8, ...) and (1, 1, 1, 0, 0, 1) = row 6 of A051731 where the 1's positions indicate the factors of 6. - Gary W. Adamson, Jul 11 2008
a(n) = A006128(n) - A220477(n) - n. - Omar E. Pol Jan 17 2013
a(n) = Sum_{i=1..floor(n/2)} i*(1-ceiling(frac(n/i))). - Wesley Ivan Hurt, Oct 25 2013
Dirichlet g.f.: zeta(s-1)*(zeta(s) - 1). - Ilya Gutkovskiy, Aug 07 2016
a(n) = 1 + A048050(n), n > 1. - R. J. Mathar, Mar 13 2018
Erdős (Elem. Math. 28 (1973), 83-86) shows that the density of even integers in the range of a(n) is strictly less than 1/2. The argument of Coppersmith (1987) shows that the range of a(n) has density at most 47/48 < 1. - N. J. A. Sloane, Dec 21 2019
G.f.: Sum_{k >= 2} x^k/(1 - x^k)^2. Cf. A296955. (This follows from the fact that if g(z) = Sum_{n >= 1} a(n)*z^n and f(z) = Sum_{n >= 1} a(n)*z^(N*n)/(1 - z^n) then f(z) = Sum_{k >= N} g(z^k), taking a(n) = n and N = 2.) - Peter Bala, Jan 13 2021
Faster converging g.f.: Sum_{n >= 1} q^(n*(n+1))*(n*q^(3*n+2) - (n + 1)*q^(2*n+1) - (n - 1)*q^(n+1) + n)/((1 - q^n)*(1 - q^(n+1))^2). (In equation 1 in Arndt, after combining the two n = 0 summands to get -t/(1 - t), apply the operator t*d/dt to the resulting equation and then set t = q and x = 1.) - Peter Bala, Jan 22 2021
a(n) = Sum_{d|n} d * (1 - [n = d]), where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jan 28 2021
a(n) = Sum_{i=1..n} ((n-1) mod i) - (n mod i). [See also A176079.] - José de Jesús Camacho Medina, Feb 23 2021

A051731 Triangle read by rows: T(n, k) = 1 if k divides n, T(n, k) = 0 otherwise, for 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)

Keywords

Comments

T(n, k) is the number of partitions of n into k equal parts. - Omar E. Pol, Apr 21 2018
This triangle is the lower triangular array L in the LU decomposition of the square array A003989. - Peter Bala, Oct 15 2023

Examples

			The triangle T(n, k) begins:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  1:  1
  2:  1  1
  3:  1  0  1
  4:  1  1  0  1
  5:  1  0  0  0  1
  6:  1  1  1  0  0  1
  7:  1  0  0  0  0  0  1
  8:  1  1  0  1  0  0  0  1
  9:  1  0  1  0  0  0  0  0  1
  10: 1  1  0  0  1  0  0  0  0  1
  11: 1  0  0  0  0  0  0  0  0  0  1
  12: 1  1  1  1  0  1  0  0  0  0  0  1
  13: 1  0  0  0  0  0  0  0  0  0  0  0  1
  14: 1  1  0  0  0  0  1  0  0  0  0  0  0  1
  15: 1  0  1  0  1  0  0  0  0  0  0  0  0  0  1
  ... Reformatted and extended. - _Wolfdieter Lang_, Nov 12 2014
		

Crossrefs

Cf. A000005 (row sums), A032741(n+2) (diagonal sums).
Cf. A243987 (partial sums per row).
Cf. A134546 (A004736 * T, matrix multiplication).
Variants: A113704, A077049, A077051.

Programs

  • Haskell
    a051731 n k = 0 ^ mod n k
    a051731_row n = a051731_tabl !! (n-1)
    a051731_tabl = map (map a000007) a048158_tabl
    -- Reinhard Zumkeller, Aug 13 2013
    
  • Magma
    [0^(n mod k): k in [1..n], n in [1..17]]; // G. C. Greubel, Jun 22 2024
    
  • Maple
    A051731 := proc(n, k) if n mod k = 0 then 1 else 0 end if end proc:
    # R. J. Mathar, Jul 14 2012
  • Mathematica
    Flatten[Table[If[Mod[n, k] == 0, 1, 0], {n, 20}, {k, n}]]
  • PARI
    for(n=1,17,for(k=1,n,print1(!(n%k)", "))) \\ Charles R Greathouse IV, Mar 14 2012
    
  • Python
    from math import isqrt, comb
    def A051731(n): return int(not (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))%(n-comb(a,2))) # Chai Wah Wu, Nov 13 2024
  • Sage
    A051731_row = lambda n: [int(k.divides(n)) for k in (1..n)]
    for n in (1..17): print(A051731_row(n)) # Peter Luschny, Jan 05 2018
    

Formula

{T(n, k)*k, k=1..n} setminus {0} = divisors(n).
Sum_{k=1..n} T(n, k)*k^i = sigma[i](n), where sigma[i](n) is the sum of the i-th power of the positive divisors of n.
Sum_{k=1..n} T(n, k) = A000005(n).
Sum_{k=1..n} T(n, k)*k = A000203(n).
T(n, k) = T(n-k, k) for k <= n/2, T(n, k) = 0 for n/2 < k <= n-1, T(n, n) = 1.
Rows given by A074854 converted to binary. Example: A074854(4) = 13 = 1101_2; row 4 = 1, 1, 0, 1. - Philippe Deléham, Oct 04 2003
From Paul Barry, Dec 05 2004: (Start)
Binomial transform (product by binomial matrix) is A101508.
Columns have g.f.: x^k/(1-x^(k+1)) (k >= 0). (End)
Matrix inverse of triangle A054525, where A054525(n, k) = MoebiusMu(n/k) if k|n, 0 otherwise. - Paul D. Hanna, Jan 09 2006
From Gary W. Adamson, Apr 15 2007, May 10 2007: (Start)
Equals A129372 * A115361 as infinite lower triangular matrices.
A054525 is the inverse of this triangle (as lower triangular matrix).
This triangle * [1, 2, 3, ...] = sigma(n) (A000203).
This triangle * [1/1, 1/2, 1/3, ...] = sigma(n)/n. (End)
From Reinhard Zumkeller, Nov 01 2009: (Start)
T(n, k) = 0^(n mod k).
T(n, k) = A000007(A048158(n, k)). (End)
From Mats Granvik, Jan 26 2010, Feb 10 2010, Feb 16 2010: (Start)
T(n, k) = A172119(n) mod 2.
T(n, k) = A175105(n) mod 2.
T(n, k) = Sum_{i=1..k-1} (T(n-i, k-1) - T(n-i, k)) for k > 1 and T(n, 1) = 1.
(Jeffrey O. Shallit kindly provided a clarification along with a proof of this formula.) (End)
A049820(n) = number of zeros in n-th row. - Reinhard Zumkeller, Mar 09 2010
The determinant of this matrix where T(n, n) has been swapped with T(1,k) is equal to the n-th term of the Mobius function. - Mats Granvik, Jul 21 2012
T(n, k) = Sum_{y=1..n} Sum_{x=1..n} [GCD((x/y)*(k/n), n) = k]. - Mats Granvik, Dec 17 2023

Extensions

Edited by Peter Luschny, Oct 18 2023

A032742 a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 5, 13, 9, 14, 1, 15, 1, 16, 11, 17, 7, 18, 1, 19, 13, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 11, 28, 19, 29, 1, 30, 1, 31, 21, 32, 13, 33, 1, 34, 23, 35, 1, 36, 1, 37, 25, 38, 11, 39, 1, 40
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

It seems that a(n) = Max_{j=n+1..2n-1} gcd(n,j). - Labos Elemer, May 22 2002
This is correct: No integer in the range [n+1, 2n-1] has n as its divisor, but certainly at least one multiple of the largest proper divisor of n will occur there (e.g., if it is n/2, then at n + (n/2)). - Antti Karttunen, Dec 18 2014
The slopes of the visible lines made by the points in the scatter plot are 1/2, 1/3, 1/5, 1/7, ... (reciprocals of primes). - Moosa Nasir, Jun 19 2022

Crossrefs

Maximal GCD of k positive integers with sum n for k = 2..10: this sequence (k=2,n>=2), A355249 (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), A355402 (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).

Programs

  • Haskell
    a032742 n = n `div` a020639 n  -- Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    A032742 :=proc(n) option remember; if n = 1 then 1; else numtheory[divisors](n) minus {n} ; max(op(%)) ; end if; end proc: # R. J. Mathar, Jun 13 2011
    1, seq(n/min(numtheory:-factorset(n)), n=2..1000); # Robert Israel, Dec 18 2014
  • Mathematica
    f[n_] := If[n == 1, 1, Divisors[n][[-2]]]; Table[f[n], {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 03 2010 *)
    Join[{1},Divisors[#][[-2]]&/@Range[2,80]] (* Harvey P. Dale, Nov 29 2011 *)
    a[n_] := n/FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
    Table[Which[n==1,1,PrimeQ[n],1,True,Divisors[n][[-2]]],{n,80}] (* Harvey P. Dale, Feb 02 2022 *)
  • PARI
    a(n)=if(n==1,1,n/factor(n)[1,1]) \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else n//min(factorint(n))
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jun 21 2022
  • Scheme
    (define (A032742 n) (/ n (A020639 n))) ;; Antti Karttunen, Dec 18 2014
    

Formula

a(n) = n / A020639(n).
Other identities and observations:
A054576(n) = a(a(n)); A117358(n) = a(a(a(n))) = a(A054576(n)); a(A008578(n)) = 1, a(A002808(n)) > 1. - Reinhard Zumkeller, Mar 10 2006
a(n) = A130064(n) / A006530(n). - Reinhard Zumkeller, May 05 2007
a(m)*a(n) < a(m*n) for m and n > 1. - Reinhard Zumkeller, Apr 11 2008
a(m*n) = max(m*a(n), n*a(m)). - Robert Israel, Dec 18 2014
From Antti Karttunen, Mar 31 2018: (Start)
a(n) = n - A060681(n).
For n > 1, a(n) = A003961^(r)(A246277(n)), where r = A055396(n)-1 and A003961^(r)(n) stands for shifting the prime factorization of n by r positions towards larger primes.
For all n >= 1, A276085(a(A276086(n))) = A276151(n).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Nov 19 2022

Extensions

Definition clarified by N. J. A. Sloane, Dec 26 2022

A027751 Irregular triangle read by rows in which row n lists the proper divisors of n (those divisors of n which are < n), with the first row {1} by convention.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 1, 3, 1, 2, 5, 1, 1, 2, 3, 4, 6, 1, 1, 2, 7, 1, 3, 5, 1, 2, 4, 8, 1, 1, 2, 3, 6, 9, 1, 1, 2, 4, 5, 10, 1, 3, 7, 1, 2, 11, 1, 1, 2, 3, 4, 6, 8, 12, 1, 5, 1, 2, 13, 1, 3, 9, 1, 2, 4, 7, 14, 1, 1, 2, 3, 5, 6, 10, 15, 1, 1, 2, 4, 8, 16, 1, 3, 11, 1, 2, 17, 1, 5, 7, 1, 2, 3, 4, 6, 9, 12, 18
Offset: 1

Views

Author

Keywords

Comments

Or, take the list 1,2,3,4,... of natural numbers (A000027) and replace each number by its proper divisors.
The row length is 1 for n = 1 and A032741(n) for n >= 2. - Wolfdieter Lang, Jan 16 2016

Examples

			The irregular triangle T(n,k) begins:
n\k  1 2 3 4  5 ...
1:   1  (by convention)
2:   1
3:   1
4:   1 2
5:   1
6:   1 2 3
7:   1
8:   1 2 4
9:   1 3
10:  1 2 5
11:  1
12:  1 2 3 4  6
13:  1
14:  1 2 7
15:  1 3 5
16:  1 2 4 8
17:  1
18:  1 2 3 6  9
19:  1
20:  1 2 4 5 10
.... reformatted - _Wolfdieter Lang_, Jan 16 2016
		

Crossrefs

Cf. A027750, A032741 (row lengths), A001065, A000005.
Row sums give A173455. - Omar E. Pol, Nov 23 2010

Programs

  • Haskell
    a027751 n k = a027751_tabf !! (n-1) !! (k-1)
    a027751_row n = a027751_tabf !! (n-1)
    a027751_tabf = [1] : map init (tail a027750_tabf)
    -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    with(numtheory):
    T:= n-> sort([(divisors(n) minus {n})[]])[]: T(1):=1:
    seq(T(n), n=1..50); # Alois P. Heinz, Apr 11 2012
  • Mathematica
    Table[ Divisors[n] // Most, {n, 1, 36}] // Flatten // Prepend[#, 1] & (* Jean-François Alcover, Jun 10 2013 *)
  • PARI
    row(n) = if (n==1, [1], my(d = divisors(n)); vector(#d-1,k, d[k])); \\ Michel Marcus, Apr 30 2017
  • Python
    from sympy import divisors
    def a(n): return [1] if n==1 else divisors(n)[:-1]
    for n in range(21): print(a(n)) # Indranil Ghosh, Apr 30 2017
    

Extensions

More terms from Patrick De Geest, May 15 1998
Example edited by Omar E. Pol, Nov 23 2010

A329744 Triangle read by rows where T(n,k) is the number of compositions of n > 0 with runs-resistance k, 0 <= k <= n - 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 1, 1, 6, 6, 2, 1, 3, 15, 9, 4, 0, 1, 1, 22, 22, 16, 2, 0, 1, 3, 41, 38, 37, 8, 0, 0, 1, 2, 72, 69, 86, 26, 0, 0, 0, 1, 3, 129, 124, 175, 78, 2, 0, 0, 0, 1, 1, 213, 226, 367, 202, 14, 0, 0, 0, 0, 1, 5, 395, 376, 750, 469, 52, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			Triangle begins:
   1
   1   1
   1   1   2
   1   2   3   2
   1   1   6   6   2
   1   3  15   9   4   0
   1   1  22  22  16   2   0
   1   3  41  38  37   8   0   0
   1   2  72  69  86  26   0   0   0
   1   3 129 124 175  78   2   0   0   0
   1   1 213 226 367 202  14   0   0   0   0
   1   5 395 376 750 469  52   0   0   0   0   0
Row n = 6 counts the following compositions:
  (6)  (33)      (15)    (114)    (1131)
       (222)     (24)    (411)    (1311)
       (111111)  (42)    (1113)   (11121)
                 (51)    (1221)   (12111)
                 (123)   (2112)
                 (132)   (3111)
                 (141)   (11112)
                 (213)   (11211)
                 (231)   (21111)
                 (312)
                 (321)
                 (1122)
                 (1212)
                 (2121)
                 (2211)
		

Crossrefs

Row sums are A000079.
Column k = 1 is A032741.
Column k = 2 is A329745.
Column k = n - 2 is A329743.
The version for partitions is A329746.
The version with rows reversed is A329750.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==k&]],{n,10},{k,0,n-1}]

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

A325280 Triangle read by rows where T(n,k) is the number of integer partitions of n with adjusted frequency depth k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 1, 2, 3, 0, 0, 1, 3, 4, 3, 0, 0, 0, 1, 1, 4, 8, 1, 0, 0, 0, 1, 3, 6, 9, 3, 0, 0, 0, 0, 1, 2, 8, 12, 7, 0, 0, 0, 0, 0, 1, 3, 11, 17, 10, 0, 0, 0, 0, 0, 0, 1, 1, 11, 26, 17, 0, 0, 0, 0, 0, 0, 0, 1, 5, 19, 25, 27
Offset: 0

Views

Author

Gus Wiseman, Apr 18 2019

Keywords

Comments

The adjusted frequency depth of an integer partition is 0 if the partition is empty, and otherwise it is one plus the number of times one must take the multiset of multiplicities to reach a singleton. For example, the partition (32211) has adjusted frequency depth 5 because we have: (32211) -> (221) -> (21) -> (11) -> (2).
The term "frequency depth" appears to have been coined by Clark Kimberling in A225485 and A225486, and can be applied to both integers (A323014) and integer partitions (this sequence).

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  1  2  1  1
  0  1  1  2  3  0
  0  1  3  4  3  0  0
  0  1  1  4  8  1  0  0
  0  1  3  6  9  3  0  0  0
  0  1  2  8 12  7  0  0  0  0
  0  1  3 11 17 10  0  0  0  0  0
  0  1  1 11 26 17  0  0  0  0  0  0
  0  1  5 19 25 27  0  0  0  0  0  0  0
  0  1  1 17 44 38  0  0  0  0  0  0  0  0
  0  1  3 25 53 52  1  0  0  0  0  0  0  0  0
  0  1  3 29 63 76  4  0  0  0  0  0  0  0  0  0
  0  1  4 37 83 98  8  0  0  0  0  0  0  0  0  0  0
Row n = 9 counts the following partitions:
  (9)  (333)        (54)      (441)       (3321)
       (111111111)  (63)      (522)       (4221)
                    (72)      (711)       (4311)
                    (81)      (3222)      (5211)
                    (432)     (6111)      (32211)
                    (531)     (22221)     (42111)
                    (621)     (33111)     (321111)
                    (222111)  (51111)
                              (411111)
                              (2211111)
                              (3111111)
                              (21111111)
		

Crossrefs

Row sums are A000041. Column k = 2 is A032741. Column k = 3 is A325245.
Integer partition triangles: A008284 (first omega), A116608 (second omega), A325242 (third omega), A325268 (second-to-last omega), A225485 or this sequence (length/frequency depth).

Programs

  • Mathematica
    fdadj[ptn_List]:=If[ptn=={},0,Length[NestWhileList[Sort[Length/@Split[#]]&,ptn,Length[#]>1&]]];
    Table[Length[Select[IntegerPartitions[n],fdadj[#]==k&]],{n,0,16},{k,0,n}]
  • PARI
    \\ depth(p) gives adjusted frequency depth of partition.
    depth(p)={if(!#p, 0, my(r=1); while(#p > 1, my(L=List(), k=0); for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L,i-k); k=i)); listsort(L); p=L; r++); r)}
    row(n)={my(v=vector(1+n)); forpart(p=n, v[1+depth(Vec(p))]++); v}
    { for(n=0, 10, print(row(n))) } \\ Andrew Howroyd, Jan 18 2023

A225485 Number of partitions of n that have frequency depth k, an array read by rows.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 3, 4, 3, 1, 1, 4, 8, 1, 1, 3, 6, 9, 3, 1, 2, 8, 12, 7, 1, 3, 11, 17, 10, 1, 1, 11, 26, 17, 1, 5, 19, 25, 27, 1, 1, 17, 44, 38, 1, 3, 25, 53, 52, 1, 1, 3, 29, 63, 76, 4
Offset: 1

Views

Author

Clark Kimberling, May 08 2013

Keywords

Comments

Let S = {x(1),...,x(k)} be a multiset whose distinct elements are y(1),...,y(h). Let f(i) be the frequency of y(i) in S. Define F(S) = {f(1),..,f(h)}, F(1,S) = F(S), and F(m,S) = F(F(m-1),S) for m>1. Then lim(F(m,S)) = {1} for every S, so that there is a least positive integer i for which F(i,S) = {1}, which we call the frequency depth of S.
Equivalently, the frequency depth of an integer partition is the number of times one must take the multiset of multiplicities to reach (1). For example, the partition (32211) has frequency depth 5 because we have: (32211) -> (221) -> (21) -> (11) -> (2) -> (1). - Gus Wiseman, Apr 19 2019
From Clark Kimberling, Sep 26 2023: (Start)
Below, m^n abbreviates the sum m+...+m of n terms. In the following list, the numbers p_1,...,p_k are distinct, m >= 1, and k >= 1. The forms of the partitions being counted are as follows:
column 1: [n],
column 2: [m^k],
column 3: [p_1^m,...,p_k^m],
column 4: [(p_1^m_1)^m,..., (p_k^m_k)^m], distinct numbers m_i.
Column 3 is of special interest. Assume first that m = 1, so that the form of partition being counted is p = [p_1,...,p_k], with conjugate given by [q_1,...,q_m] where q_i is the number of parts of p that are >= i. Since the p_i are distinct, the distinct parts of q are the integers 1,2,...,k. For the general case that m >= 1, the distinct parts of q are the integers m,...,km. Let S(n) denote the set of partitions of n counted by column 3. Then if a and b are in the set S*(n) of conjugates of partitions in S(n), and if a > b, then a - b is also in S*(n). Call this the subtraction property. Conversely, if a partition q has the subtraction property, then q must consist of a set of numbers m,..,km for some m. Thus, column 3 counts the partitions of n that have the subtraction property. (End)

Examples

			The first 9 rows:
  n = 1 .... 0
  n = 2 .... 1..1
  n = 3 .... 1..1..1
  n = 4 .... 1..2..1..1
  n = 5 .... 1..1..2..3
  n = 6 .... 1..3..4..3
  n = 7 .... 1..1..4..8..1
  n = 8 .... 1..3..6..9..3
  n = 9 .... 1..2..8.12..7
For the 7 partitions of 5, successive frequencies are shown here:
  5 -> 1 (depth 1)
  41 -> 11 -> 2 -> 1 (depth 3)
  32 -> 11 -> 2 -> 1 (depth 3)
  311 -> 12 -> 11 -> 2 -> 1 (depth 4)
  221 -> 12 -> 11 -> 2 -> 1 (depth 4)
  2111 -> 13 -> 11 -> 2 -> 1 (depth 4)
  11111 -> 5 -> 1 (depth 2)
Summary: 1 partition has depth 1; 1 has depth 2; 2 have 3; and 3 have 4, so that the row for n = 5 is 1..1..2..3 .
		

Crossrefs

Row sums are A000041.
Column k = 2 is A032741.
Column k = 3 is A325245.
a(n!) = A325272(n).
Integer partition triangles: A008284 (first omega), A116608 (second omega), A325242 (third omega), A325268 (second-to-last omega), A225485 or A325280 (length/frequency depth).

Programs

  • Mathematica
    c[s_] := c[s] = Select[Table[Count[s, i], {i, 1, Max[s]}], # > 0 &]
    f[s_] := f[s] = Drop[FixedPointList[c, s], -2]
    t[s_] := t[s] = Length[f[s]]
    u[n_] := u[n] = Table[t[Part[IntegerPartitions[n], i]],
      {i, 1, Length[IntegerPartitions[n]]}];
    Flatten[Table[Count[u[n], k], {n, 2, 25}, {k, 1, Max[u[n]]}]]

A000430 Primes and squares of primes.

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Also numbers n such that the product of proper divisors is < n.
See A050216 for lengths of blocks of consecutive primes. - Reinhard Zumkeller, Sep 23 2011
Numbers q > 1 such that d(q) < 4. Numbers k such that the number of ways of writing k = m + t is equal to the number of ways of writing k = r*s, where m|t and r|s. - Juri-Stepan Gerasimov, Oct 14 2017
Called multiplicatively deficient numbers by Chau (2004). - Amiram Eldar, Jun 29 2022

References

  • F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House 2000
  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Programs

  • Haskell
    a000430 n = a000430_list !! (n-1)
    a000430_list = m a000040_list a001248_list where
       m (x:xs) (y:ys) | x < y = x : m xs (y:ys)
                       | x > y = y : m (x:xs) ys
    -- Reinhard Zumkeller, Sep 23 2011
    
  • Mathematica
    nn = 223; t = Union[Prime[Range[PrimePi[nn]]], Prime[Range[PrimePi[Sqrt[nn]]]]^2] (* T. D. Noe, Apr 11 2011 *)
    Module[{upto=250,prs},prs=Prime[Range[PrimePi[upto]]];Select[Join[ prs,prs^2], #<=upto&]]//Sort (* Harvey P. Dale, Oct 08 2016 *)
  • PARI
    is(n)=isprime(n) || (issquare(n,&n) && isprime(n)) \\ Charles R Greathouse IV, Sep 04 2013
    
  • Python
    from math import isqrt
    from sympy import primepi
    def A000430(n):
        def f(x): return n+x-primepi(x)-primepi(isqrt(x))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return int(m) # Chai Wah Wu, Aug 09 2024

Formula

A084114(a(n)) = 0, see also A084110. - Reinhard Zumkeller, May 12 2003
A109810(a(n)) = 2. - Reinhard Zumkeller, May 24 2010
A010051(a(n)) + A010055(a(n))*A064911(a(n)) = 1;
A056595(a(n)) = 1. - Reinhard Zumkeller, Aug 15 2011
A032741(a(n)) = A046951(a(n)); A293575(a(n)) = 0. - Juri-Stepan Gerasimov, Oct 14 2017
The number of terms not exceeding x is N(x) ~ (x + 2*sqrt(x))/log(x) (Chau, 2004). - Amiram Eldar, Jun 29 2022

A002541 a(n) = Sum_{k=1..n-1} floor((n-k)/k).

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 12, 14, 17, 18, 23, 24, 27, 30, 34, 35, 40, 41, 46, 49, 52, 53, 60, 62, 65, 68, 73, 74, 81, 82, 87, 90, 93, 96, 104, 105, 108, 111, 118, 119, 126, 127, 132, 137, 140, 141, 150, 152, 157, 160, 165, 166, 173, 176, 183, 186, 189, 190, 201, 202, 205
Offset: 1

Views

Author

Keywords

Comments

Number of pairs (a, b) with 1 <= a < b <= n, a | b.
The sequence shows how many digit "skips" there have been from 2 to n, a skip being either a prime factor or product thereof. Every time you have a place where you have X skips and the next skip value is X+1, you will have a prime number since a prime number will only add exactly one more skip to get to it. a(n) = Sum_{x=2..n} floor(n/x) - Sum_{x=2..n-1} floor( (n-1)/x) = 1 when prime. - Marius-Paul Dumitrean (marius(AT)neldor.com), Feb 19 2007
A027749(a(n)+1) = n; A027749(a(n)+2) = A020639(n+1). - Reinhard Zumkeller, Nov 22 2003
Number of partitions of n into exactly 2 types of part, where one part is 1, e.g., n=7 gives 1111111, 111112, 11122, 1222, 11113, 133, 1114, 115 and 16, so a(7)=9. - Jon Perry, May 26 2004
The sequence of partial sums of A032741. Idea of proof: floor((n-k)/k) - floor((n-k-1)/k) only increases by 1 when k | n. - George Beck, Feb 12 2012
Also the number of integer partitions of n whose non-1 parts are all equal and with at least one non-1 part. - Gus Wiseman, Oct 07 2018

Examples

			From _Gus Wiseman_, Oct 07 2018: (Start)
The integer partitions whose non-1 parts are all equal and with at least one non-1 part:
  (2)  (3)   (4)    (5)     (6)      (7)       (8)        (9)
       (21)  (22)   (41)    (33)     (61)      (44)       (81)
             (31)   (221)   (51)     (331)     (71)       (333)
             (211)  (311)   (222)    (511)     (611)      (441)
                    (2111)  (411)    (2221)    (2222)     (711)
                            (2211)   (4111)    (3311)     (6111)
                            (3111)   (22111)   (5111)     (22221)
                            (21111)  (31111)   (22211)    (33111)
                                     (211111)  (41111)    (51111)
                                               (221111)   (222111)
                                               (311111)   (411111)
                                               (2111111)  (2211111)
                                                          (3111111)
                                                          (21111111)
(End)
		

References

  • J. P. Gram, Undersoegelser angaaende maengden af primtal under en given graense, Det Kongelige Danskevidenskabernes Selskabs Skrifter, series 6, vol. 2 (1884), 183-288; see Tab. VII: Vaerdier af Funktionen psi(n) og andre numeriske Funktioner, pp. 281-288, especially p. 281.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Antidiagonal sums of array A003988. Antidiagonal sums of A004199.

Programs

  • Haskell
    a002541 n = sum $ zipWith div [n - 1, n - 2 ..] [1 .. n - 1]
    -- Reinhard Zumkeller, Jul 05 2013
    
  • Maple
    a:= proc(n) option remember; `if`(n<2, 0,
          numtheory[tau](n)-1+a(n-1))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 12 2021
  • Mathematica
    Table[Sum[Floor[(n-k)/k],{k,n-1}],{n,100}] (* Harvey P. Dale, May 02 2011 *)
  • PARI
    a(n)=sum(k=1,n-1, n\k-1) \\ Charles R Greathouse IV, Feb 07 2017
    
  • PARI
    first(n)=my(v=vector(n),s); for(k=1,n, v[k]=-k+s+=numdiv(k)); v \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from math import isqrt
    def A002541(n): return (sum(n//k for k in range(1,isqrt(n)+1))<<1)-isqrt(n)**2-n # Chai Wah Wu, Oct 20 2023

Formula

a(n) = -n + Sum_{k=1..n} tau(k). - Vladeta Jovovic, Oct 17 2002
G.f.: 1/(1-x) * Sum_{k>=2} x^k/(1-x^k). - Benoit Cloitre, Apr 23 2003
a(n) = Sum_{i=2..n} floor(n/i). - Jon Perry, Feb 02 2004
a(n) = (Sum_{i=2..n} ceiling((n+1)/i)) - n + 1. - Jon Perry, May 26 2004 [corrected by Jason Yuen, Jul 31 2024]
a(n) = A006218(n) - n. Proof: floor((n-k)/k)+1 = floor(n/k). Then Sum_{k=1..n-1} floor((n-k)/k)+(n-1)+1 = Sum_{k=1..n-1} floor(n/k) + floor(n/n) = Sum_{k=1..n} floor(n/k); i.e., a(n) + n = A006218(n). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007
a(n) = A161886(n) - (2n-1). - Eric Desbiaux, Jul 10 2013
a(n+1) = Sum_{k=1..n} A004199(n-k+1,k). - L. Edson Jeffery, Aug 31 2014
a(n) = -Sum_{i=1..n} floor((n-2i+1)/(n-i+1)). - Wesley Ivan Hurt, May 08 2016
a(n) = Sum_{i=1..floor(n/2)} floor((n-i)/i). - Wesley Ivan Hurt, Nov 16 2017
a(n) = Sum_{k=1..n-1} (A000005(n-k) - 1). - Gus Wiseman, Oct 07 2018
a(n) ~ n * (log(n) + 2*EulerGamma - 2). - Rok Cestnik, Dec 19 2020

Extensions

More terms from David W. Wilson
Previous Showing 11-20 of 213 results. Next