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.

Previous Showing 11-20 of 59 results. Next

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.

A375714 Positions of non-successions of consecutive non-perfect-powers. Numbers k such that the k-th non-perfect-power is at least two fewer than the next.

Original entry on oeis.org

2, 5, 11, 19, 20, 24, 27, 39, 53, 69, 87, 107, 110, 112, 127, 151, 177, 196, 204, 221, 233, 265, 299, 317, 334, 372, 412, 454, 481, 497, 543, 591, 641, 693, 747, 803, 861, 921, 959, 982, 1046, 1112, 1180, 1250, 1284, 1321, 1395, 1471, 1549, 1629, 1675, 1710
Offset: 1

Views

Author

Gus Wiseman, Sep 10 2024

Keywords

Comments

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

Examples

			The initial non-perfect-powers are 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, which increase by more than one after term 2, term 5, term 11, etc.
		

Crossrefs

First differences are A375702.
Positions of terms > 1 in A375706 (differences of A007916).
The complement for non-prime-powers is A375713, differences A373672.
The complement is A375740.
The version for non-prime-powers is A375928, differences A110969.
Prime-powers inclusive:
- terms: A000961
- differences: A057820
Non-prime-powers inclusive:
- terms: A361102
- differences: A375708

Programs

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

Formula

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

A376340 Sorted positions of first appearances in A057820, the sequence of first differences of prime-powers.

Original entry on oeis.org

1, 4, 9, 12, 18, 24, 34, 47, 60, 79, 117, 178, 198, 206, 215, 244, 311, 402, 465, 614, 782, 1078, 1109, 1234, 1890, 1939, 1961, 2256, 2290, 3149, 3377, 3460, 3502, 3722, 3871, 4604, 4694, 6634, 8073, 8131, 8793, 12370, 12661, 14482, 14990, 15912, 17140, 19166
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2024

Keywords

Examples

			The terms together with their prime indices begin:
     1: {}
     4: {1,1}
     9: {2,2}
    12: {1,1,2}
    18: {1,2,2}
    24: {1,1,1,2}
    34: {1,7}
    47: {15}
    60: {1,1,2,3}
    79: {22}
   117: {2,2,6}
   178: {1,24}
   198: {1,2,2,5}
   206: {1,27}
   215: {3,14}
   244: {1,1,18}
		

Crossrefs

For compression instead of sorted firsts we have A376308.
For run-lengths instead of sorted firsts we have A376309.
For run-sums instead of sorted firsts we have A376310.
The version for squarefree numbers is the unsorted version of A376311.
The unsorted version is A376341.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, first differences A057820.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259.
A024619 and A361102 list non-prime-powers, first differences A375708.
A116861 counts partitions by compressed sum, by compressed length A116608.

Programs

  • Mathematica
    q=Differences[Select[Range[100],PrimePowerQ]];
    Select[Range[Length[q]],!MemberQ[Take[q,#-1],q[[#]]]&]

A377703 First differences of the sequence A345531(k) = least prime-power greater than the k-th prime.

Original entry on oeis.org

1, 3, 1, 5, 3, 3, 4, 2, 6, 1, 9, 2, 4, 2, 10, 2, 3, 7, 2, 6, 2, 8, 8, 4, 2, 4, 2, 4, 8, 7, 9, 2, 10, 2, 6, 6, 4, 2, 10, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 2, 13, 7, 6, 2, 6, 4, 2, 6, 18, 4, 2, 4, 14, 6, 6, 6, 4, 6, 2, 12, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6
Offset: 1

Views

Author

Gus Wiseman, Nov 07 2024

Keywords

Comments

What is the union of this sequence? In particular, does it contain 17?

Crossrefs

First differences of A345531.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A080101 counts prime-powers between primes (exclusive).
A246655 lists the prime-powers, differences A057820 without first term.
A361102 lists the non-powers of primes, differences A375708.
A366833 counts prime-powers between primes, see A053607, A304521, A377057 (positive), A377286 (zero), A377287 (one), A377288 (two).
A377432 counts perfect-powers between primes, see A377434 (one), A377436 (zero), A377466 (multiple).

Programs

  • Mathematica
    Differences[Table[NestWhile[#+1&, Prime[n]+1,!PrimePowerQ[#]&],{n,100}]]
  • Python
    from sympy import factorint, prime, nextprime
    def A377703(n): return -next(filter(lambda m:len(factorint(m))<=1, count((p:=prime(n))+1)))+next(filter(lambda m:len(factorint(m))<=1, count(nextprime(p)+1))) # Chai Wah Wu, Nov 14 2024

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.

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

A377283 Nonnegative integers k such that either k = 0 or there is a perfect power x in the range prime(k) < x < prime(k+1).

Original entry on oeis.org

0, 2, 4, 6, 9, 11, 15, 18, 22, 25, 30, 31, 34, 39, 44, 47, 48, 53, 54, 61, 66, 68, 72, 78, 85, 92, 97, 99, 105, 114, 122, 129, 137, 146, 154, 162, 168, 172, 181, 191, 200, 210, 217, 219, 228, 240, 251, 263, 269, 274, 283, 295, 306, 309, 319, 327, 329, 342, 357
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2024

Keywords

Comments

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

Examples

			The first number-line below shows the perfect powers. The second shows each positive integer k at position prime(k).
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
		

Crossrefs

A version for prime powers is A377057, exclusive A377287.
A version for squarefree numbers is A377431.
Positions of positive terms in A377432 (counts perfect powers between primes).
The case of a unique choice is A377434 (a subset).
The complement (no choices) is A377436.
The case of at least two choices is A377466 (a subset).
Positions of last appearances in A378249.
First-differences are A378251.
This is A378365 - 1, union of A378356 - 1.
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.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[0,100],#==0||Length[Select[Range[Prime[#]+1,Prime[#+1]-1],perpowQ]]>0&]

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.

A378035 Greatest perfect power < prime(n).

Original entry on oeis.org

1, 1, 4, 4, 9, 9, 16, 16, 16, 27, 27, 36, 36, 36, 36, 49, 49, 49, 64, 64, 64, 64, 81, 81, 81, 100, 100, 100, 100, 100, 125, 128, 128, 128, 144, 144, 144, 144, 144, 169, 169, 169, 169, 169, 196, 196, 196, 216, 225, 225, 225, 225, 225, 243, 256, 256, 256, 256
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2024

Keywords

Comments

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

Examples

			The first number line below shows the perfect powers.
The second shows each positive integer k at position prime(k).
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
		

Crossrefs

Restriction of A081676 to the primes.
Positions of last appearances are also A377283.
A version for squarefree numbers is A378032.
The opposite is A378249 (run lengths A378251), restriction of A377468 to the primes.
The union is A378253.
Terms appearing exactly once are A378355.
Run lengths are A378356, first differences of A377283, complement A377436.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289.
A007916 lists the nonperfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A080769 counts primes between perfect powers, prime powers A067871.
A131605 lists perfect powers that are not prime powers.
A377432 counts perfect powers between primes, zeros A377436, postpositives A377466.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[NestWhile[#-1&,Prime[n],radQ[#]&],{n,100}]
  • PARI
    a(n) = my(k=prime(n)-1); while (!(ispower(k) || (k==1)), k--); k; \\ Michel Marcus, Nov 25 2024
    
  • Python
    from sympy import mobius, integer_nthroot, prime
    def A378035(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m = (p:=prime(n)-1)-f(p)
        return bisection(lambda x:f(x)+m,m,m) # Chai Wah Wu, Nov 25 2024
Previous Showing 11-20 of 59 results. Next