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 31 results. Next

A001227 Number of odd divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 4, 1, 2, 3, 2, 2, 4, 2, 2, 2, 3, 2, 4, 2, 2, 4, 2, 1, 4, 2, 4, 3, 2, 2, 4, 2, 2, 4, 2, 2, 6, 2, 2, 2, 3, 3, 4, 2, 2, 4, 4, 2, 4, 2, 2, 4, 2, 2, 6, 1, 4, 4, 2, 2, 4, 4, 2, 3, 2, 2, 6, 2, 4, 4, 2, 2, 5, 2, 2, 4, 4, 2, 4, 2, 2, 6, 4, 2, 4, 2, 4, 2, 2, 3, 6, 3, 2, 4, 2, 2, 8
Offset: 1

Views

Author

Keywords

Comments

Also (1) number of ways to write n as difference of two triangular numbers (A000217), see A136107; (2) number of ways to arrange n identical objects in a trapezoid. - Tom Verhoeff
Also number of partitions of n into consecutive positive integers including the trivial partition of length 1 (e.g., 9 = 2+3+4 or 4+5 or 9 so a(9)=3). (Useful for cribbage players.) See A069283. - Henry Bottomley, Apr 13 2000
This has been described as Sylvester's theorem, but to reduce ambiguity I suggest calling it Sylvester's enumeration. - Gus Wiseman, Oct 04 2022
a(n) is also the number of factors in the factorization of the Chebyshev polynomial of the first kind T_n(x). - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 28 2003
Number of factors in the factorization of the polynomial x^n+1 over the integers. See also A000005. - T. D. Noe, Apr 16 2003
a(n) = 1 if and only if n is a power of 2 (see A000079). - Lekraj Beedassy, Apr 12 2005
Number of occurrences of n in A049777. - Philippe Deléham, Jun 19 2005
For n odd, n is prime if and only if a(n) = 2. - George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Sep 10 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly once. Example: a(9)=3 because we have [3,3,2,1],[2,2,2,2,1] and [1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
Also the number of factors of the n-th Lucas polynomial. - T. D. Noe, Mar 09 2006
Lengths of rows of triangle A182469;
Denoted by Delta_0(n) in Glaisher 1907. - Michael Somos, May 17 2013
Also the number of partitions p of n into distinct parts such that max(p) - min(p) < length(p). - Clark Kimberling, Apr 18 2014
Row sums of triangle A247795. - Reinhard Zumkeller, Sep 28 2014
Row sums of triangle A237048. - Omar E. Pol, Oct 24 2014
A069288(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
a(n) is equal to the number of ways to write 2*n-1 as (4*x + 2)*y + 4*x + 1 where x and y are nonnegative integers. Also a(n) is equal to the number of distinct values of k such that k/(2*n-1) + k divides (k/(2*n-1))^(k/(2*n-1)) + k, (k/(2*n-1))^k + k/(2*n-1) and k^(k/(2*n-1)) + k/(2*n-1). - Juri-Stepan Gerasimov, May 23 2016, Jul 15 2016
Also the number of odd divisors of n*2^m for m >= 0. - Juri-Stepan Gerasimov, Jul 15 2016
a(n) is odd if and only if n is a square or twice a square. - Juri-Stepan Gerasimov, Jul 17 2016
a(n) is also the number of subparts in the symmetric representation of sigma(n). For more information see A279387 and A237593. - Omar E. Pol, Nov 05 2016
a(n) is also the number of partitions of n into an odd number of equal parts. - Omar E. Pol, May 14 2017 [This follows from the g.f. Sum_{k >= 1} x^k/(1-x^(2*k)). - N. J. A. Sloane, Dec 03 2020]

Examples

			G.f. = q + q^2 + 2*q^3 + q^4 + 2*q^5 + 2*q^6 + 2*q^7 + q^8 + 3*q^9 + 2*q^10 + ...
From _Omar E. Pol_, Nov 30 2020: (Start)
For n = 9 there are three odd divisors of 9; they are [1, 3, 9]. On the other hand there are three partitions of 9 into consecutive parts: they are [9], [5, 4] and [4, 3, 2], so a(9) = 3.
Illustration of initial terms:
                              Diagram
   n   a(n)                         _
   1     1                        _|1|
   2     1                      _|1 _|
   3     2                    _|1  |1|
   4     1                  _|1   _| |
   5     2                _|1    |1 _|
   6     2              _|1     _| |1|
   7     2            _|1      |1  | |
   8     1          _|1       _|  _| |
   9     3        _|1        |1  |1 _|
  10     2      _|1         _|   | |1|
  11     2    _|1          |1   _| | |
  12     2   |1            |   |1  | |
...
a(n) is the number of horizontal line segments in the n-th level of the diagram. For more information see A286001. (End)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 487 Entry 47.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 306.
  • J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4).
  • Ronald. L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, 2nd ed. (Addison-Wesley, 1994), see exercise 2.30 on p. 65.
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 28.

Crossrefs

If this sequence counts gapless sets by sum (by Sylvester's enumeration), these sets are ranked by A073485 and A356956. See also A055932, A066311, A073491, A107428, A137921, A333217, A356224, A356841, A356845.
Dirichlet inverse is A327276.

Programs

  • Haskell
    a001227 = sum . a247795_row
    -- Reinhard Zumkeller, Sep 28 2014, May 01 2012, Jul 25 2011
    
  • Magma
    [NumberOfDivisors(n)/Valuation(2*n, 2): n in [1..100]]; // Vincenzo Librandi, Jun 02 2019
    
  • Maple
    for n from 1 by 1 to 100 do s := 0: for d from 1 by 2 to n do if n mod d = 0 then s := s+1: fi: od: print(s); od:
    A001227 := proc(n) local a,d;
        a := 1 ;
        for d in ifactors(n)[2] do
            if op(1,d) > 2 then
                a := a*(op(2,d)+1) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    f[n_] := Block[{d = Divisors[n]}, Count[ OddQ[d], True]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Aug 27 2004 *)
    Table[Total[Mod[Divisors[n], 2]],{n,105}] (* Zak Seidov, Apr 16 2010 *)
    f[n_] := Block[{d = DivisorSigma[0, n]}, If[ OddQ@ n, d, d - DivisorSigma[0, n/2]]]; Array[f, 105] (* Robert G. Wilson v *)
    a[ n_] := Sum[  Mod[ d, 2], { d, Divisors[ n]}]; (* Michael Somos, May 17 2013 *)
    a[ n_] := DivisorSum[ n, Mod[ #, 2] &]; (* Michael Somos, May 17 2013 *)
    Count[Divisors[#],?OddQ]&/@Range[110] (* _Harvey P. Dale, Feb 15 2015 *)
    (* using a262045 from A262045 to compute a(n) = number of subparts in the symmetric representation of sigma(n) *)
    (* cl = current level, cs = current subparts count *)
    a001227[n_] := Module[{cs=0, cl=0, i, wL, k}, wL=a262045[n]; k=Length[wL]; For[i=1, i<=k, i++, If[wL[[i]]>cl, cs++; cl++]; If[wL[[i]]Hartmut F. W. Hoft, Dec 16 2016 *)
    a[n_] := DivisorSigma[0, n / 2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jun 12 2022 *)
  • PARI
    {a(n) = sumdiv(n, d, d%2)}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    {a(n) = direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( 4, p) * X))[n]}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    a(n)=numdiv(n>>valuation(n,2)) \\ Charles R Greathouse IV, Mar 16 2011
    
  • PARI
    a(n)=sum(k=1,round(solve(x=1,n,x*(x+1)/2-n)),(k^2-k+2*n)%(2*k)==0) \\ Charles R Greathouse IV, May 31 2013
    
  • PARI
    a(n)=sumdivmult(n,d,d%2) \\ Charles R Greathouse IV, Aug 29 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import factorint
    def A001227(n): return reduce(mul,(q+1 for p, q in factorint(n).items() if p > 2),1) # Chai Wah Wu, Mar 08 2021
  • SageMath
    def A001227(n): return len([1 for d in divisors(n) if is_odd(d)])
    [A001227(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

Dirichlet g.f.: zeta(s)^2*(1-1/2^s).
Comment from N. J. A. Sloane, Dec 02 2020: (Start)
By counting the odd divisors f n in different ways, we get three different ways of writing the ordinary generating function. It is:
A(x) = x + x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8 + 3*x^9 + 2*x^10 + ...
= Sum_{k >= 1} x^(2*k-1)/(1-x^(2*k-1))
= Sum_{k >= 1} x^k/(1-x^(2*k))
= Sum_{k >= 1} x^(k*(k+1)/2)/(1-x^k) [Ramanujan, 2nd notebook, p. 355.].
(This incorporates comments from Vladeta Jovovic, Oct 16 2002 and Michael Somos, Oct 30 2005.) (End)
G.f.: x/(1-x) + Sum_{n>=1} x^(3*n)/(1-x^(2*n)), also L(x)-L(x^2) where L(x) = Sum_{n>=1} x^n/(1-x^n). - Joerg Arndt, Nov 06 2010
a(n) = A000005(n)/(A007814(n)+1) = A000005(n)/A001511(n).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p > 2. - David W. Wilson, Aug 01 2001
a(n) = A000005(A000265(n)). - Lekraj Beedassy, Jan 07 2005
Moebius transform is period 2 sequence [1, 0, ...] = A000035, which means a(n) is the Dirichlet convolution of A000035 and A057427.
a(n) = A113414(2*n). - N. J. A. Sloane, Jan 24 2006 (corrected Nov 10 2007)
a(n) = A001826(n) + A001842(n). - Reinhard Zumkeller, Apr 18 2006
Sequence = M*V = A115369 * A000005, where M = an infinite lower triangular matrix and V = A000005, d(n); as a vector: [1, 2, 2, 3, 2, 4, ...]. - Gary W. Adamson, Apr 15 2007
Equals A051731 * [1,0,1,0,1,...]; where A051731 is the inverse Mobius transform. - Gary W. Adamson, Nov 06 2007
a(n) = A000005(n) - A183063(n).
a(n) = d(n) if n is odd, or d(n) - d(n/2) if n is even, where d(n) is the number of divisors of n (A000005). (See the Weisstein page.) - Gary W. Adamson, Mar 15 2011
Dirichlet convolution of A000005 and A154955 (interpreted as a flat sequence). - R. J. Mathar, Jun 28 2011
a(A000079(n)) = 1; a(A057716(n)) > 1; a(A093641(n)) <= 2; a(A038550(n)) = 2; a(A105441(n)) > 2; a(A072502(n)) = 3. - Reinhard Zumkeller, May 01 2012
a(n) = 1 + A069283(n). - R. J. Mathar, Jun 18 2015
a(A002110(n)/2) = n, n >= 1. - Altug Alkan, Sep 29 2015
a(n*2^m) = a(n*2^i), a((2*j+1)^n) = n+1 for m >= 0, i >= 0 and j >= 0. a((2*x+1)^n) = a((2*y+1)^n) for positive x and y. - Juri-Stepan Gerasimov, Jul 17 2016
Conjectures: a(n) = A067742(n) + 2*A131576(n) = A082647(n) + A131576(n). - Omar E. Pol, Feb 15 2017
a(n) = A000005(2n) - A000005(n) = A099777(n)-A000005(n). - Danny Rorabaugh, Oct 03 2017
L.g.f.: -log(Product_{k>=1} (1 - x^(2*k-1))^(1/(2*k-1))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
G.f.: (psi_{q^2}(1/2) + log(1-q^2))/log(q), where psi_q(z) is the q-digamma function. - Michael Somos, Jun 01 2019
a(n) = A003056(n) - A238005(n). - Omar E. Pol, Sep 12 2021
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma + log(2)/2 - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = log(2) (A002162). - Amiram Eldar, Mar 01 2023
a(n) = Sum_{i=1..n} (-1)^(i+1)*A135539(n,i). - Ridouane Oudra, Apr 13 2023

A356233 Number of integer factorizations of n into gapless numbers (A066311).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 1, 4, 1, 1, 2, 5, 1, 4, 1, 2, 1, 1, 1, 7, 2, 1, 3, 2, 1, 4, 1, 7, 1, 1, 2, 9, 1, 1, 1, 3, 1, 2, 1, 2, 4, 1, 1, 12, 2, 2, 1, 2, 1, 7, 1, 3, 1, 1, 1, 8, 1, 1, 2, 11, 1, 2, 1, 2, 1, 2, 1, 16, 1, 1, 4, 2, 2, 2, 1, 5, 5, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. We define a number to be gapless (listed by A066311) iff its prime indices cover an interval of positive integers.

Examples

			The counted factorizations of n = 2, 4, 8, 12, 24, 36, 48:
  (2)  (4)    (8)      (12)     (24)       (36)       (48)
       (2*2)  (2*4)    (2*6)    (3*8)      (4*9)      (6*8)
              (2*2*2)  (3*4)    (4*6)      (6*6)      (2*24)
                       (2*2*3)  (2*12)     (2*18)     (3*16)
                                (2*2*6)    (3*12)     (4*12)
                                (2*3*4)    (2*2*9)    (2*3*8)
                                (2*2*2*3)  (2*3*6)    (2*4*6)
                                           (3*3*4)    (3*4*4)
                                           (2*2*3*3)  (2*2*12)
                                                      (2*2*2*6)
                                                      (2*2*3*4)
                                                      (2*2*2*2*3)
		

Crossrefs

The shortest of these factorizations is listed at A356234, length A287170.
A000005 counts divisors.
A001055 counts factorizations.
A001221 counts distinct prime factors, sum A001414.
A003963 multiplies together the prime indices.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).
A356226 lists the lengths of maximal gapless submultisets of prime indices:
- length: A287170
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356232

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    sqq[n_]:=Max@@Differences[primeMS[n]]<=1;
    Table[Length[Select[facs[n],And@@sqq/@#&]],{n,100}]

A107428 Number of gap-free compositions of n.

Original entry on oeis.org

1, 2, 4, 6, 11, 21, 39, 71, 141, 276, 542, 1070, 2110, 4189, 8351, 16618, 33134, 66129, 131937, 263483, 526453, 1051984, 2102582, 4203177, 8403116, 16800894, 33593742, 67174863, 134328816, 268624026, 537192064, 1074288649, 2148414285, 4296543181, 8592585289
Offset: 1

Views

Author

N. J. A. Sloane, May 26 2005

Keywords

Comments

A gap-free composition contains all the parts between its smallest and largest part. a(5)=11 because we have: 5, 3+2, 2+3, 2+2+1, 2+1+2, 1+2+2, 2+1+1+1, 1+2+1+1, 1+1+2+1, 1+1+1+2, 1+1+1+1+1. - Geoffrey Critzer, Apr 13 2014

Examples

			From _Gus Wiseman_, Oct 04 2022: (Start)
The a(0) = 1 through a(5) = 11 gap-free compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (22)    (23)
                 (21)   (112)   (32)
                 (111)  (121)   (122)
                        (211)   (212)
                        (1111)  (221)
                                (1112)
                                (1121)
                                (1211)
                                (2111)
                                (11111)
(End)
		

Crossrefs

The unordered version (partitions) is A034296, ranked by A073491.
The initial case is A107429, unordered A000009, ranked by A333217.
The unordered complement is counted by A239955, ranked by A073492.
These compositions are ranked by A356841.
The complement is counted by A356846, ranked by A356842
A356230 ranks gapless factorization lengths, firsts A356603.
A356233 counts factorizations into gapless numbers.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, t!,
          `if`(i<1 or n add(b(n, i, 0), i=1..n):
    seq(a(n), n=1..40);  # Alois P. Heinz, Apr 14 2014
  • Mathematica
    Table[Length[Select[Level[Map[Permutations,IntegerPartitions[n]],{2}],Length[Union[#]]==Max[#]-Min[#]+1&]],{n,1,20}] (* Geoffrey Critzer, Apr 13 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, t!, If[i < 1 || n < i, 0, Sum[b[n - i*j, i - 1, t + j]/j!, {j, 1, n/i}]]]; a[n_] := Sum[b[n, i, 0], {i, 1, n}]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)

Formula

a(n) ~ 2^(n-2). - Alois P. Heinz, Dec 07 2014
G.f.: Sum_{j>0} Sum_{k>=j} C({j..k},x) where C({s},x) = Sum_{i in {s}} (C({s}-{i},x)*x^i)/(1 - Sum_{i in {s}} (x^i)) is the g.f. for compositions such that the set of parts equals {s} with C({},x) = 1. - John Tyler Rascoe, Jun 01 2024

Extensions

More terms from Vladeta Jovovic, May 26 2005

A356226 Irregular triangle giving the lengths of maximal gapless submultisets of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 10 2022

Keywords

Comments

A sequence is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			Triangle  begins: {}, {1}, {1}, {2}, {1}, {2}, {1}, {3}, {2}, {1,1}, {1}, {3}, {1}, {1,1}, {2}, {4}, {1}, {3}, {1}, {2,1}, ... For example, the prime indices of 20 are {1,1,3}, which separates into maximal gapless submultisets {{1,1},{3}}, so row 20 is (2,1).
The prime indices of 18564 are {1,1,2,4,6,7}, which separates into {1,1,2}, {4}, {6,7}, so row 18564 is (3,1,2). This corresponds to the factorization 18564 = 12 * 7 * 221.
		

Crossrefs

Row sums are A001222.
Singleton row positions are A073491, complement A073492.
Length-2,3,4 row positions are A073493-A073495.
Row lengths are A287170, firsts A066205.
Row minima are A356227.
Row maxima are A356228.
Bisected run-lengths are A356229.
Standard composition numbers of rows are A356230.
Heinz numbers of rows are A356231.
Positions of first appearances are A356232.
A001221 counts distinct prime factors, with sum A001414.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length/@Split[primeMS[n],#1>=#2-1&],{n,100}]

A356225 Number of divisors of n whose prime indices do not cover an initial interval of positive integers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 13 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(70) = 6 divisors: 5, 7, 10, 14, 35, 70.
		

Crossrefs

These divisors belong to the complement of A055932, a subset of A073491.
These divisors belong to A080259, a superset of A073492.
The complement is counted by A356224.
A001223 lists the prime gaps.
A328338 has third-largest divisor prime, smallest A119313.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
    Table[Length[Select[Divisors[n],!normQ[primeMS[#]]&]],{n,100}]

Formula

a(n) = A000005(n) - A356224(n).

A356230 The a(n)-th composition in standard order is the sequence of lengths of maximal gapless submultisets of the prime indices of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 2, 3, 1, 4, 1, 3, 2, 8, 1, 4, 1, 5, 3, 3, 1, 8, 2, 3, 4, 5, 1, 4, 1, 16, 3, 3, 2, 8, 1, 3, 3, 9, 1, 5, 1, 5, 4, 3, 1, 16, 2, 6, 3, 5, 1, 8, 3, 9, 3, 3, 1, 8, 1, 3, 5, 32, 3, 5, 1, 5, 3, 6, 1, 16, 1, 3, 4, 5, 2, 5, 1, 17, 8, 3, 1, 9, 3
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, 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. This gives a bijective correspondence between nonnegative integers and integer compositions.
A multiset is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 18564 are {1,1,2,4,6,7}, with maximal gapless submultisets {1,1,2}, {4}, {6,7}. These have lengths (3,1,2), which is the 38th composition in standard order, so a(18564) = 38.
		

Crossrefs

Numbers grouped by number of gaps in prime indices are A073491-A073495.
These are the standard composition numbers of rows of A356226.
Using Heinz numbers instead of standard compositions gives A356231.
Positions of first appearances are A356603, sorted A356232.
A001221 counts distinct prime factors, with sum A001414.
A003963 multiplies together the prime indices.
A056239 adds up the prime indices, row sums of A112798.
A066099 lists compositions in standard order.
A132747 counts non-isolated divisors, complement A132881.
A333627 represents the run-lengths of standard compositions.
A356069 counts gapless divisors, initial A356224 (complement A356225).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[Length/@Split[primeMS[n],#1>=#2-1&]],{n,100}]

Formula

A000120(a(n)) = A287170(n).
A333766(a(n)) = A356228(n).
A333768(a(n)) = A356227(n).

A356232 Numbers whose prime indices are all odd and cover an initial interval of odd positive integers.

Original entry on oeis.org

1, 2, 4, 8, 10, 16, 20, 32, 40, 50, 64, 80, 100, 110, 128, 160, 200, 220, 250, 256, 320, 400, 440, 500, 512, 550, 640, 800, 880, 1000, 1024, 1100, 1210, 1250, 1280, 1600, 1760, 1870, 2000, 2048, 2200, 2420, 2500, 2560, 2750, 3200, 3520, 3740, 4000, 4096, 4400
Offset: 1

Views

Author

Gus Wiseman, Aug 20 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Also positions of first appearances of rows in A356226.

Examples

			The terms together with their prime indices begin:
      1: {}
      2: {1}
      4: {1,1}
      8: {1,1,1}
     10: {1,3}
     16: {1,1,1,1}
     20: {1,1,3}
     32: {1,1,1,1,1}
     40: {1,1,1,3}
     50: {1,3,3}
     64: {1,1,1,1,1,1}
     80: {1,1,1,1,3}
    100: {1,1,3,3}
    110: {1,3,5}
    128: {1,1,1,1,1,1,1}
    160: {1,1,1,1,1,3}
    200: {1,1,1,3,3}
    220: {1,1,3,5}
    250: {1,3,3,3}
    256: {1,1,1,1,1,1,1,1}
    320: {1,1,1,1,1,1,3}
    400: {1,1,1,1,3,3}
		

Crossrefs

The partitions with these Heinz numbers are counted by A053251.
This is the odd restriction of A055932.
A subset of A066208 (numbers with all odd prime indices).
This is the sorted version of A356603.
These are the positions of first appearances of rows in A356226. Other statistics are:
- length: A287170, firsts A066205
- minimum: A356227
- maximum: A356228
- bisected length: A356229
- standard composition: A356230
- Heinz number: A356231
- positions of first appearances: A356232 (this sequence)
A001221 counts distinct prime factors, with sum A001414.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices.
A056239 adds up the prime indices, row sums of A112798.
A073491 lists numbers with gapless prime indices, complement A073492.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Select[Range[1000],normQ[(primeMS[#]+1)/2]&]

A356237 Heinz numbers of integer partitions with a neighborless singleton.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 13, 14, 17, 19, 20, 21, 22, 23, 26, 28, 29, 31, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 76, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93
Offset: 1

Views

Author

Gus Wiseman, Aug 24 2022

Keywords

Comments

A part x is neighborless if neither x - 1 nor x + 1 are parts, and a singleton if it appears only once.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
Also numbers that, for some prime index x, are not divisible by prime(x)^2, prime(x - 1), or prime(x + 1). Here, a prime index of n is a number m such that prime(m) divides n.

Examples

			The terms together with their prime indices begin:
   2: {1}
   3: {2}
   5: {3}
   7: {4}
  10: {1,3}
  11: {5}
  13: {6}
  14: {1,4}
  17: {7}
  19: {8}
  20: {1,1,3}
  21: {2,4}
  22: {1,5}
  23: {9}
  26: {1,6}
  28: {1,1,4}
		

Crossrefs

The complement is counted by A355393.
These partitions are counted by A356235.
Not requiring a singleton gives A356734.
A001221 counts distinct prime factors, with sum A001414.
A003963 multiplies together the prime indices of n.
A007690 counts partitions with no singletons, complement A183558.
A056239 adds up prime indices, row sums of A112798, lengths A001222.
A073491 lists numbers with gapless prime indices, complement A073492.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).
A356236 counts partitions with a neighborless part, complement A355394.
A356607 counts strict partitions w/ a neighborless part, complement A356606.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Function[ptn,Or@@Table[Count[ptn,x]==1&&!MemberQ[ptn,x-1]&&!MemberQ[ptn,x+1],{x,Union[ptn]}]]@*primeMS]

A356231 Heinz number of the sequence (A356226) of lengths of maximal gapless submultisets of the prime indices of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 5, 3, 4, 2, 5, 2, 4, 3, 7, 2, 5, 2, 6, 4, 4, 2, 7, 3, 4, 5, 6, 2, 5, 2, 11, 4, 4, 3, 7, 2, 4, 4, 10, 2, 6, 2, 6, 5, 4, 2, 11, 3, 6, 4, 6, 2, 7, 4, 10, 4, 4, 2, 7, 2, 4, 6, 13, 4, 6, 2, 6, 4, 6, 2, 11, 2, 4, 5, 6, 3, 6, 2, 14, 7, 4, 2, 10
Offset: 1

Views

Author

Gus Wiseman, Aug 18 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
A multiset is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 18564 are {1,1,2,4,6,7}, with maximal gapless submultisets {1,1,2}, {4}, {6,7}. These have lengths (3,1,2), with Heinz number 30, so a(18564) = 30.
		

Crossrefs

Positions of prime terms are A073491, complement A073492.
Positions of terms with bigomega 2-4 are A073493-A073495.
Applying bigomega gives A287170, firsts A066205, even bisection A356229.
These are the Heinz numbers of the rows of A356226.
Minimal/maximal prime indices are A356227/A356228.
A version for standard compositions is A356230, firsts A356232/A356603.
A001221 counts distinct prime factors, with sum A001414.
A003963 multiplies together the prime indices.
A056239 adds up the prime indices, row sums of A112798.
A132747 counts non-isolated divisors, complement A132881.
A356069 counts gapless divisors, initial A356224 (complement A356225).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@Prime/@Length/@Split[primeMS[n],#1>=#2-1&],{n,100}]

Formula

A001222(a(n)) = A287170(n).
A055396(a(n)) = A356227(n).
A061395(a(n)) = A356228(n).

A356069 Number of divisors of n whose prime indices cover an interval of positive integers (A073491).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 28 2022

Keywords

Comments

First differs from A000005 at 10, 14, 20, 21, 22, ... = A307516.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(n) counted divisors of n = 1, 2, 4, 6, 12, 16, 24, 30, 36, 48, 72, 90:
  1   2   4   6  12  16  24  30  36  48  72  90
      1   2   3   6   8  12  15  18  24  36  45
          1   2   4   4   8   6  12  16  24  30
              1   3   2   6   5   9  12  18  18
                  2   1   4   3   6   8  12  15
                  1       3   2   4   6   9   9
                          2   1   3   4   8   6
                          1       2   3   6   5
                                  1   2   4   3
                                      1   3   2
                                          2   1
                                          1
		

Crossrefs

These divisors belong to A073491, a superset of A055932, complement A073492.
The initial case is A356224.
The complement in the initial case is counted by A356225.
A000005 counts divisors.
A001223 lists the prime gaps.
A056239 adds up prime indices, row sums of A112798, lengths A001222.
A328338 has third-largest divisor prime.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
    Table[Length[Select[Divisors[n],nogapQ[primeMS[#]]&]],{n,100}]
Showing 1-10 of 31 results. Next