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 10 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

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}]

A376268 Sorted positions of first appearances in the first differences (A053289) of perfect-powers (A001597).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 16, 17, 18, 19, 21, 23, 24, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

Examples

			The perfect powers (A001597) are:
  1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
  3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, ...
with positions of first appearances (A376268):
  1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 16, 17, 18, 19, 21, 23, 24, 27, 28, 29, ...
		

Crossrefs

These are the sorted positions of first appearances in A053289 (union A023055).
The complement is A376519.
A053707 lists first differences of consecutive prime-powers.
A333254 lists run-lengths of differences between consecutive primes.
Other families of numbers and their first differences:
For prime numbers (A000040) we have A001223.
For composite numbers (A002808) we have A073783.
For nonprime numbers (A018252) we have A065310.
For perfect powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
For squarefree numbers (A005117) we have A076259.
For nonsquarefree numbers (A013929) we have A078147.
For prime-powers inclusive (A000961) we have A057820.
For prime-powers exclusive (A246655) we have A057820(>1).
For non-prime-powers inclusive (A024619) we have A375735.
For non-prime-powers exclusive (A361102) we have A375708.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    q=Differences[Select[Range[1000],perpowQ]];
    Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]

A376519 Positions of terms not appearing for the first time in the first differences (A053289) of perfect-powers (A001597).

Original entry on oeis.org

8, 14, 15, 20, 22, 25, 26, 31, 40, 46, 52, 59, 68, 75, 88, 96, 102, 110, 111, 112, 114, 128, 136, 144, 145, 162, 180, 188, 198, 216, 226, 235, 246, 264, 265, 275, 285, 295, 305, 316, 317, 325, 328, 338, 350, 360, 367, 373, 385, 406, 416, 417, 419, 431, 443
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

Examples

			The perfect powers (A001597) are:
  1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
  3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, ...
with positions of latter appearances (A376519):
  8, 14, 15, 20, 22, 25, 26, 31, 40, 46, 52, 59, 68, 75, 88, 96, 102, 110, 111, ...
		

Crossrefs

These are the sorted positions of latter appearances in A053289 (union A023055).
The complement is A376268.
A053707 lists first differences of consecutive prime-powers.
A333254 lists run-lengths of differences between consecutive primes.
Other families of numbers and their first differences:
For prime numbers (A000040) we have A001223.
For composite numbers (A002808) we have A073783.
For nonprime numbers (A018252) we have A065310.
For perfect powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
For squarefree numbers (A005117) we have A076259.
For nonsquarefree numbers (A013929) we have A078147.
For prime-powers inclusive (A000961) we have A057820.
For prime-powers exclusive (A246655) we have A057820(>1).
For non-prime-powers inclusive (A024619) we have A375735.
For non-prime-powers exclusive (A361102) we have A375708.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    q=Differences[Select[Range[1000],perpowQ]];
    Select[Range[Length[q]],MemberQ[Take[q,#-1],q[[#]]]&]

A305635 1 and odd numbers that are not perfect powers.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 123, 127, 129, 131, 133, 135, 137
Offset: 1

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Crossrefs

Programs

  • Magma
    [1] cat  [n : n in [3..200 by 2] | not IsPower(n) ]; // Vincenzo Librandi, Jul 06 2018
  • Mathematica
    radQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]==1];
    Select[Range[200],OddQ[#]&&radQ[#]&]
  • PARI
    isok(n) = (n==1) || ((n % 2) && !ispower(n)); \\ Michel Marcus, Jun 08 2018
    

A323053 Number of integer partitions of n with no 1's such that no part is a power of any other (unequal) part.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 3, 4, 6, 7, 9, 12, 15, 19, 25, 30, 38, 47, 58, 71, 87, 106, 131, 156, 190, 228, 275, 328, 394, 468, 556, 661, 784, 923, 1089, 1283, 1507, 1766, 2068, 2416, 2821, 3284, 3822, 4438, 5148, 5961, 6898, 7968, 9195, 10593, 12198, 14019, 16102, 18472
Offset: 0

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

			The a(2) = 1 through a(11) = 12 integer partitions (A = 10, B = 11):
  (2)  (3)  (4)   (5)   (6)    (7)    (8)     (9)     (A)      (B)
            (22)  (32)  (33)   (43)   (44)    (54)    (55)     (65)
                        (222)  (52)   (53)    (63)    (64)     (74)
                               (322)  (62)    (72)    (73)     (83)
                                      (332)   (333)   (433)    (92)
                                      (2222)  (522)   (532)    (443)
                                              (3222)  (622)    (533)
                                                      (3322)   (632)
                                                      (22222)  (722)
                                                               (3332)
                                                               (5222)
                                                               (32222)
		

Crossrefs

Programs

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

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

Original entry on oeis.org

1, 1, 0, 1, 2, 2, 1, 2, 4, 3, 2, 4, 6, 5, 4, 7, 10, 8, 7, 11, 15, 13, 12, 17, 22, 19, 18, 25, 30, 28, 26, 35, 42, 39, 38, 49, 59, 56, 54, 69, 81, 77, 76, 94, 110, 105, 105, 127, 147, 141, 142, 171, 195, 189, 190, 227, 257, 250, 254, 299, 335, 328, 334, 390, 432
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Examples

			O.g.f.: 1/((1 - x)(1 + x^2)(1 - x^3)(1 - x^5)(1 + x^6)(1 - x^7)(1 + x^10)...).
		

Crossrefs

Programs

  • 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}]

A305633 Expansion of Sum_{r not a perfect power} x^r/(1 + x^r).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Crossrefs

Programs

  • Mathematica
    nn=100;
    wadQ[n_]:=n>1&&GCD@@FactorInteger[n][[All,2]]==1;
    ser=Sum[x^p/(1+x^p),{p,Select[Range[nn],wadQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,nn}]

A305634 Even numbers that are not perfect powers.

Original entry on oeis.org

2, 6, 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 130, 132, 134, 136, 138
Offset: 1

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Comments

Perfect powers are of the form m^k where m > 0 and k > 1 (A001597).

Examples

			10 is in the sequence since it is even and is not a power of an integer.  17 is not in the sequence since it is odd, and 36 is not in the sequence since it is a power of an integer (36 = 6^2).
		

Crossrefs

Programs

  • Maple
    N:= 1000:
    S:={seq(i,i=2..N,2)} minus {seq(seq(e^m,m=2..floor(log[e](N))),e=2..floor(sqrt(N)),2)}:
    sort(convert(S,list)); # Robert Israel, Jan 24 2019
  • Mathematica
    radQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]==1];
    Select[Range[200],EvenQ[#]&&radQ[#]&]
  • PARI
    isok(n) = !(n % 2) && !ispower(n); \\ Michel Marcus, Jun 08 2018

Formula

A005843 \ A001597. - Eric Chen, Jun 14 2018

A323089 Number of strict integer partitions of n using 1 and numbers that are not perfect powers.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 3, 4, 4, 5, 6, 7, 9, 10, 12, 14, 16, 20, 22, 26, 31, 34, 40, 46, 51, 59, 66, 75, 86, 96, 110, 123, 139, 157, 176, 199, 221, 248, 278, 309, 346, 385, 427, 476, 528, 586, 650, 719, 795, 880, 973, 1074, 1186, 1307, 1439, 1584, 1744, 1915, 2104
Offset: 0

Views

Author

Gus Wiseman, Jan 04 2019

Keywords

Examples

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

Crossrefs

Programs

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

Formula

O.g.f.: (1 + x) * Product_{n in A007916} (1 + x^n).
Showing 1-10 of 10 results.