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 13 results. Next

A378355 Numbers appearing exactly once in A378035 (greatest perfect power < prime(n)).

Original entry on oeis.org

125, 216, 243, 64000, 1295029, 2535525316, 542939080312
Offset: 1

Views

Author

Gus Wiseman, Nov 26 2024

Keywords

Comments

These are perfect-powers p such that the interval from p to the next perfect power contains a unique prime.
Is this sequence infinite? See A178700.

Examples

			We have 125 because 127 is the only prime between 125 and 128.
		

Crossrefs

The next prime is A178700.
Singletons in A378035 (union A378253), restriction of A081676.
The next perfect power is A378374.
Swapping primes and perfect powers gives A379154, unique case of A377283.
A000040 lists the primes, differences A001223.
A001597 lists the perfect powers, differences A053289.
A007916 lists the not perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A377432 counts perfect powers between primes, see A377434, A377436, A377466.
A378249 gives least perfect power > prime(n) (run-lengths A378251), restrict of A377468.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    y=Table[NestWhile[#-1&,Prime[n],radQ[#]&],{n,1000}];
    Select[Union[y],Count[y,#]==1&]

Formula

A151800(a(n)) = A178700(n).

A112925 Largest squarefree integer < the n-th prime.

Original entry on oeis.org

1, 2, 3, 6, 10, 11, 15, 17, 22, 26, 30, 35, 39, 42, 46, 51, 58, 59, 66, 70, 71, 78, 82, 87, 95, 97, 102, 106, 107, 111, 123, 130, 134, 138, 146, 149, 155, 161, 166, 170, 178, 179, 190, 191, 195, 197, 210, 222, 226, 227, 231, 238, 239, 249, 255, 262, 267, 269, 274, 278
Offset: 1

Views

Author

Leroy Quet, Oct 06 2005

Keywords

Examples

			6 is the largest squarefree less than the 4th prime, 7. So a(4) = 6.
		

Crossrefs

For prime powers instead of squarefree numbers we have A065514, opposite A345531.
Restriction of A070321 (differences A378085) to the primes; see A378619.
The opposite is A112926, differences A378037.
Subtracting each term from prime(n) gives A240473, opposite A240474.
For nonsquarefree numbers we have A378033, differences A378036, see A378034, A378032.
For perfect powers we have A378035.
First differences are A378038.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013928 counts squarefree numbers up to n - 1.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.
A112929 counts squarefree numbers up to prime(n).

Programs

  • Maple
    with(numtheory): a:=proc(n) local p,B,j: p:=ithprime(n): B:={}: for j from 1 to p-1 do if abs(mobius(j))>0 then B:=B union {j} else B:=B fi od: B[nops(B)] end: seq(a(m),m=1..75); # Emeric Deutsch, Oct 14 2005
  • Mathematica
    With[{k = 120}, Table[SelectFirst[Range[Prime@ n - 1, Prime@ n - Min[Prime@ n - 1, k], -1], SquareFreeQ], {n, 60}]] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    a(n,p=prime(n))=while(!issquarefree(p--),); p \\ Charles R Greathouse IV, Aug 16 2017

Formula

a(n) = prime(n) - A240473(n). - Gus Wiseman, Jan 10 2025

Extensions

More terms from Emeric Deutsch, Oct 14 2005

A065514 Largest power of a prime < prime(n).

Original entry on oeis.org

1, 2, 4, 5, 9, 11, 16, 17, 19, 27, 29, 32, 37, 41, 43, 49, 53, 59, 64, 67, 71, 73, 81, 83, 89, 97, 101, 103, 107, 109, 125, 128, 131, 137, 139, 149, 151, 157, 163, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 243, 256, 257, 263, 269, 271
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 27 2001

Keywords

Crossrefs

Starting with n instead of prime(n) gives A031218 (A377282, A377782).
The squarefree version is A112925 (A070321, A378038).
The opposite squarefree version is A112926 (A378037, restriction of A067535).
Difference from prime(n) is A377289 (restriction of A276781, opposite A377281).
First differences are A377781.
The nonsquarefree version is A378032 (A377783 (restriction of A378033), A378034, A378040).
The perfect power version is A378035.
A000015 gives the least prime power >= n, differences A377780.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A345531 gives the least prime power > prime(n), differences A377703.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057, A377286.

Programs

  • Mathematica
    lpp[n_]:=Module[{k=n-1},While[!PrimePowerQ[k],k--];k]; Join[{1},Table[ lpp[ n],{n,Prime[Range[2,60]]}]] (* Harvey P. Dale, Nov 24 2018 *)
  • Python
    from sympy import factorint, prime
    def A065514(n): return next(filter(lambda m:len(factorint(m))<=1, range(prime(n)-1,0,-1))) # Chai Wah Wu, Oct 25 2024

Extensions

Name edited (1 is technically not a prime power even though it is a power of a prime) by Gus Wiseman, Dec 03 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&]

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

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

A378356 Prime index of the next prime after the n-th perfect power.

Original entry on oeis.org

1, 3, 5, 5, 7, 10, 10, 12, 12, 16, 19, 23, 26, 31, 31, 32, 35, 40, 45, 48, 49, 54, 55, 62, 67, 69, 73, 79, 86, 93, 98, 100, 106, 115, 123, 130, 138, 147, 155, 163, 169, 173, 182, 192, 201, 211, 218, 220, 229, 241, 252, 264, 270, 275, 284, 296, 307, 310, 320
Offset: 1

Views

Author

Gus Wiseman, Dec 05 2024

Keywords

Crossrefs

First differences are A080769.
Union is A378365.
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.
A377432 counts perfect powers between primes, see A377434, A377436, A377466.
A378249 gives the least perfect power > prime(n), restriction of A377468.

Programs

  • Mathematica
    Table[PrimePi[NextPrime[n]],{n,Select[Range[1000],perpowQ]}]

Formula

a(n) = A000720(A001597(n)) + 1.

A378253 Perfect powers p such that there are no other perfect powers between p and the least prime > p.

Original entry on oeis.org

1, 4, 9, 16, 27, 36, 49, 64, 81, 100, 125, 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
Offset: 1

Views

Author

Gus Wiseman, Nov 26 2024

Keywords

Comments

Perfect powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
Each term is the greatest perfect power < prime(k) for some k.

Examples

			The first number line below shows the perfect powers. The second shows each prime. To get a(n), we take the last perfect power in each interval between consecutive primes, omitting 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

Union of A378035, restriction of A081676 to the primes.
The opposite is A378250, union of A378249 (run-lengths A378251).
A000040 lists the primes, differences A001223.
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.
A080769 counts primes between perfect powers.
A377283 ranks perfect powers between primes, differences A378356.
A377432 counts perfect powers between primes, see A377434, A377436, A377466.

Programs

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

A378374 Perfect powers p such that the interval from the previous perfect power to p contains a unique prime.

Original entry on oeis.org

128, 225, 256, 64009, 1295044
Offset: 1

Views

Author

Gus Wiseman, Dec 17 2024

Keywords

Comments

Also numbers appearing exactly once in A378249.

Examples

			The consecutive perfect powers 125 and 128 have interval (125, 126, 127, 128) with unique prime 127, so 128 is in the sequence.
		

Crossrefs

The previous prime is A178700.
For prime powers instead of perfect powers we have A345531, difference A377281.
Opposite singletons in A378035 (union A378253), restriction of A081676.
For squarefree numbers we have A378082, see A377430, A061398, A377431, A068360.
Singletons in A378249 (run-lengths A378251), restriction of A377468 to the primes.
If the same interval contains at least one prime we get A378250.
For next instead of previous perfect power we have A378355.
Swapping "prime" with "perfect power" gives A378364.
A000040 lists the primes, differences A001223.
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.
A080769 counts primes between perfect powers.

Programs

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

Formula

We have a(n) < A178700(n) < A378355(n).
Showing 1-10 of 13 results. Next