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

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

A375735 First differences of non-prime-powers (inclusive).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 04 2024

Keywords

Comments

Inclusive means 1 is a prime-power but not a non-prime-power.
Non-prime-powers (inclusive) are listed by A024619.

Examples

			The 5th non-prime-power (inclusive) is 15, and the 6th is 18, so a(5) = 3.
		

Crossrefs

For perfect powers (A001597) we have the latter terms of A053289.
For nonprime numbers (A002808) we have the latter terms of A073783.
For squarefree numbers (A005117) we have the latter terms of A076259.
First differences of A024619.
For prime-powers (A246655) we have the latter terms of A057820.
Essentially the same as the exclusive version, A375708.
Positions of 1's are A375713(n) - 1.
For runs of non-prime-powers:
- length: A110969
- first: A373676
- last: A373677
- sum: A373678
A000040 lists all of the primes, first differences A001223.
A000961 lists prime-powers (inclusive).
A007916 lists non-perfect-powers, first differences A375706.
A013929 lists the nonsquarefree numbers, first differences A078147.
A246655 lists prime-powers (exclusive).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power anti-runs: A373576, min A120430, max A006549, length A373671.
Non-prime-power anti-runs: A373679, min A373575, max A255346, len A373672.

Programs

  • Mathematica
    Differences[Select[Range[2,100],!PrimePowerQ[#]&]]
  • Python
    from itertools import count
    from sympy import primepi, integer_nthroot, primefactors
    def A375735(n):
        def f(x): return int(n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,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 len(primefactors(i))>1)-m # Chai Wah Wu, Sep 10 2024

A323094 Number of strict integer partitions of n where no part is 2^k times any other part, for any k > 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 7, 8, 10, 12, 12, 15, 17, 20, 24, 27, 33, 35, 41, 48, 54, 61, 69, 79, 87, 101, 113, 128, 144, 159, 181, 201, 225, 251, 281, 311, 347, 388, 428, 477, 525, 579, 643, 712, 788, 868, 954, 1051, 1155, 1272, 1398, 1534, 1682, 1840, 2016
Offset: 0

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

			The a(1) = 1 through a(12) = 8 strict integer partitions (A = 10, B = 11, C = 12):
  (1)  (2)  (3)  (4)   (5)   (6)   (7)   (8)   (9)    (A)    (B)    (C)
                 (31)  (32)  (51)  (43)  (53)  (54)   (64)   (65)   (75)
                                   (52)  (62)  (72)   (73)   (74)   (93)
                                   (61)  (71)  (531)  (91)   (83)   (A2)
                                                      (532)  (92)   (B1)
                                                             (A1)   (543)
                                                             (731)  (651)
                                                                    (732)
		

Crossrefs

Programs

  • Mathematica
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&stableQ[#,IntegerQ[Log[2,#1/#2]]&]&]],{n,30}]

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

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

			The a(72) = 4 factorizations are (2*3*12), (3*24), (6*12), (72). Missing from this list and not strict are (2*2*2*3*3), (2*2*3*6), (2*6*6), (2*2*18), while missing from the list and using perfect powers are (2*36), (2*4*9), (3*4*6), (4*18), (8*9).
		

Crossrefs

Positions of 0's are A246547.
Positions of 1's are A000040.
Positions of 2's are A084227.
Positions of 3's are A085986.
Positions of 4's are A143610.

Programs

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

A323087 Number of strict factorizations of n into factors > 1 such that no factor is a power of any other factor.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

			The a(60) = 9 factorizations:
  (2*3*10), (2*5*6), (3*4*5),
  (2*30), (3*20), (4*15), (5*12), (6*10),
  (60).
		

Crossrefs

Programs

  • Mathematica
    strfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[strfacs[n/d],Min@@#>d&]],{d,Rest[Divisors[n]]}]];
    stableQ[u_,Q_]:=!Apply[Or,Outer[#1=!=#2&&Q[#1,#2]&,u,u,1],{0,1}];
    Table[Length[Select[strfacs[n],stableQ[#,IntegerQ[Log[#1,#2]]&]&]],{n,100}]

A323088 Number of strict integer partitions of n using numbers that are not perfect powers.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 1, 2, 2, 2, 3, 3, 4, 5, 5, 7, 7, 9, 11, 11, 15, 16, 18, 22, 24, 27, 32, 34, 41, 45, 51, 59, 64, 75, 82, 94, 105, 116, 132, 146, 163, 183, 202, 225, 251, 277, 309, 341, 378, 417, 463, 510, 564, 622, 685, 754, 830, 914, 1001, 1103, 1207, 1325
Offset: 0

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

			A list of all strict integer partitions using numbers that are not perfect powers begins:
   2: (2)        11: (6,3,2)    15: (13,2)       17: (12,5)
   3: (3)        12: (12)       15: (12,3)       17: (12,3,2)
   5: (5)        12: (10,2)     15: (10,5)       17: (11,6)
   5: (3,2)      12: (7,5)      15: (10,3,2)     17: (10,7)
   6: (6)        12: (7,3,2)    15: (7,6,2)      17: (10,5,2)
   7: (7)        13: (13)       15: (7,5,3)      17: (7,5,3,2)
   7: (5,2)      13: (11,2)     16: (14,2)       18: (18)
   8: (6,2)      13: (10,3)     16: (13,3)       18: (15,3)
   8: (5,3)      13: (7,6)      16: (11,5)       18: (13,5)
   9: (7,2)      13: (6,5,2)    16: (11,3,2)     18: (13,3,2)
   9: (6,3)      14: (14)       16: (10,6)       18: (12,6)
  10: (10)       14: (12,2)     16: (7,6,3)      18: (11,7)
  10: (7,3)      14: (11,3)     16: (6,5,3,2)    18: (11,5,2)
  10: (5,3,2)    14: (7,5,2)    17: (17)         18: (10,6,2)
  11: (11)       14: (6,5,3)    17: (15,2)       18: (10,5,3)
  11: (6,5)      15: (15)       17: (14,3)       18: (7,6,5)
		

Crossrefs

Programs

  • Mathematica
    perpowQ[n_]:=GCD@@FactorInteger[n][[All,2]]>1;
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&FreeQ[#,1]&&And@@Not/@perpowQ/@#&]],{n,20}]

Formula

O.g.f.: Product_{n in A007916} (1 + x^n).

A308558 Triangle read by rows where T(n,k) is the number of integer partitions of n > 0 into powers of k > 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 07 2019

Keywords

Examples

			Triangle begins:
  1
  1  2
  1  2  2
  1  4  2  2
  1  4  2  2  2
  1  6  3  2  2  2
  1  6  3  2  2  2  2
  1 10  3  3  2  2  2  2
  1 10  5  3  2  2  2  2  2
  1 14  5  3  3  2  2  2  2  2
  1 14  5  3  3  2  2  2  2  2  2
  1 20  7  4  3  3  2  2  2  2  2  2
  1 20  7  4  3  3  2  2  2  2  2  2  2
Row n = 6 counts the following partitions:
  (111111)  (42)      (33)      (411)     (51)      (6)
            (222)     (3111)    (111111)  (111111)  (111111)
            (411)     (111111)
            (2211)
            (21111)
            (111111)
		

Crossrefs

Same as A102430 except for the k = 1 column.
Row sums are A102431(n) + 1.
Column k = 2 is A018819.
Column k = 3 is A062051.

Programs

  • Mathematica
    Table[If[k==1,1,Length[Select[IntegerPartitions[n],And@@(IntegerQ[Log[k,#]]&/@#)&]]],{n,10},{k,n}]
Showing 1-7 of 7 results.