A377702
Perfect-powers except for powers of 2.
Original entry on oeis.org
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, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2116, 2187, 2197
Offset: 1
The terms together with their prime indices begin:
9: {2,2}
25: {3,3}
27: {2,2,2}
36: {1,1,2,2}
49: {4,4}
81: {2,2,2,2}
100: {1,1,3,3}
121: {5,5}
125: {3,3,3}
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}
289: {7,7}
324: {1,1,2,2,2,2}
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A188951 counts perfect-powers less than 2^n.
A377468 gives the least perfect-power > n.
Cf.
A014210,
A014234,
A023055,
A045542,
A052410,
A065514,
A069623,
A246655,
A304521,
A336416,
A345531,
A366833.
-
Select[Range[1000],GCD@@FactorInteger[#][[All,2]]>1&&!IntegerQ[Log[2,#]]&]
-
from sympy import mobius, integer_nthroot
def A377702(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(n-2+x+(l:=x.bit_length())+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,l)))
return bisection(f,n+1,n+1) # Chai Wah Wu, Nov 06 2024
A378365
Next prime index after each perfect power, duplicates removed.
Original entry on oeis.org
1, 3, 5, 7, 10, 12, 16, 19, 23, 26, 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, 328, 330, 343
Offset: 1
The first number line below shows the perfect powers. The second shows each n at position prime(n). To get a(n), we take the first prime between each pair of consecutive perfect powers, skipping the cases where there are none.
-1-----4-------8-9------------16----------------25--27--------32------36----
===1=2===3===4=======5===6=======7===8=======9==========10==11==========12==
Positions of first appearances in
A378035.
A069623 counts perfect powers <= n.
A080769 counts primes between perfect powers.
A378249 gives the least perfect power > prime(n), restriction of
A377468.
Cf.
A045542,
A052410,
A065514,
A068361,
A076412,
A081676,
A216765,
A345531,
A378250,
A378253,
A378355.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Union[1+Table[PrimePi[n],{n,Select[Range[100],perpowQ]}]]
A377435
Number of perfect-powers x in the range 2^n <= x < 2^(n+1).
Original entry on oeis.org
1, 0, 1, 2, 3, 3, 5, 7, 8, 11, 16, 24, 32, 42, 61, 82, 118, 166, 231, 322, 453, 635, 892, 1253, 1767, 2487, 3505, 4936, 6959, 9816, 13850, 19538, 27578, 38933, 54972, 77641, 109668, 154922, 218879, 309277, 437047, 617658, 872968, 1233896, 1744153, 2465547, 3485478
Offset: 0
The perfect-powers in each prescribed range (rows):
1
.
4
8 9
16 25 27
32 36 49
64 81 100 121 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
Their binary expansions (columns):
1 . 100 1000 10000 100000 1000000 10000000 100000000
1001 11001 100100 1010001 10010000 100100001
11011 110001 1100100 10101001 101000100
1111001 11000100 101010111
1111101 11011000 101101001
11100001 110010000
11110011 110111001
111100100
The union of all numbers counted is
A001597, without powers of two
A377702.
The version for squarefree numbers is
A077643.
These are the first differences of
A188951.
The version for prime-powers is
A244508.
Not counting powers of 2 gives
A377467.
The version for non-perfect-powers is
A377701.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.
Cf.
A000015,
A013597,
A014210,
A014234,
A023055,
A031218,
A045542,
A052410,
A065514,
A069623,
A216765,
A345531,
A377434.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Table[Length[Select[Range[2^n,2^(n+1)-1],perpowQ]],{n,0,15}]
-
from sympy import mobius, integer_nthroot
def A377435(n):
if n==0: return 1
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
A377701
Number of non-perfect-powers x in the range 2^n < x < 2^(n+1).
Original entry on oeis.org
0, 1, 3, 6, 13, 29, 59, 121, 248, 501, 1008, 2024, 4064, 8150, 16323, 32686, 65418, 130906, 261913, 523966, 1048123, 2096517, 4193412, 8387355, 16775449, 33551945, 67105359, 134212792, 268428497, 536861096, 1073727974, 2147464110, 4294939718, 8589895659
Offset: 0
The non-perfect-powers in each range (rows):
.
3
5 6 7
10 11 12 13 14 15
17 18 19 20 21 22 23 24 26 28 29 30 31
Their binary expansions (columns):
. 11 101 1010 10001
110 1011 10010
111 1100 10011
1101 10100
1110 10101
1111 10110
10111
11000
11010
11100
11101
11110
11111
The union of all numbers counted is
A007916.
For squarefree numbers we have
A077643.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.
Cf.
A000015,
A013597,
A014210,
A014234,
A023055,
A045542,
A052410,
A061398,
A304521,
A377434,
A377435,
A377702.
-
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Table[Length[Select[Range[2^n+1, 2^(n+1)-1],radQ]],{n,0,15}]
-
from sympy import mobius, integer_nthroot
def A377701(n):
def f(x): return int(x-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 06 2024
A378364
Prime numbers such that the interval from the previous prime number contains a unique perfect power.
Original entry on oeis.org
2, 5, 17, 53, 67, 83, 101, 131, 149, 173, 197, 223, 227, 251, 257, 293, 331, 347, 367, 401, 443, 487, 521, 541, 577, 631, 677, 733, 787, 853, 907, 967, 1009, 1031, 1091, 1163, 1229, 1297, 1361, 1373, 1447, 1523, 1601, 1693, 1733, 1777, 1861, 1949, 2027, 2053
Offset: 1
The prime before 17 is 13, and the interval (13,14,15,16,17) contains only one perfect power 16, so 17 is in the sequence.
The prime before 29 is 23, and the interval (23,24,25,26,27,28,29) contains two perfect powers 25 and 27, so 29 is not in the sequence.
For non prime powers we have
A006512.
For zero instead of one perfect power we have the prime terms of
A345531.
The indices of these primes are the positions of 1 in
A377432.
The indices of these primes are 1 +
A377434(n-1).
For more than one perfect power see
A377466.
Swapping "prime" with "perfect power" gives
A378374.
For next instead of previous prime we have
A379154.
A081676 gives the greatest perfect power <= n.
A377468 gives the least perfect power > n.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Select[Range[1000],PrimeQ[#]&&Length[Select[Range[NextPrime[#,-1],#],perpowQ]]==1&]
A189045
Semiprimes which are sub-perfect powers.
Original entry on oeis.org
15, 26, 35, 143, 215, 323, 511, 899, 1727, 1763, 2047, 2186, 2743, 3599, 5183, 7999, 10403, 11663, 13823, 19043, 22499, 32399, 36863, 39203, 51983, 54871, 57599, 72899, 79523, 97343, 121103, 157463, 176399, 186623, 213443, 238327, 248831, 272483, 279935, 324899, 359999, 381923
Offset: 1
a(9) = 12^3 - 1 = 1727 = 11 * 157.
-
SemiPrimeQ[n_] := Total[FactorInteger[n]][[2]] == 2; PerfectPowerQ[n_] := GCD @@ Last /@ FactorInteger[n] > 1; Select[Range[400000], SemiPrimeQ[#] && PerfectPowerQ[# + 1] &] (* T. D. Noe, Apr 15 2011 *)
A189047
Semiprimes which are one more than a perfect power.
Original entry on oeis.org
9, 10, 26, 33, 65, 82, 122, 129, 145, 217, 226, 362, 485, 626, 785, 842, 901, 1157, 1226, 1522, 1765, 1937, 2026, 2049, 2117, 2305, 2402, 2501, 2602, 2705, 3365, 3482, 3601, 3722, 3845, 4097, 4226, 4762, 5042, 5777, 5833, 6085, 6242, 6401, 7226, 7397, 7745, 8193, 8465, 9026, 9217
Offset: 1
a(21) = 42^2 + 1 = 1765 = 5 * 353.
A249435
a(1) = 0, after which one less than prime powers p^m with exponent m >= 2.
Original entry on oeis.org
0, 3, 7, 8, 15, 24, 26, 31, 48, 63, 80, 120, 124, 127, 168, 242, 255, 288, 342, 360, 511, 528, 624, 728, 840, 960, 1023, 1330, 1368, 1680, 1848, 2047, 2186, 2196, 2208, 2400, 2808, 3124, 3480, 3720, 4095, 4488, 4912, 5040, 5328, 6240, 6560, 6858, 6888, 7920, 8191, 9408, 10200, 10608, 11448
Offset: 1
Subsequence of
A181062 and also a subsequence of
A249433 (after the initial zero).
Apart from the first term, subsequence of
A045542.
-
list(lim)=my(v=List([0])); lim=lim\1+1; for(m=2,logint(lim,2), forprime(p=2,sqrtnint(lim,m), listput(v, p^m-1))); Set(v) \\ Charles R Greathouse IV, Aug 26 2015
-
(define (A249435 n) (- (A025475 n) 1))
A359070
Smallest k > 1 such that k^n - 1 is the product of n distinct primes.
Original entry on oeis.org
3, 4, 15, 12, 39, 54, 79, 86, 144, 318, 1591, 144, 20131, 2014, 1764, 1308, 46656, 1296
Offset: 1
a(3) = 15 since 15^3 - 1 = 3374 = 2*7*241 is the product of 3 distinct primes and 15 is the smallest number with this property.
-
isok(k, n) = my(f=factor(k^n - 1)); issquarefree(f) && (omega(f) == n);
a(n) = my(k=2); while (!isok(k, n), k++); k; \\ Michel Marcus, Dec 15 2022
A379154
Prime numbers p such that the interval from p to the next prime number contains a unique perfect power.
Original entry on oeis.org
3, 13, 47, 61, 79, 97, 127, 139, 167, 193, 211, 223, 241, 251, 283, 317, 337, 359, 397, 439, 479, 509, 523, 571, 619, 673, 727, 773, 839, 887, 953, 997, 1021, 1087, 1153, 1223, 1291, 1327, 1367, 1439, 1511, 1597, 1669, 1723, 1759, 1847, 1933, 2017, 2039, 2113
Offset: 1
The prime after 13 is 17, and the interval (13,14,15,16,17) contains only one perfect power 16, so 13 is in the sequence.
The indices of these primes are one plus the positions of 1 in
A377432.
For zero instead of one perfect power we have the primes indexed by
A377436.
The indices of these primes are
A377434.
For previous instead of next prime we have
A378364.
A081676 gives the greatest perfect power <= n.
A116086 gives perfect powers with no primes between them and the next perfect power.
A377468 gives the least perfect power > n.
-
N:= 10^4: # to get all entries <= N
S:={seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}:
S:= sort(convert(S,list)):
J:= select(i -> nextprime(S[i]) < S[i+1] and prevprime(S[i]) > S[i-1], [$2..nops(S)-1]):
J:= [1,op(J)]:
map(prevprime, S[J]); # Robert Israel, Jan 19 2025
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Select[Range[1000],PrimeQ[#]&&Length[Select[Range[#,NextPrime[#]],perpowQ]]==1&]
-
is_a379154(n) = isprime(n) && #select(x->ispower(x), [n+1..nextprime(n+1)-1])==1 \\ Hugo Pfoertner, Dec 19 2024
Comments