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

A376562 Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

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

Examples

			The non-perfect powers (A007916) are:
  2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
  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, ...
with first differences (A376562):
  1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A375706, ones A375740, complement A375714.
Positions of zeros are A376588, complement A376589.
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
A000961 lists prime-powers inclusive, exclusive A246655.
A007916 lists non-perfect-powers, complement A001597.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers: A375706 (first differences), A376588 (inflections and undulations), A376589 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Differences[Select[Range[100],radQ],2]
  • Python
    from itertools import count
    from sympy import mobius, integer_nthroot, perfect_power
    def A376562(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)
        r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
        return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024

A375702 Length of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

2, 3, 6, 8, 1, 4, 3, 12, 14, 16, 18, 20, 3, 2, 15, 24, 26, 19, 8, 17, 12, 32, 34, 18, 17, 38, 40, 42, 27, 16, 46, 48, 50, 52, 54, 56, 58, 60, 38, 23, 64, 66, 68, 70, 34, 37, 74, 76, 78, 80, 46, 35, 84, 86, 88, 22, 67, 70, 9, 11, 94, 96, 98, 100, 102, 39, 64
Offset: 1

Views

Author

Gus Wiseman, Aug 27 2024

Keywords

Comments

Non-perfect-powers A007916 are numbers with no proper integer roots.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n has length a(n), first A375703, last A375704, sum A375705.
		

Crossrefs

For nonsquarefree numbers we have A053797, anti-runs A373409.
For squarefree numbers we have A120992, anti-runs A373127.
For nonprime numbers we have A176246, anti-runs A373403.
For prime-powers we have A373675, anti-runs A373576.
For non-prime-powers we have A373678, anti-runs A373679.
The anti-run version is A375736, sum A375737.
For runs of non-perfect-powers (A007916):
- length: A375702 (this).
- first: A375703
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.
A046933 counts composite numbers between primes.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Length/@Split[Select[Range[100],radQ],#1+1==#2&]//Most

Formula

For n > 2 we have a(n) = A053289(n+1) - 1.

A375703 Minimum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

2, 5, 10, 17, 26, 28, 33, 37, 50, 65, 82, 101, 122, 126, 129, 145, 170, 197, 217, 226, 244, 257, 290, 325, 344, 362, 401, 442, 485, 513, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1001, 1025, 1090, 1157, 1226, 1297, 1332, 1370, 1445, 1522, 1601, 1682, 1729
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2024

Keywords

Comments

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

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n has length A375702, first a(n), last A375704, sum A375705.
		

Crossrefs

For prime numbers we have A045344.
For nonsquarefree numbers we have A053806, anti-runs A373410.
For nonprime numbers we have A055670, anti-runs A005381.
For squarefree numbers we have A072284, anti-runs A373408.
The anti-run version is A216765 (same as A375703 with 2 exceptions).
For non-prime-powers we have A373673, anti-runs A120430.
For prime-powers we have A373676, anti-runs A373575.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1.
- first: A375703 (this)
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Min/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#-1]&]

Formula

Numbers k > 0 such that k-1 is a perfect power (A001597) but k is not.

A375704 Maximum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

3, 7, 15, 24, 26, 31, 35, 48, 63, 80, 99, 120, 124, 127, 143, 168, 195, 215, 224, 242, 255, 288, 323, 342, 360, 399, 440, 483, 511, 528, 575, 624, 675, 728, 783, 840, 899, 960, 999, 1023, 1088, 1155, 1224, 1295, 1330, 1368, 1443, 1520, 1599, 1680, 1727, 1763
Offset: 1

Views

Author

Gus Wiseman, Aug 29 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.
Also numbers k > 0 such that k is a perfect power (A001597) but k+1 is not.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n begins with A375703(n), ends with a(n), adds up to A375705(n), and has length A375702(n).
		

Crossrefs

For nonprime numbers: A006093, min A055670, anti-runs A068780, min A005381.
For prime numbers we have A045344.
Inserting 8 after 7 gives A045542.
For nonsquarefree numbers we have A072284(n) + 1, anti-runs A068781.
For squarefree numbers we have A373415, anti-runs A007674.
For prime-powers we have A373674 (min A373673), anti-runs A006549 (A120430).
Non-prime-powers: A373677 (min A373676), anti-runs A255346 (min A373575).
The anti-run version is A375739.
A001597 lists perfect-powers, differences A053289.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (this) (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Max/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#+1]&]

Formula

For n > 2 we have a(n) = A045542(n+1).

A375736 Length of the n-th maximal anti-run of adjacent (increasing by more than one at a time) non-perfect-powers.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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, 2, 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
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.
An anti-run of a sequence is an interval of positions at which consecutive terms differ by more than one.

Examples

			The initial anti-runs are the following, whose lengths are a(n):
  (2)
  (3,5)
  (6)
  (7,10)
  (11)
  (12)
  (13)
  (14)
  (15,17)
  (18)
  (19)
  (20)
  (21)
  (22)
  (23)
  (24,26,28)
		

Crossrefs

For squarefree numbers we have A373127, runs A120992.
For nonprime numbers we have A373403, runs A176246.
For nonsquarefree numbers we have A373409, runs A053797.
For prime-powers we have A373576, runs A373675.
For non-prime-powers (exclusive) we have A373672, runs A110969.
For runs instead of anti-runs we have A375702.
For anti-runs of non-perfect-powers:
- length: A375736 (this)
- first: A375738
- last: A375739
- sum: A375737
For runs of non-perfect-powers:
- length: A375702
- first: A375703
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Length/@Split[Select[Range[100],radQ],#1+1!=#2&]//Most

A375740 Numbers k such that A007916(k+1) - A007916(k) = 1. In other words, the k-th non-perfect-power is 1 less than the next.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

Positions in A007916 of numbers k such that k+1 is also a member.
Positions of 1's in A375706 (first differences of A007916).
Non-perfect-powers (A007916) are numbers with no proper integer roots.

Examples

			The non-perfect-powers are 2, 3, 5, 6, 7, 10, 11, 12, 13, ... which increase by one after positions 1, 3, 4, 6, ...
		

Crossrefs

The version for non-prime-powers is A375713, differences A373672.
The complement is A375714, differences A375702.
The version for prime-powers is A375734, differences A373671.
The complement for non-prime-powers is A375928, differences A110969.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A001597 lists perfect-powers, differences A053289.
A002808 lists the composite numbers, differences A073783.
A018252 lists the nonprime numbers, differences A065310.
Non-perfect-powers:
- terms: A007916
- differences: A375706
- anti-runs: A375737, A375738, A375739, A375736.
Non-prime-powers (exclusive):
- terms: A361102
- differences: A375708
- anti-runs: A373679, A373575, A255346, A373672

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Join@@Position[Differences[Select[Range[100],radQ]],1]
  • Python
    from itertools import count, islice
    from sympy import perfect_power
    def A375740_gen(): # generator of terms
        a, b = -1, 0
        for n in count(2):
            c = not perfect_power(n)
            if c:
                a += 1
            if b&c:
                yield a
        b = c
    A375740_list = list(islice(A375740_gen(), 52)) # Chai Wah Wu, Sep 11 2024

A375713 Indices of consecutive non-prime-powers (A361102) differing by 1. Numbers k such that the k-th and (k+1)-th non-prime-powers differ by just one.

Original entry on oeis.org

5, 8, 9, 15, 16, 17, 19, 20, 23, 24, 27, 28, 30, 31, 32, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 63, 64, 67, 68, 71, 72, 74, 75, 76, 77, 78, 79, 81, 82, 85, 87, 88, 89, 90, 93, 94, 95, 96, 97, 98, 99, 100, 103, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Sep 02 2024

Keywords

Examples

			The initial non-prime-powers are 1, 6, 10, 12, 14, 15, 18, 20, 21, which first increase by one after the fifth and eighth terms.
		

Crossrefs

The inclusive version is a(n) - 1.
For prime-powers inclusive (A000961) we have A375734, differences A373671.
For nonprime numbers (A002808) we have A375926, differences A373403.
For prime-powers exclusive (A246655) we have A375734(n+1) + 1.
First differences are A373672.
Positions of 1's in A375708.
For non-perfect-powers we have A375740.
Prime-powers inclusive:
- terms: A000961
- differences: A057820
Non-prime-powers inclusive:
- terms: A361102
- differences: A375708
A000040 lists all of the primes, differences A001223.
A007916 lists non-perfect-powers, differences A375706.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],!PrimePowerQ[#]&]],1]

Formula

A361102(k+1) - A361102(k) = 1.

A375734 Indices of consecutive prime-powers (exclusive) differing by 1. Positions of 1's in A057820.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 17, 43, 70, 1077, 6635, 12369, 43578, 105102700
Offset: 1

Views

Author

Gus Wiseman, Sep 04 2024

Keywords

Comments

The corresponding prime-powers A246655(a(n)) are given by A006549.
From A006549, it is not known whether this sequence is infinite.

Examples

			The fifth prime-power is 7 and the sixth is 8, so 5 is in the sequence.
		

Crossrefs

For nonprime numbers (A002808) we have A375926, differences A373403.
Positions of 1's in A057820.
First differences are A373671.
For nonsquarefree numbers we have A375709, differences A373409.
For non-prime-powers we have A375713.
For non-perfect-powers we have A375740.
For squarefree numbers we have A375927, differences A373127.
Prime-powers:
- terms: A000961, complement A024619.
- differences: A057820.
- anti-runs: A373576, A120430, A006549, A373671
Non-prime-powers:
- terms: A361102
- differences: A375708
- anti-runs: A373679, A373575, A255346, A373672
A000040 lists all of the primes, differences A001223.
A025528 counts prime-powers up to n.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],PrimePowerQ]],1]

