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

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

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

A378358 Least non-perfect-power >= n.

Original entry on oeis.org

2, 2, 3, 5, 5, 6, 7, 10, 10, 10, 11, 12, 13, 14, 15, 17, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 28, 28, 29, 30, 31, 33, 33, 34, 35, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 65, 66, 67
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2024

Keywords

Comments

Perfect-powers (A001597) are 1 and numbers with a proper integer root, complement A007916.

Crossrefs

The version for prime-powers is A000015, for non-prime-powers A378372.
The union is A007916, complement A001597.
The version for nonsquarefree numbers is A067535, negative A120327 (subtract A378369).
The version for composite numbers is A113646.
The version for prime numbers is A159477.
The run-lengths are A375706.
Terms appearing only once are A375738, multiple times A375703.
The version for perfect-powers is A377468.
Subtracting from n gives A378357.
The opposite version is A378363, for perfect-powers A081676.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289.
A007916 lists the non-perfect-powers, differences A375706.
A069623 counts perfect-powers <= n.
A076411 counts perfect-powers < n.
A131605 lists perfect-powers that are not prime-powers.
A377432 counts perfect-powers between primes, zeros A377436.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Table[NestWhile[#+1&,n,perpowQ[#]&],{n,100}]
  • Python
    from sympy import mobius, integer_nthroot
    def A378358(n):
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        a = max(1,n-f(n-1))
        m, k = a, f(a)+a
        while m != k: m, k = k, f(k)+a
        return m # Chai Wah Wu, Nov 26 2024
    
  • Python
    from sympy import perfect_power
    def A378358(n): return n if n>1 and perfect_power(n)==False else n+1 if perfect_power(n+1)==False else n+2 # Chai Wah Wu, Nov 27 2024

Formula

a(n) = n - A378357(n).

A375739 Maximum 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, 5, 6, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 28, 29, 30, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88
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.
Also non-perfect-powers x such that x + 1 is also a non-perfect-power.

Examples

			The initial anti-runs are the following, whose maxima 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 A068780, runs A006093 with 2 removed.
For squarefree numbers we have A007674, runs A373415.
For nonsquarefree numbers we have A068781, runs A072284 minus 1 and shifted.
For prime-powers we have A006549, runs A373674.
For non-prime-powers we have A255346, runs A373677.
For anti-runs of non-perfect-powers:
- length: A375736
- first: A375738
- last: A375739 (this)
- 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;
    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]&]

A378363 Greatest number <= n that is 1 or not a perfect-power.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 7, 7, 10, 11, 12, 13, 14, 15, 15, 17, 18, 19, 20, 21, 22, 23, 24, 24, 26, 26, 28, 29, 30, 31, 31, 33, 34, 35, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 65, 66, 67
Offset: 1

Views

Author

Gus Wiseman, Nov 24 2024

Keywords

Comments

Perfect-powers (A001597) are 1 and numbers with a proper integer root, complement A007916.

Examples

			In the non-perfect-powers ... 5, 6, 7, 10, 11 ... the greatest term <= 8 is 7, so a(8) = 7.
		

Crossrefs

The union is A007916, complement A001597.
The version for prime numbers is A007917 or A151799, opposite A159477.
The version for prime-powers is A031218, opposite A000015.
The version for squarefree numbers is A067535, opposite A070321.
The version for perfect-powers is A081676, opposite A377468.
The version for composite numbers is A179278, opposite A113646.
Terms appearing multiple times are A375704, opposite A375703.
The run-lengths are A375706.
Terms appearing only once are A375739, opposite A375738.
The version for nonsquarefree numbers is A378033, opposite A120327.
The opposite version is A378358.
Subtracting n gives A378364, opposite A378357.
The version for non-prime-powers is A378367 (subtracted A378371), opposite A378372.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289.
A007916 lists the non-perfect-powers, differences A375706.
A069623 counts perfect-powers <= n.
A076411 counts perfect-powers < n.
A131605 lists perfect-powers that are not prime-powers.
A377432 counts perfect-powers between primes, zeros A377436.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Table[NestWhile[#-1&,n,#>1&&perpowQ[#]&],{n,100}]
  • Python
    from sympy import mobius, integer_nthroot
    def A378363(n):
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        a = n-f(n)
        m, k = a, f(a)+a
        while m != k: m, k = k, f(k)+a
        return m # Chai Wah Wu, Nov 26 2024
Showing 1-6 of 6 results.