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-10 of 62 results. Next

A358044 a(n) is the smallest number k such that n consecutive integers starting at k have the same number of triangular divisors (A007862).

Original entry on oeis.org

1, 1, 55, 5402, 2515069
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 26 2022

Keywords

Comments

Any subsequent terms are > 10^10. - Lucas A. Brown, Jan 06 2023

Examples

			55 has 2 triangular divisors {1, 55}, 56 has 2 triangular divisors {1, 28} and 57 has 2 triangular divisors {1, 3}. These are the first 3 consecutive numbers with the same number of triangular divisors, so a(3) = 55.
		

Crossrefs

A325325 Number of integer partitions of n with distinct differences between successive parts.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 5, 8, 11, 12, 16, 22, 21, 30, 34, 42, 49, 64, 67, 87, 95, 117, 132, 160, 169, 207, 230, 274, 301, 360, 395, 463, 506, 602, 656, 762, 834, 960, 1042, 1220, 1311, 1505, 1643, 1859, 2000, 2341, 2491, 2827, 3083, 3464, 3747, 4302, 4561, 5154
Offset: 0

Views

Author

Gus Wiseman, Apr 23 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A325368.

Examples

			The a(0) = 1 through a(9) = 12 partitions:
  ()  (1)  (2)   (3)   (4)    (5)    (6)    (7)    (8)     (9)
           (11)  (21)  (22)   (32)   (33)   (43)   (44)    (54)
                       (31)   (41)   (42)   (52)   (53)    (63)
                       (211)  (221)  (51)   (61)   (62)    (72)
                              (311)  (411)  (322)  (71)    (81)
                                            (331)  (332)   (441)
                                            (421)  (422)   (522)
                                            (511)  (431)   (621)
                                                   (521)   (711)
                                                   (611)   (4221)
                                                   (4211)  (4311)
                                                           (5211)
