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 21-30 of 59 results. Next

A378249 Least perfect power > prime(n).

Original entry on oeis.org

4, 4, 8, 8, 16, 16, 25, 25, 25, 32, 32, 49, 49, 49, 49, 64, 64, 64, 81, 81, 81, 81, 100, 100, 100, 121, 121, 121, 121, 121, 128, 144, 144, 144, 169, 169, 169, 169, 169, 196, 196, 196, 196, 196, 216, 216, 216, 225, 243, 243, 243, 243, 243, 256, 289, 289, 289
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.
Which terms appear only once? Just 128, 225, 256, 64009, 1295044?

Examples

			The first number line below shows the perfect powers. The second shows each prime.
-1-----4-------8-9------------16----------------25--27--------32------36------------------------49--
===2=3===5===7======11==13======17==19======23==========29==31==========37======41==43======47======
		

Crossrefs

A version for prime powers (but starting with prime(k) + 1) is A345531.
Positions of last appearances are A377283, complement A377436.
Restriction of A377468 to the primes, for prime powers A000015.
The opposite is A378035, restriction of A081676.
The union is A378250.
Run lengths are A378251.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289, seconds A376559.
A007916 lists numbers that are not perfect powers, differences A375706, seconds A376562.
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, postpositives A377466.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Table[NestWhile[#+1&,Prime[n],radQ[#]&],{n,100}]
  • PARI
    f(p) = p++; while(!ispower(p), p++); p;
    lista(nn) = apply(f, primes(nn)); \\ Michel Marcus, Dec 19 2024

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

Original entry on oeis.org

5, 18, 75, 164, 26, 118, 102, 510, 791, 1160, 1629, 2210, 369, 253, 2040, 3756, 4745, 3914, 1764, 3978, 2994, 8720, 10421, 6003, 5984, 14459, 16820, 19425, 13446, 8328, 25415, 28824, 32525, 36530, 40851, 45500, 50489, 55830, 37259, 23276, 67616, 74085, 80954
Offset: 1

Views

Author

Gus Wiseman, Aug 29 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 begins with A375703(n), ends with A375704(n), adds up to a(n), and has length A375702(n).
		

Crossrefs

For nonprime numbers we have A054265, anti-runs A373404.
For nonsquarefree numbers we have A373414, anti-runs A373412.
For squarefree numbers we have A373413, anti-runs A373411.
For prime-powers we have A373675, anti-runs A373576.
For non-prime-powers we have A373678, anti-runs A373679.
The anti-run version is A375737, sums of A375736.
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.
A046933 counts composite numbers between primes.
For 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 (this)

Programs

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

A378251 Number of primes between consecutive perfect powers, zeros omitted.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 1, 3, 5, 5, 3, 1, 5, 1, 7, 5, 2, 4, 6, 7, 7, 5, 2, 6, 9, 8, 7, 8, 9, 8, 8, 6, 4, 9, 10, 9, 10, 7, 2, 9, 12, 11, 12, 6, 5, 9, 12, 11, 3, 10, 8, 2, 13, 15, 10, 11, 15, 7, 9, 12, 13, 11, 12, 17, 2, 11, 16, 16, 13, 17, 15, 14, 16, 15
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2024

Keywords

Comments

First differences of A377283 and A378365. Run-lengths of A378035 and A378249.
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 prime. To get a(n) we count the primes between consecutive perfect powers, skipping the cases where there are none.
-1-----4-------8-9------------16----------------25--27--------32------36----
===2=3===5===7======11==13======17==19======23==========29==31==========37==
		

Crossrefs

Same as A080769 with 0's removed (which were at positions A274605).
First differences of A377283 and A378365 (union of A378356).
Run-lengths of A378035 (union A378253) and A378249 (union A378250).
The version for nonprime prime powers is A378373, with zeros A067871.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289, run-lengths of A377468.
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, see A377434, A377436, A377466.

Programs

  • Maple
    N:= 10^6: # to use perfect powers up to N
    PP:= {1,seq(seq(i^j,j=2..ilog[i](N)),i=2..isqrt(N))}:
    PP:= sort(convert(PP,list)):
    M:= map(numtheory:-pi, PP):
    subs(0=NULL, M[2..-1]-M[1..-2]): # Robert Israel, Jan 23 2025
  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Length/@Split[Table[NestWhile[#+1&,Prime[n],radQ[#]&],{n,100}]]

A378250 Perfect-powers x > 1 such that it is not possible to choose a prime y and a perfect-power z satisfying x > y > z.

Original entry on oeis.org

4, 8, 16, 25, 32, 49, 64, 81, 100, 121, 128, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2024

Keywords

Comments

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

Examples

			The first number line below shows the perfect-powers. The second shows the primes. The third is a(n).
-1-----4-------8-9------------16----------------25--27--------32------36----
===2=3===5===7======11==13======17==19======23==========29==31==========37==
       4       8              16                25            32
The terms together with their prime indices begin:
     4: {1,1}
     8: {1,1,1}
    16: {1,1,1,1}
    25: {3,3}
    32: {1,1,1,1,1}
    49: {4,4}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
   100: {1,1,3,3}
   121: {5,5}
   128: {1,1,1,1,1,1,1}
   144: {1,1,1,1,2,2}
   169: {6,6}
   196: {1,1,4,4}
   216: {1,1,1,2,2,2}
   225: {2,2,3,3}
   243: {2,2,2,2,2}
   256: {1,1,1,1,1,1,1,1}
		

Crossrefs

A version for prime-powers (but starting with prime(k) + 1) is A345531.
The opposite is union of A378035, restriction of A081676.
Union of A378249, run-lengths are A378251.
A000040 lists the primes, differences A001223.
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.
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, positive A377283, postpositive A377466.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Union[Table[NestWhile[#+1&,Prime[n],radQ[#]&],{n,100}]]

A377781 First differences of A065514(n) = greatest number < prime(n) that is 1 or a prime-power.

Original entry on oeis.org

1, 2, 1, 4, 2, 5, 1, 2, 8, 2, 3, 5, 4, 2, 6, 4, 6, 5, 3, 4, 2, 8, 2, 6, 8, 4, 2, 4, 2, 16, 3, 3, 6, 2, 10, 2, 6, 6, 6, 4, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 4, 13, 1, 6, 6, 2, 6, 4, 8, 4, 14, 4, 2, 4, 14, 12, 4, 2, 4, 8, 6, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2024

Keywords

Comments

Note 1 is a power of a prime but not a prime-power.

Crossrefs

Differences of A065514, which is the restriction of A031218 (differences A377782).
The opposite is A377703 (restriction of A000015), differences of A345531.
The opposite for nonsquarefree is A377784, differences of A377783.
For nonsquarefree we have A378034, differences of A378032 (restriction of A378033).
The opposite for squarefree is A378037, differences of A112926 (restriction of A067535).
For squarefree we have A378038, differences of A112925 (restriction of A070321).
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime-powers, differences A057820.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A361102 lists the non-powers of primes, differences A375708.
Prime-powers between primes:
- A053607 primes
- A080101 count (exclusive)
- A304521 by bits
- A366833 count
- A377057 positive
- A377286 zero
- A377287 one
- A377288 two

Programs

  • Mathematica
    Differences[Table[NestWhile[#-1&,Prime[n]-1,#>1&&!PrimePowerQ[#]&],{n,100}]]

A074984 m^p-n, for smallest m^p>=n.

Original entry on oeis.org

0, 2, 1, 0, 3, 2, 1, 0, 0, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 0, 4, 3, 2, 1, 0, 3, 2, 1, 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8
Offset: 1

Views

Author

Zak Seidov, Oct 07 2002

Keywords

Comments

a(n) = 0 if n = m^p that is if n is a full power (square, cube etc.).
This is the distance between n and the next perfect power. The previous perfect power is A081676, which differs from n by A069584. After a(8) = a(9) this sequence is an anti-run (no adjacent equal terms). - Gus Wiseman, Dec 02 2024

Crossrefs

Sequences obtained by subtracting n from each term are placed in parentheses below.
Positions of 0 are A001597.
Positions of 1 are A375704.
The version for primes is A007920 (A007918).
The opposite (greatest perfect power <= n) is A069584 (A081676).
The version for perfect powers is A074984 (this) (A377468).
The version for squarefree numbers is A081221 (A067535).
The version for non perfect powers is A378357 (A378358).
The version for nonsquarefree numbers is A378369 (A120327).
The version for prime powers is A378370 (A000015).
The version for non prime powers is A378371 (A378372).
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
    powerQ[n_] := GCD @@ FactorInteger[n][[All, 2]] > 1; powerQ[1] = True; a[n_] := For[k = n, True, k++, If[powerQ[k], Return[k-n]]]; Table[a[n], {n, 1, 92}] (* Jean-François Alcover, Apr 19 2013 *)
  • PARI
    a(n) = { if (n==1, return (0)); my(nn = n); while(! ispower(nn), nn++); return (nn - n);} \\ Michel Marcus, Apr 19 2013

Formula

a(n) = A377468(n) - n. - Gus Wiseman, Dec 02 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

A376309 Run-lengths of the sequence of first differences of prime-powers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 22 2024

Keywords

Examples

			The sequence of prime-powers (A246655) is:
  2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, ...
The sequence of first differences (A057820) of prime-powers is:
  1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, ...
with runs:
  (1,1,1),(2),(1,1),(2,2),(3),(1),(2),(4),(2,2,2,2),(1),(5),(4),(2),(4), ...
with lengths A376309 (this sequence).
		

Crossrefs

For runs of prime-powers increasing by one we have A174965.
For primes instead of prime-powers we have A333254.
For squarefree numbers instead of prime-powers we have A376306.
For compression instead of run-lengths we have A376308.
For run-sums instead of run-lengths we have A376310.
For positions of first appearances we have A376341, sorted A376340.
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.
A124767 counts runs in standard compositions, anti-runs A333381.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A373948 encodes compression using compositions in standard order.

Programs

  • Mathematica
    Length/@Split[Differences[Select[Range[100],PrimePowerQ]]]
  • PARI
    up_to = 20000;
    A376309list(up_to) = { my(v=vector(up_to), ppp=2, pd=1, d, rl=0, k=2, i=0); while(i<#v, k++; if(isprimepower(k), d = k-ppp; ppp = k; if(d == pd, rl++, i++; v[i] = rl; rl = 1; pd = d))); (v); };
    v376309 = A376309list(up_to);
    A376309(n) = v376309[n]; \\ Antti Karttunen, Jan 18 2025

Extensions

More terms from Antti Karttunen, Jan 18 2025

A376310 Run-sums of the sequence of first differences of prime-powers.

Original entry on oeis.org

3, 2, 2, 4, 3, 1, 2, 4, 8, 1, 5, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 8, 4, 2, 1, 3, 6, 2, 10, 2, 12, 4, 2, 4, 6, 2, 10, 2, 4, 2, 24, 4, 2, 4, 6, 4, 8, 5, 1, 12, 2, 6, 4, 2, 6, 4, 14, 4, 2, 4, 14, 12, 4, 2, 4, 6, 2, 18, 4, 6, 8, 4, 8, 10, 2
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2024

Keywords

Examples

			The sequence of prime-powers (A246655) is:
  2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, ...
The sequence of first differences (A057820) of prime-powers is:
  1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, ...
with runs:
  (1,1,1),(2),(1,1),(2,2),(3),(1),(2),(4),(2,2,2,2),(1),(5),(4),(2),(4), ...
with sums A376310 (this sequence).
		

Crossrefs

For primes instead of prime-powers we have A373822, halved A373823.
For squarefree numbers instead of prime-powers we have A376307.
For compression instead of run-sums we have A376308.
For run-lengths instead of run-sums we have A376309.
For positions of first appearances we have A376341, sorted A376340.
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.
A124767 counts runs in standard compositions, anti-runs A333381.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A373948 encodes compression using compositions in standard order.

Programs

  • Mathematica
    Total/@Split[Differences[Select[Range[100],PrimePowerQ]]]

A377467 Number of perfect-powers x in the range 2^n < x < 2^(n+1).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 4, 6, 7, 10, 15, 23, 31, 41, 60, 81, 117, 165, 230, 321, 452, 634, 891, 1252, 1766, 2486, 3504, 4935, 6958, 9815, 13849, 19537, 27577, 38932, 54971, 77640, 109667, 154921, 218878, 309276, 437046, 617657, 872967, 1233895, 1744152, 2465546, 3485477
Offset: 0

Views

Author

Gus Wiseman, Nov 04 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.
Also the number of perfect-powers, except for powers of 2, with n bits.

Examples

			The perfect-powers in each prescribed range (rows):
    .
    .
    .
    9
   25   27
   36   49
   81  100  121  125
  144  169  196  216  225  243
  289  324  343  361  400  441  484
  529  576  625  676  729  784  841  900  961 1000
The binary expansions for n >= 3 (columns):
    1001  11001  100100  1010001  10010000  100100001
          11011  110001  1100100  10101001  101000100
                         1111001  11000100  101010111
                         1111101  11011000  101101001
                                  11100001  110010000
                                  11110011  110111001
                                            111100100
		

Crossrefs

The version for squarefree numbers is A077643.
The version for prime-powers is A244508.
For primes instead of powers of 2 we have A377432, zeros A377436.
Including powers of 2 in the range gives A377435.
The version for non-perfect-powers is A377701.
The union of all numbers counted is A377702.
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.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Table[Length[Select[Range[2^n+1,2^(n+1)-1],perpowQ]],{n,0,15}]
  • Python
    from sympy import mobius, integer_nthroot
    def A377467(n):
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        return f((1<Chai Wah Wu, Nov 05 2024

Formula

For n != 1, a(n) = A377435(n) - 1.

Extensions

a(26)-a(46) from Chai Wah Wu, Nov 05 2024
Previous Showing 21-30 of 59 results. Next