Formula

Numbers k such that A246655(k+1) - A246655(k) = 1.
The inclusive version is a(n) + 1 shifted.

Extensions

a(14) from Amiram Eldar, Sep 24 2024

A375737 Sum of the n-th maximal anti-run of adjacent (increasing by more than one at a time) non-perfect-powers.

Original entry on oeis.org

2, 8, 6, 17, 11, 12, 13, 14, 32, 18, 19, 20, 21, 22, 23, 78, 29, 30, 64, 34, 72, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 98, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 128, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 162, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.
An anti-run of a sequence is an interval of positions at which consecutive terms differ by more than one.

Examples

			The initial anti-runs are the following, whose sums are a(n):
  (2)
  (3,5)
  (6)
  (7,10)
  (11)
  (12)
  (13)
  (14)
  (15,17)
  (18)
  (19)
  (20)
  (21)
  (22)
  (23)
  (24,26,28)
		

Crossrefs

For nonprime numbers we have A373404, runs A054265.
For squarefree numbers we have A373411, runs A373413.
For nonsquarefree numbers we have A373412, runs A373414.
For prime-powers we have A373576, runs A373675.
For non-prime-powers we have A373679, runs A373678.
For anti-runs of non-perfect-powers:
- length: A375736
- first: A375738
- last: A375739
- sum: A375737 (this)
For runs of non-perfect-powers:
- length: A375702
- first: A375703
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Total/@Split[Select[Range[100],radQ],#1+1!=#2&]//Most
Showing 1-10 of 16 results. Next