For example, (5,2,1,1) has differences (-3,-1,0), which are distinct, so (5,2,1,1) is counted under a(9).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Differences[#]&]],{n,0,30}]

A046951 a(n) is the number of squares dividing n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 4, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Rediscovered by the HR automatic theory formation program.
a(n) depends only on prime signature of n (cf. A025487, A046523). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
First differences of A013936. Average value tends towards Pi^2/6 = 1.644934... (A013661, A013679). - Henry Bottomley, Aug 16 2001
We have a(n) = A159631(n) for all n < 125, but a(125) = 2 < 3 = A159631(125). - Steven Finch, Apr 22 2009
Number of 2-generated Abelian groups of order n, if n > 1. - Álvar Ibeas, Dec 22 2014 [In other words, number of order-n abelian groups with rank <= 2. Proof: let b(n) be such number. A finite abelian group is the inner direct product of all Sylow-p subgroups, so {b(n)} is multiplicative. Obviously b(p^e) = floor(e/2)+1 (corresponding to the groups C_(p^r) X C_(p^(e-r)) for 0 <= r <= floor(e/2)), hence b(n) = a(n) for all n. - Jianing Song, Nov 05 2022]
Number of ways of writing n = r*s such that r|s. - Eric M. Schmidt, Jan 08 2015
The number of divisors of the square root of the largest square dividing n. - Amiram Eldar, Jul 07 2020
The number of unordered factorizations of n into cubefree powers of primes (1, primes and squares of primes, A166684). - Amiram Eldar, Jun 12 2025

Examples

			a(16) = 3 because the squares 1, 4, and 16 divide 16.
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + x^10 + ...
		

Crossrefs

One more than A071325.
Differs from A096309 for the first time at n=32, where a(32) = 3, while A096309(32) = 2 (and also A185102(32) = 2).
Sum of the k-th powers of the square divisors of n for k=0..10: this sequence (k=0), A035316 (k=1), A351307 (k=2), A351308 (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Sequences of the form n^k * Sum_{d^2|n} 1/d^k for k = 0..10: this sequence (k=0), A340774 (k=1), A351600 (k=2), A351601 (k=3), A351602 (k=4), A351603 (k=5), A351604 (k=6), A351605 (k=7), A351606 (k=8), A351607 (k=9), A351608 (k=10).
Cf. A082293 (a(n)==2), A082294 (a(n)==3).

Programs

  • Haskell
    a046951 = sum . map a010052 . a027750_row
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Magma
    [#[d: d in Divisors(n)|IsSquare(d)]:n in [1..120]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A046951 := proc(n)
        local a,s;
        a := 1 ;
        for p in ifactors(n)[2] do
            a := a*(1+floor(op(2,p)/2)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 17 2012
    # Alternatively:
    isbidivisible := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = d:
    a := n -> nops(select(k -> isbidivisible(n, k), [seq(1..n)])): # Peter Luschny, Jun 13 2025
  • Mathematica
    a[n_] := Length[ Select[ Divisors[n], IntegerQ[Sqrt[#]]& ] ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 26 2012 *)
    Table[Length[Intersection[Divisors[n], Range[10]^2]], {n, 100}] (* Alonso del Arte, Dec 10 2012 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ DivisorSigma[ 0, d], 2], {d, Divisors @ n}]]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 2, Boole[ n == 1], Times @@ (Quotient[ #[[2]], 2] + 1 & /@ FactorInteger @ n)]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^k^2 / (1 - x^k^2), {k, Sqrt @ n}], {x, 0, n}]]; (* Michael Somos, Jun 13 2014 *)
    f[p_, e_] := 1 + Floor[e/2]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    a(n)=my(f=factor(n));for(i=1,#f[,1],f[i,2]\=2);numdiv(factorback(f)) \\ Charles R Greathouse IV, Dec 11 2012
    
  • PARI
    a(n) = direuler(p=2, n, 1/((1-X^2)*(1-X)))[n]; \\ Michel Marcus, Mar 08 2015
    
  • PARI
    a(n)=factorback(apply(e->e\2+1, factor(n)[,2])) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A046951(n): return prod((e>>1)+1 for e in factorint(n).values()) # Chai Wah Wu, Aug 04 2024
    
  • Python
    def is_bidivisible(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == d
    def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_bidivisible(n, k)]
    print([len(aList(n)) for n in range(1, 126)])  # Peter Luschny, Jun 13 2025
  • Scheme
    (definec (A046951 n) (if (= 1 n) 1 (* (A008619 (A007814 n)) (A046951 (A064989 n)))))
    (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
    ;; Antti Karttunen, Nov 14 2016
    

Formula

a(p^k) = A008619(k) = [k/2] + 1. a(A002110(n)) = 1 for all n. (This is true for any squarefree number, A005117). - Original notes clarified by Antti Karttunen, Nov 14 2016
a(n) = |{(i, j) : i*j = n AND i|j}| = |{(i, j) : i*j^2 = n}|. Also tau(A000188(n)), where tau = A000005.
Multiplicative with p^e --> floor(e/2) + 1, p prime. - Reinhard Zumkeller, May 20 2007
a(A130279(n)) = n and a(m) <> n for m < A130279(n); A008966(n)=0^(a(n) - 1). - Reinhard Zumkeller, May 20 2007
Inverse Moebius transform of characteristic function of squares (A010052). Dirichlet g.f.: zeta(s)*zeta(2s).
G.f.: Sum_{k > 0} x^(k^2)/(1 - x^(k^2)). - Vladeta Jovovic, Dec 13 2002
a(n) = Sum_{k=1..A000005(n)} A010052(A027750(n,k)). - Reinhard Zumkeller, Dec 16 2013
a(n) = Sum_{k = 1..n} ( floor(n/k^2) - floor((n-1)/k^2) ). - Peter Bala, Feb 17 2014
From Antti Karttunen, Nov 14 2016: (Start)
a(1) = 1; for n > 1, a(n) = A008619(A007814(n)) * a(A064989(n)).
a(n) = A278161(A156552(n)). (End)
G.f.: Sum_{k>0}(theta(q^k)-1)/2, where theta(q)=1+2q+2q^4+2q^9+2q^16+... - Mamuka Jibladze, Dec 04 2016
From Antti Karttunen, Nov 12 2017: (Start)
a(n) = A000005(n) - A056595(n).
a(n) = 1 + A071325(n).
a(n) = 1 + A001222(A293515(n)). (End)
L.g.f.: -log(Product_{k>=1} (1 - x^(k^2))^(1/k^2)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
a(n) = Sum_{d|n} A000005(d) * A008836(n/d). - Torlach Rush, Jan 21 2020
a(n) = A000005(sqrt(A008833(n))). - Amiram Eldar, Jul 07 2020
a(n) = Sum_{d divides n} mu(core(d)^2), where core(n) = A007913(n). - Peter Bala, Jan 24 2024

Extensions

Data section filled up to 125 terms and wrong claim deleted from Crossrefs section by Antti Karttunen, Nov 14 2016

A007294 Number of partitions of n into nonzero triangular numbers.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 7, 7, 10, 11, 11, 15, 17, 17, 22, 24, 25, 32, 35, 36, 44, 48, 50, 60, 66, 68, 81, 89, 92, 107, 117, 121, 141, 153, 159, 181, 197, 205, 233, 252, 262, 295, 320, 332, 372, 401, 417, 465, 501, 520, 575, 619, 645, 710, 763
Offset: 0

Views

Author

Keywords

Comments

Also number of decreasing integer sequences l(1) >= l(2) >= l(3) >= .. 0 such that sum('i*l(i)','i'=1..infinity)=n.
a(n) is also the number of partitions of n such that #{parts equal to i} >= #{parts equal to j} if i <= j.
Also the number of partitions of n (necessarily into distinct parts) where the part sizes are monotonically decreasing (including the last part, which is the difference between the last part and a "part" of size 0). These partitions are the conjugates of the partitions with number of parts of size i increasing. - Franklin T. Adams-Watters, Apr 08 2008
Also partitions with condition as in A179255, and additionally, if more than one part, first difference >= first part: for example, a(10)=7 as there are 7 such partitions of 10: 1+2+3+4 = 1+2+7 = 1+3+6 = 1+9 = 2+8 = 3+7 = 10. - Joerg Arndt, Mar 22 2011
Number of members of A181818 with a bigomega value of n (cf. A001222). - Matthew Vandermast, May 19 2012

Examples

			6 = 3+3 = 3+1+1+1 = 1+1+1+1+1+1 so a(6) = 4.
a(7)=4: Four sequences as above are (7,0,..), (5,1,0,..), (3,2,0,..),(2,1,1,0,..). They correspond to the partitions 1^7, 2 1^5, 2^2 1^3, 3 2 1^2 of seven or in the main description to the partitions 1^7, 3 1^4, 3^2 1, 6 1.
From _Gus Wiseman_, May 03 2019: (Start)
The a(1) = 1 through a(9) = 6 partitions using nonzero triangular numbers are the following. The Heinz numbers of these partitions are given by A325363.
  1   11   3     31     311     6        61        611        63
           111   1111   11111   33       331       3311       333
                                3111     31111     311111     6111
                                111111   1111111   11111111   33111
                                                              3111111
                                                              111111111
The a(1) = 1 through a(10) = 7 partitions with weakly decreasing multiplicities are the following. Equivalent to Matthew Vandermast's comment, the Heinz numbers of these partitions are given by A025487 (products of primorial numbers).
  1  11  21   211   2111   321     3211     32111     32211      4321
         111  1111  11111  2211    22111    221111    222111     322111
                           21111   211111   2111111   321111     2221111
                           111111  1111111  11111111  2211111    3211111
                                                      21111111   22111111
                                                      111111111  211111111
                                                                 1111111111
The a(1) = 1 through a(11) = 7 partitions with weakly increasing differences (where the last part is taken to be zero) are the following. The Heinz numbers of these partitions are given by A325362 (A = 10, B = 11).
  (1)  (2)  (3)   (4)   (5)   (6)    (7)    (8)    (9)    (A)     (B)
            (21)  (31)  (41)  (42)   (52)   (62)   (63)   (73)    (83)
                              (51)   (61)   (71)   (72)   (82)    (92)
                              (321)  (421)  (521)  (81)   (91)    (A1)
                                                   (531)  (631)   (731)
                                                   (621)  (721)   (821)
                                                          (4321)  (5321)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A102462.
Row sums of array A176723 and triangle A176724. - Wolfdieter Lang, Jul 19 2010
Cf. A179255 (condition only on differences), A179269 (parts strictly increasing instead of nondecreasing). - Joerg Arndt, Mar 22 2011
Row sums of A319797.

Programs

  • Haskell
    a007294 = p $ tail a000217_list where
       p _      0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Jun 28 2013
    
  • Maple
    b:= proc(n,i) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i=0 then 0
        else b(n, i-1) +b(n-i*(i+1)/2, i)
          fi
        end:
    a:= n-> b(n, floor(sqrt(2*n))):
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 22 2011
    isNondecrP :=proc(L) slp := DIFF(DIFF(L)) ; min(op(%)) >= 0 ; end proc:
    A007294 := proc(n) local a, p; a := 0 ; if n = 0 then return 1 ; end if; for p in combinat[partition](n) do if nops(p) = nops(convert(p, set)) then if isNondecrP(p) then if nops(p) =1 then a := a+1 ; elif op(2, p) >= 2*op(1, p) then a := a+1; end if; end if; end if; end do; a ; end proc:
    seq(A007294(n), n=0..30) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    CoefficientList[ Series[ 1/Product[1 - x^(i(i + 1)/2), {i, 1, 50}], {x, 0, 70}], x]
    (* also *)
    t = Table[n (n + 1)/2, {n, 1, 200}] ; p[n_] := IntegerPartitions[n, All, t]; Table[p[n], {n, 0, 12}] (*shows partitions*)
    a[n_] := Length@p@n; a /@Range[0, 80]
    (* Clark Kimberling, Mar 09 2014 *)
    b[n_, i_] := b[n, i] = Which[n < 0, 0, n == 0, 1, i == 0, 0, True, b[n, i-1]+b[n-i*(i+1)/2, i]]; a[n_] := b[n, Floor[Sqrt[2*n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],OrderedQ[Differences[Append[#,0]]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
    nmax = 58; t = Table[PolygonalNumber[n], {n, nmax}];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[t, x]], {n, 0, nmax}] (* Robert Price, Aug 02 2020 *)
  • PARI
    N=66; Vec(1/prod(k=1,N,1-x^(k*(k+1)\2))+O(x^N)) \\ Joerg Arndt, Apr 14 2013
    
  • Python
    from functools import lru_cache
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    @lru_cache(maxsize=None)
    def A007294(n):
        @lru_cache(maxsize=None)
        def a(n): return is_square((n<<3)+1)
        @lru_cache(maxsize=None)
        def c(n): return sum(d for d in divisors(n,generator=True) if a(d))
        return (c(n)+sum(c(k)*A007294(n-k) for k in range(1,n)))//n if n else 1 # Chai Wah Wu, Jul 15 2024
  • Sage
    def A007294(n):
        has_nondecreasing_diffs = lambda x: min(differences(x, 2)) >= 0
        special = lambda x: (x[1]-x[0]) >= x[0]
        allowed = lambda x: (len(x) < 2 or special(x)) and (len(x) < 3 or has_nondecreasing_diffs(x))
        return len([1 for x in Partitions(n, max_slope=-1) if allowed(x[::-1])]) # D. S. McNeil, Jan 06 2011
    

Formula

G.f.: 1/Product_{k>=2} (1-z^binomial(k, 2)).
For n>0: a(n) = b(n, 1) where b(n, k) = if n>k*(k+1)/2 then b(n-k*(k+1)/2, k) + b(n, k+1) else (if n=k*(k+1)/2 then 1 else 0). - Reinhard Zumkeller, Aug 26 2003
For n>0, a(n) is Euler Transform of [1,0,1,0,0,1,0,0,0,1,0,0,0,0,1,...], i.e A010054, n>0. - Benedict W. J. Irwin, Jul 29 2016
a(n) ~ exp(3*Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3) / 2) * Zeta(3/2) / (2^(7/2) * sqrt(3) * Pi * n^(3/2)) [Brigham 1950 (exponential part), Almkvist 2006]. - Vaclav Kotesovec, Dec 31 2016
G.f.: Sum_{i>=0} x^(i*(i+1)/2) / Product_{j=1..i} (1 - x^(j*(j+1)/2)). - Ilya Gutkovskiy, May 07 2017

Extensions

Additional comments from Roland Bacher, Jun 17 2001

A333382 Number of adjacent unequal parts in the n-th composition in standard-order.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 2, 1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 0, 0, 1, 1, 1, 0, 2, 2, 1, 1, 2, 0, 1, 2, 3, 2, 1, 1, 2, 2, 2, 2, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 3, 2, 1, 1, 2, 2, 2, 1, 1, 2
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.
For n > 0, a(n) is one fewer than the number of maximal runs of the n-th composition in standard-order.

Examples

			The 46th composition in standard order is (2,1,1,2), with maximal runs ((2),(1,1),(2)), so a(46) = 3 - 1 = 2.
		

Crossrefs

Indices of first appearances (not counting 0) are A113835.
Partitions whose 0-appended first differences are a run are A007862.
Partitions whose first differences are a run are A049988.
A triangle counting maximal anti-runs of compositions is A106356.
A triangle counting maximal runs of compositions is A238279.
All of the following pertain to compositions in standard order (A066099):
- Adjacent equal pairs are counted by A124762.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Strict compositions are ranked by A233564.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Anti-runs are ranked by A333489.
- Anti-runs are counted by A333381.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],UnsameQ@@#&]],{n,0,100}]

Formula

For n > 0, a(n) = A124767(n) - 1.

A049988 Number of nondecreasing arithmetic progressions of positive integers with sum n.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 7, 5, 7, 9, 9, 7, 14, 8, 11, 16, 13, 10, 20, 11, 17, 21, 16, 13, 27, 17, 18, 26, 22, 16, 35, 17, 23, 31, 23, 25, 41, 20, 25, 36, 33, 22, 46, 23, 31, 48, 30, 25, 52, 29, 38, 47, 36, 28, 57, 37, 41, 52, 37, 31, 71, 32, 39, 62, 44, 43, 69, 35, 45, 62, 57, 37, 79, 38
Offset: 0

Views

Author

Keywords

Comments

From Gus Wiseman, May 03 2019: (Start)
a(n) is the number of integer partitions of n with equal differences. The Heinz numbers of these partitions are given by A325328. For example, the a(1) = 1 through a(9) = 9 partitions are:
1 2 3 4 5 6 7 8 9
11 21 22 32 33 43 44 54
111 31 41 42 52 53 63
1111 11111 51 61 62 72
222 1111111 71 81
321 2222 333
111111 11111111 432
531
111111111
(End)
From Petros Hadjicostas, Sep 29 2019: (Start)
We show how Leroy Quet's g.f. Sum_{n >= 0} a(n)*x^n = 1/(1-x) + Sum_{k >= 2} x^k/(1-x^(k*(k-1)/2))/(1-x^k) in the Formula section below can be derived from Graeme McRae's g.f. for A049982 (see one of the links below).
Let b(n) = A049982(n) for n >= 1. Then Graeme McRae proved that Sum_{n >= 1} b(n)*x^n = Sum_{k >= 2} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 2} x^t(k)/((1 - x^k) * (1 - x^t(k-1))), where t(k) = A000217(k) = k*(k+1)/2.
Since a(n) - b(n) = A000005(n) for n >= 1, to finish the proof, we only need to show that K(x) := 1 + Sum_{n >= 1} a(n)*x^n - Sum_{n >= 1} b(n)*x^n is the g.f. of A000005 (= number of divisors). But it is easy to show that K(x) = 1 + Sum_{k >= 1} x^k/(1 - x^k) = 1 + Sum_{n >= 1} A000005(n)*x^n (Lambert series for the number of divisors function). (End)

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n==0,1,Block[{i,c=Floor[(n-1)/2]+DivisorSigma[0,n]},Do[i=1;While[i*kGus Wiseman, May 07 2019 *)
    Table[Length[Select[IntegerPartitions[n],SameQ@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • PARI
    seq(n)={Vec(1/(1-x) + sum(k=2, n, x^k/(1 - x^(k*(k-1)/2))/(1-x^k) + O(x*x^n)))} \\ Andrew Howroyd, Sep 28 2019

Formula

G.f.: 1/(1-x) + Sum_{k>=2} x^k/(1-x^(k*(k-1)/2))/(1-x^k). - Leroy Quet, Apr 08 2010. [Edited by Gus Wiseman, May 03 2019]
a(n) = A049982(n) + A000005(n) = A049980(n) + A000005(n) - 1 for n >= 1. - Petros Hadjicostas, Sep 28 2019

Extensions

Edited by Max Alekseyev, May 03 2010
a(0) = 1 prepended by Gus Wiseman, May 03 2019

A320348 Number of partition into distinct parts (a_1, a_2, ... , a_m) (a_1 > a_2 > ... > a_m and Sum_{k=1..m} a_k = n) such that a1 - a2, a2 - a_3, ... , a_{m-1} - a_m, a_m are different.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 4, 4, 6, 9, 7, 13, 12, 13, 16, 22, 17, 28, 28, 31, 36, 50, 45, 63, 62, 74, 78, 102, 92, 123, 123, 146, 148, 191, 181, 228, 233, 280, 283, 348, 350, 420, 437, 518, 523, 616, 641, 727, 774, 884, 911, 1038, 1102, 1240, 1292, 1463, 1530, 1715, 1861, 2002
Offset: 1

Views

Author

Seiichi Manyama, Oct 11 2018

Keywords

Comments

Also the number of integer partitions of n whose parts cover an initial interval of positive integers with distinct multiplicities. Also the number of integer partitions of n whose multiplicities cover an initial interval of positive integers and are distinct (see A048767 for a bijection). - Gus Wiseman, May 04 2019

Examples

			n = 9
[9]        *********  a_1 = 9.
           ooooooooo
------------------------------------
[8, 1]             *        a_2 = 1.
            *******o  a_1 - a_2 = 7.
            oooooooo
------------------------------------
[7, 2]            **        a_2 = 2.
             *****oo  a_1 - a_2 = 5.
             ooooooo
------------------------------------
[5, 4]          ****        a_2 = 4.
               *oooo  a_1 - a_2 = 1.
               ooooo
------------------------------------
a(9) = 4.
From _Gus Wiseman_, May 04 2019: (Start)
The a(1) = 1 through a(11) = 9 strict partitions with distinct differences (where the last part is taken to be 0) are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A325388.
  (1)  (2)  (3)  (4)   (5)   (6)   (7)   (8)   (9)   (A)    (B)
                 (31)  (32)  (51)  (43)  (53)  (54)  (64)   (65)
                       (41)        (52)  (62)  (72)  (73)   (74)
                                   (61)  (71)  (81)  (82)   (83)
                                                     (91)   (92)
                                                     (631)  (A1)
                                                            (632)
                                                            (641)
                                                            (731)
The a(1) = 1 through a(10) = 6 partitions covering an initial interval of positive integers with distinct multiplicities are the following. The Heinz numbers of these partitions are given by A325326.
  1  11  111  211   221    21111   2221     22211     22221      222211
              1111  2111   111111  22111    221111    2211111    322111
                    11111          211111   2111111   21111111   2221111
                                   1111111  11111111  111111111  22111111
                                                                 211111111
                                                                 1111111111
The a(1) = 1 through a(10) = 6 partitions whose multiplicities cover an initial interval of positive integers and are distinct are the following (A = 10). The Heinz numbers of these partitions are given by A325337.
  (1)  (2)  (3)  (4)    (5)    (6)    (7)    (8)    (9)    (A)
                 (211)  (221)  (411)  (322)  (332)  (441)  (433)
                        (311)         (331)  (422)  (522)  (442)
                                      (511)  (611)  (711)  (622)
                                                           (811)
                                                           (322111)
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&UnsameQ@@Differences[Append[#,0]]&]],{n,30}] (* Gus Wiseman, May 04 2019 *)

A325324 Number of integer partitions of n whose differences (with the last part taken to be 0) are distinct.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 4, 7, 7, 7, 10, 15, 13, 22, 25, 26, 31, 43, 39, 55, 54, 68, 75, 98, 97, 128, 135, 165, 177, 217, 223, 277, 282, 339, 356, 438, 444, 527, 553, 667, 694, 816, 868, 1015, 1054, 1279, 1304, 1538, 1631, 1849, 1958, 2304, 2360, 2701, 2899, 3267
Offset: 0

Views

Author

Gus Wiseman, Apr 23 2019

Keywords

Comments

The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) (with the last part taken to be 0) are (-3,-2,-1).
The Heinz numbers of these partitions are given by A325367.

Examples

			The a(1) = 1 through a(11) = 15 partitions (A = 10, B = 11):
  (1)  (2)   (3)  (4)   (5)    (6)    (7)    (8)    (9)    (A)    (B)
       (11)       (22)  (32)   (33)   (43)   (44)   (54)   (55)   (65)
                  (31)  (41)   (51)   (52)   (53)   (72)   (64)   (74)
                        (311)  (411)  (61)   (62)   (81)   (73)   (83)
                                      (322)  (71)   (441)  (82)   (92)
                                      (331)  (332)  (522)  (91)   (A1)
                                      (511)  (611)  (711)  (433)  (443)
                                                           (622)  (533)
                                                           (631)  (551)
                                                           (811)  (632)
                                                                  (641)
                                                                  (722)
                                                                  (731)
                                                                  (911)
                                                                  (6311)
For example, (6,3,1,1) has differences (-3,-2,0,-1), which are distinct, so (6,3,1,1) is counted under a(11).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Differences[Append[#,0]]&]],{n,0,30}]

A129308 a(n) is the number of positive integers k such that k*(k+1) divides n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, May 26 2007

Keywords

Comments

The usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception.
In other words, a(n) is the number of oblong numbers (A002378) dividing n. - Bernard Schott, Jul 29 2022

Examples

			The divisors of 20 are 1,2,4,5,10,20. Of these there are two that are of the form k(k+1): 2 = 1*2 and 20 = 4*5. So a(2) = 2.
		

Crossrefs

Positions of 0's and 1's are A088725, whose characteristic function is A360128.
First appearance of n is A287142(n), with sorted version A328450.
The longest run of divisors of n has length A055874(n).
One less than A195155.

Programs

  • Mathematica
    a = {}; For[n = 1, n < 90, n++, k = 1; co = 0; While[k < Sqrt[n], If[IntegerQ[ n/(k*(k + 1))], co++ ]; k++ ]; AppendTo[a, co]]; a (* Stefan Steinerberger, May 27 2007 *)
    Table[Count[Differences[Divisors[n]],1],{n,30}] (* Gus Wiseman, Oct 15 2019 *)
  • PARI
    a(n)=sumdiv(n, d, n%(d+1)==0); \\ Michel Marcus, Jan 06 2015
    
  • Python
    from itertools import pairwise
    from sympy import divisors
    def A129308(n): return 0 if n&1 else sum(1 for a, b in pairwise(divisors(n)) if a+1==b) # Chai Wah Wu, Jun 09 2025

Formula

a(2n-1) = 0; a(2n) = A007862(n). - Ray Chandler, Jun 24 2008
G.f.: Sum_{n>=1} x^(n*(n+1))/(1-x^(n*(n+1))). - Joerg Arndt, Jan 30 2011 [modified by Ilya Gutkovskiy, Apr 14 2021]
a(n) = A000005(n) - A137921(n), where A137921(n) is the number of maximal runs of successive divisors of n. - Gus Wiseman, Oct 15 2019
a(n) = Sum_{d|n} A005369(d). - Ridouane Oudra, Jan 22 2021
a(n) = A195155(n)-1. - Antti Karttunen, Feb 21 2023
From Amiram Eldar, Dec 31 2023: (Start)
a(n) = A088722(n) + A059841(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. (End)

Extensions

More terms from Stefan Steinerberger, May 27 2007
Extended by Ray Chandler, Jun 24 2008

A238424 Number of partitions of n without three consecutive parts in arithmetic progression.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 13, 13, 19, 24, 30, 36, 47, 54, 72, 85, 106, 123, 151, 178, 220, 256, 314, 362, 432, 505, 605, 692, 827, 953, 1121, 1303, 1522, 1729, 2037, 2321, 2691, 3095, 3577, 4061, 4699, 5334, 6126, 6959, 7966, 9005, 10317, 11638, 13252, 14977
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 26 2014

Keywords

Comments

Also the number of partitions of n whose first differences are an anti-run, meaning there are no adjacent equal differences. - Gus Wiseman, Mar 31 2020

Examples

			The a(8) = 13 such partitions are:
01:  [ 3 2 2 1 ]
02:  [ 3 3 1 1 ]
03:  [ 3 3 2 ]
04:  [ 4 2 1 1 ]
05:  [ 4 2 2 ]
06:  [ 4 3 1 ]
07:  [ 4 4 ]
08:  [ 5 2 1 ]
09:  [ 5 3 ]
10:  [ 6 1 1 ]
11:  [ 6 2 ]
12:  [ 7 1 ]
13:  [ 8 ]
		

Crossrefs

Cf. A238433 (partitions avoiding equidistant arithmetic progressions).
Cf. A238571 (partitions avoiding any arithmetic progression).
Cf. A238687.
The version for compositions is A238423, with strict case A325849.
The version for permutations is A295370.
The strict case is A332668.
The Heinz numbers of these partitions are the complement of A333195.
Partitions with equal differences are A049988.

Programs

  • Mathematica
    a[n_,r_,d_] := a[n,r,d] = Block[{j}, If[n == 0, 1, Sum[If[j == r+d, 0, a[n-j, j, j - r]], {j, Min[n, r]}]]]; a[n_] := a[n, 2*n+1, 0]; a /@ Range[0, 100] (* Giovanni Resta, Mar 02 2014 *)
    Table[Length[Select[IntegerPartitions[n],!MemberQ[Differences[#,2],0]&]],{n,0,30}] (* Gus Wiseman, Mar 31 2020 *)
Showing 1-10 of 62 results. Next