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

A375706 First differences of non-perfect-powers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 31 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers without a proper integer root.

Examples

			The 5th non-perfect-power is 7, and the 6th is 10, so a(5) = 3.
		

Crossrefs

For prime-powers (A000961) we have A057820.
For perfect powers (A001597) we have A053289.
For nonprime numbers (A002808) we have A073783.
For squarefree numbers (A005117) we have A076259.
First differences of A007916.
For nonsquarefree numbers (A013929) we have A078147.
For non-prime-powers (A024619) we have A375708.
Positions of 1s are A375740, complement A375714.
Runs of non-perfect-powers:
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ]]
  • PARI
    up_to = 112;
    A375706list(up_to) = { my(v=vector(up_to), pk=2, k=2, i=0); while(i<#v, k++; if(!ispower(k), i++; v[i] = k-pk; pk = k)); (v); };
    v375706 = A375706list(up_to);
    A375706(n) = v375706[n]; \\ Antti Karttunen, Jan 19 2025
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A375706(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return next(i for i in count(m+1) if not perfect_power(i))-m # Chai Wah Wu, Sep 09 2024
    

Formula

a(n) = A007916(n+1) - A007916(n).

Extensions

More terms from Antti Karttunen, Jan 19 2025

A294068 Number of factorizations of n using perfect powers (elements of A001597) other than 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
Offset: 1

Views

Author

Gus Wiseman, May 05 2018

Keywords

Examples

			The a(1152) = 7 factorizations are (4*4*8*9), (4*8*36), (4*9*32), (8*9*16), (8*144), (9*128), (32*36).
		

Crossrefs

Programs

  • Maple
    ispp:= proc(n) local F;
      F:= ifactors(n)[2];
      igcd(op(map(t -> t[2],F)))>1
    end proc:
    f:= proc(n) local F, np, Q;
      F:= map(t -> t[2], ifactors(n)[2]);
      np:= mul(ithprime(i)^F[i],i=1..nops(F));
      Q:= select(ispp, numtheory:-divisors(np));
      G(Q,np)
    end proc:
    G:= proc(Q,n) option remember; local q,t,k;
        if not numtheory:-factorset(n) subset `union`(seq(numtheory:-factorset(q),q=Q)) then return 0 fi;
        q:= Q[1]; t:= 0;
        for k from 0 while n mod q^k = 0 do
          t:= t + procname(Q[2..-1],n/q^k)
        od;
        t
    end proc:
    G({},1):= 1:
    map(f, [$1..200]); # Robert Israel, May 06 2018
  • Mathematica
    ppQ[n_]:=And[n>1,GCD@@FactorInteger[n][[All,2]]>1];
    facsp[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsp[n/d],Min@@#>=d&]],{d,Select[Divisors[n],ppQ]}]];
    Table[Length[facsp[n]],{n,100}]

A336424 Number of factorizations of n where each factor belongs to A130091 (numbers with distinct prime multiplicities).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 3, 1, 1, 1, 5, 2, 1, 3, 3, 1, 1, 1, 7, 1, 1, 1, 6, 1, 1, 1, 5, 1, 1, 1, 3, 3, 1, 1, 9, 2, 3, 1, 3, 1, 5, 1, 5, 1, 1, 1, 4, 1, 1, 3, 11, 1, 1, 1, 3, 1, 1, 1, 11, 1, 1, 3, 3, 1, 1, 1, 9, 5, 1, 1, 4, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 03 2020

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization, so a number has distinct prime multiplicities iff all the exponents in its prime signature are distinct.

Examples

			The a(n) factorizations for n = 2, 4, 8, 60, 16, 36, 32, 48:
  2  4    8      5*12     16       4*9      32         48
     2*2  2*4    3*20     4*4      3*12     4*8        4*12
          2*2*2  3*4*5    2*8      3*3*4    2*16       3*16
                 2*2*3*5  2*2*4    2*18     2*4*4      3*4*4
                          2*2*2*2  2*2*9    2*2*8      2*24
                                   2*2*3*3  2*2*2*4    2*3*8
                                            2*2*2*2*2  2*2*12
                                                       2*2*3*4
                                                       2*2*2*2*3
		

Crossrefs

A327523 is the case when n is restricted to belong to A130091 also.
A001055 counts factorizations.
A007425 counts divisors of divisors.
A045778 counts strict factorizations.
A074206 counts ordered factorizations.
A130091 lists numbers with distinct prime multiplicities.
A181796 counts divisors with distinct prime multiplicities.
A253249 counts nonempty chains of divisors.
A281116 counts factorizations with no common divisor.
A302696 lists numbers whose prime indices are pairwise coprime.
A305149 counts stable factorizations.
A320439 counts factorizations using A289509.
A327498 gives the maximum divisor with distinct prime multiplicities.
A336500 counts divisors of n in A130091 with quotient also in A130091.
A336568 = not a product of two numbers with distinct prime multiplicities.
A336569 counts maximal chains of elements of A130091.
A337256 counts chains of divisors.

Programs

  • Mathematica
    facsusing[s_,n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsusing[Select[s,Divisible[n/d,#]&],n/d],Min@@#>=d&]],{d,Select[s,Divisible[n,#]&]}]];
    Table[Length[facsusing[Select[Range[2,n],UnsameQ@@Last/@FactorInteger[#]&],n]],{n,100}]

A320813 Number of non-isomorphic multiset partitions of an aperiodic multiset of weight n such that there are no singletons and all parts are themselves aperiodic multisets.

Original entry on oeis.org

1, 0, 1, 2, 5, 13, 33, 104, 293, 938, 2892
Offset: 0

Views

Author

Gus Wiseman, Nov 08 2018

Keywords

Comments

Also the number of nonnegative integer matrices up to row and column permutations with sum of elements equal to n and no zero rows or columns, in which (1) the row sums are all > 1, (2) the positive entries in each row are relatively prime, and (3) the column-sums are relatively prime.
A multiset is aperiodic if its multiplicities are relatively prime.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(2) = 1 through a(5) = 13 multiset partitions:
  {{1,2}}  {{1,2,2}}  {{1,2,2,2}}    {{1,1,2,2,2}}
           {{1,2,3}}  {{1,2,3,3}}    {{1,2,2,2,2}}
                      {{1,2,3,4}}    {{1,2,2,3,3}}
                      {{1,2},{3,4}}  {{1,2,3,3,3}}
                      {{1,3},{2,3}}  {{1,2,3,4,4}}
                                     {{1,2,3,4,5}}
                                     {{1,2},{1,2,2}}
                                     {{1,2},{2,3,3}}
                                     {{1,2},{3,4,4}}
                                     {{1,2},{3,4,5}}
                                     {{1,3},{2,3,3}}
                                     {{1,4},{2,3,4}}
                                     {{2,3},{1,2,3}}
		

Crossrefs

This is the case of A320804 where the underlying multiset is aperiodic.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mpm[n_]:=Join@@Table[Union[Sort[Sort /@ (#/.x_Integer:>s[[x]])]&/@sps[Range[n]]],{s,Flatten[MapIndexed[Table[#2,{#1}]&,#]]& /@ IntegerPartitions[n]}];
    brute[m_]:=First[Sort[Table[Sort[Sort /@ (m/.Rule@@@Table[{i,p[[i]]},{i,Length[p]}])], {p,Permutations[Union@@m]}]]];
    aperQ[m_]:=Length[m]==0||GCD@@Length/@Split[Sort[m]]==1;
    Table[Length[Union[brute /@ Select[mpm[n],And[Min@@Length/@#>1,aperQ[Join@@#]&&And@@aperQ /@ #]&]]],{n,0,7}] (* Gus Wiseman, Jan 19 2024 *)

Extensions

Definition corrected by Gus Wiseman, Jan 19 2024

A303708 Number of aperiodic factorizations of n using elements of A007916 (numbers that are not perfect powers).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 29 2018

Keywords

Comments

An aperiodic factorization of n is a finite multiset of positive integers greater than 1 whose product is n and whose multiplicities are relatively prime.
The positions of zeros in this sequence are the prime powers A000961.

Examples

			The a(144) = 8 aperiodic factorizations are (2*2*2*3*6), (2*2*2*18), (2*2*3*12), (2*3*24), (2*6*12), (2*72), (3*48) and (6*24). Missing from this list are (12*12), (2*2*6*6) and (2*2*2*2*3*3).
		

Crossrefs

Programs

  • Mathematica
    radQ[n_]:=Or[n===1,GCD@@FactorInteger[n][[All,2]]===1];
    facsr[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsr[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],radQ]}]];
    Table[Length[Select[facsr[n],GCD@@Length/@Split[#]===1&]],{n,100}]

Formula

a(n) = Sum_{d in A007916, d|A052409(n)} mu(d) * A303707(n^(1/d)).

A304326 Number of ways to write n as a product of a number that is not a perfect power and a squarefree number.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 10 2018

Keywords

Examples

			The a(180) = 7 ways are (6*30), (12*15), (18*10), (30*6), (60*3), (90*2), (180*1).
		

Crossrefs

Positions of zeros are A246549. Range appears to be A075427.

Programs

  • Mathematica
    radQ[n_]:=And[n>1,GCD@@FactorInteger[n][[All,2]]===1];
    Table[Length[Select[Divisors[n],radQ[#]&&SquareFreeQ[n/#]&]],{n,100}]
  • PARI
    a(n)={sumdiv(n, d, d<>1 && !ispower(d) && issquarefree(n/d))} \\ Andrew Howroyd, Aug 26 2018

A305630 Expansion of Product_{r = 1 or not a perfect power} 1/(1 - x^r).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 12, 16, 21, 28, 36, 48, 61, 78, 99, 124, 156, 195, 241, 299, 367, 450, 549, 670, 811, 982, 1183, 1422, 1704, 2040, 2431, 2894, 3435, 4070, 4811, 5679, 6684, 7858, 9217, 10797, 12623, 14738, 17174, 19988, 23225, 26951, 31227, 36141, 41759
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Comments

a(n) is the number of integer partitions of n such that each part is either 1 or not a perfect power (A001597, A007916).

Examples

			The a(5) = 6 integer partitions whose parts are 1's or not perfect powers are (5), (32), (311), (221), (2111), (11111).
		

Crossrefs

Programs

  • Maple
    q:= n-> is(n=1 or 1=igcd(map(i-> i[2], ifactors(n)[2])[])):
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(q(d), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 07 2018
  • Mathematica
    nn=20;
    radQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]==1];
    ser=Product[1/(1-x^p),{p,Select[Range[nn],radQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,0,nn}]

A305631 Expansion of Product_{r not a perfect power} 1/(1 - x^r).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 3, 4, 5, 7, 8, 12, 13, 17, 21, 25, 32, 39, 46, 58, 68, 83, 99, 121, 141, 171, 201, 239, 282, 336, 391, 463, 541, 635, 741, 868, 1005, 1174, 1359, 1580, 1826, 2115, 2436, 2814, 3237, 3726, 4276, 4914, 5618, 6445, 7359, 8414, 9594, 10947, 12453
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Comments

a(n) is the number of integer partitions of n whose parts are not perfect powers (A001597, A007916).

Examples

			The a(9) = 5 integer partitions whose parts are not perfect powers are (72), (63), (522), (333), (3222).
		

Crossrefs

Programs

  • Maple
    q:= n-> is(1=igcd(map(i-> i[2], ifactors(n)[2])[])):
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(q(d), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 07 2018
  • Mathematica
    nn=100;
    wadQ[n_]:=n>1&&GCD@@FactorInteger[n][[All,2]]==1;
    ser=Product[1/(1-x^p),{p,Select[Range[nn],wadQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,0,nn}]

A303709 Number of periodic factorizations of n using elements of A007916 (numbers that are not perfect powers).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 29 2018

Keywords

Comments

A periodic factorization of n is a finite multiset of positive integers greater than 1 whose product is n and whose multiplicities have a common divisor greater than 1. Note that a factorization of a number that is not a perfect power (A007916) is always aperiodic (A303386), so the indices of nonzero entries of this sequence all lie at perfect powers (A001597).

Examples

			The a(900) = 5 periodic factorizations are (2*2*3*3*5*5), (2*2*15*15), (3*3*10*10), (5*5*6*6), (30*30).
		

Crossrefs

Programs

  • Mathematica
    radQ[n_]:=Or[n===1,GCD@@FactorInteger[n][[All,2]]===1];
    facsr[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facsr[n/d],Min@@#>=d&]],{d,Select[Rest[Divisors[n]],radQ]}]];
    Table[Length[Select[facsr[n],GCD@@Length/@Split[#]!=1&]],{n,200}]
  • PARI
    gcd_of_multiplicities(lista) = { my(u=length(lista)); if(u<2, u, my(g=0, pe = lista[1], j=1); for(i=2,u,if(lista[i]==pe, j++, g = gcd(j,g); j=1; pe = lista[i])); gcd(g,j)); }; \\ the supplied lista (newfacs) should be monotonic
    A303709(n, m=n, facs=List([])) = if(1==n, (1!=gcd_of_multiplicities(facs)), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m)&&!ispower(d), newfacs = List(facs); listput(newfacs,d); s += A303709(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Dec 06 2018

Formula

a(n) <= A303553(n) <= A001055(n). - Antti Karttunen, Dec 06 2018

Extensions

Changed a(1) to 1 by Gus Wiseman, Dec 06 2018

A320804 Number of non-isomorphic multiset partitions of weight n with no singletons in which all parts are aperiodic multisets.

Original entry on oeis.org

1, 0, 1, 2, 6, 13, 41, 104, 326, 958, 3096, 9958, 33869, 116806, 417741, 1526499, 5732931, 22015642, 86543717, 347495480, 1424832602, 5959123908, 25407212843, 110344848622, 487879651220, 2194697288628, 10039367091586, 46675057440634, 220447539120814
Offset: 0

Views

Author

Gus Wiseman, Nov 06 2018

Keywords

Comments

Also the number of nonnegative integer matrices with (1) sum of elements equal to n, (2) no zero columns, (3) no rows summing to 0 or 1, and (4) no rows whose nonzero entries have a common divisor > 1, up to row and column permutations.
A multiset is aperiodic if its multiplicities are relatively prime.
The weight of a multiset partition is the sum of sizes of its parts. Weight is generally not the same as number of vertices.

Examples

			Non-isomorphic representatives of the a(2) = 1 through a(5) = 13 multiset partitions with aperiodic parts and no singletons:
  {{1,2}}  {{1,2,2}}  {{1,2,2,2}}    {{1,1,2,2,2}}
           {{1,2,3}}  {{1,2,3,3}}    {{1,2,2,2,2}}
                      {{1,2,3,4}}    {{1,2,2,3,3}}
                      {{1,2},{1,2}}  {{1,2,3,3,3}}
                      {{1,2},{3,4}}  {{1,2,3,4,4}}
                      {{1,3},{2,3}}  {{1,2,3,4,5}}
                                     {{1,2},{1,2,2}}
                                     {{1,2},{2,3,3}}
                                     {{1,2},{3,4,4}}
                                     {{1,2},{3,4,5}}
                                     {{1,3},{2,3,3}}
                                     {{1,4},{2,3,4}}
                                     {{2,3},{1,2,3}}
		

Crossrefs

Programs

  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    K(q, t, k)={EulerT(Vec(sum(j=1, #q, gcd(t, q[j])*x^lcm(t, q[j])) + O(x*x^k), -k))}
    S(q, t, k)={Vec(sum(j=1, #q, if(t%q[j]==0, q[j]*x^t))  + O(x*x^k), -k)}
    a(n)={if(n==0, 1, my(mbt=vector(n, d, moebius(d)), s=0); forpart(q=n, s+=permcount(q)*polcoef(exp(x*Ser(dirmul(mbt, sum(t=1, n, K(q, t, n)/t)) - sum(t=1, n, S(q, t, n)/t) )), n)); s/n!)} \\ Andrew Howroyd, Jan 16 2023

Extensions

Terms a(11) and beyond from Andrew Howroyd, Jan 16 2023
Showing 1-10 of 31 results. Next