A378168
a(n) is the number of squares <= 10^n that are not higher powers, i.e., terms of A076467.
Original entry on oeis.org
2, 6, 24, 87, 292, 959, 3089, 9875, 31410, 99633, 315589, 998889, 3160340, 9996605, 31616816, 99989509, 316209268, 999967330, 3162219896, 9999897769, 31622595517, 99999679010, 316227196708, 999998989804, 3162275866962, 9999996815862, 31622770946248, 99999989953079
Offset: 1
a(1) = 2: squares <= 10 are 2^2 and 3^2;
a(2) = 6: 2 squares <= 10 and 5^2, 6^2, 7^2, 10^2, but not 4^2=2^4, 8^2=2^6, and 9^2=3^4;
a(3) = 24: 6 squares <= 100 and all squares between 11^2 and 31^2, except for 16^2=2^8, 25^2=5^4, and 27^2=3^6.
-
Table[Sum[MoebiusMu[k]*Floor[10^(n/(2k))-1],{k,Floor[Log2[10^n]-1]}],{n,28}] (* James C. McMahon, Nov 21 2024 *)
-
from math import gcd
from sympy import integer_nthroot, mobius
def A378168(n): return sum(mobius(k)*(integer_nthroot(10**(n//(a:=gcd(n,b:=k<<1))), b//a)[0]-1) for k in range(1, (10**n).bit_length()-1)) # Chai Wah Wu, Nov 20 2024
A377934
a(n) is the number of perfect powers m^k with k>=3 (A076467) <= 10^n.
Original entry on oeis.org
1, 2, 7, 17, 38, 75, 152, 306, 616, 1260, 2598, 5401, 11307, 23798, 50316, 106776, 227236, 484737, 1036002, 2217529, 4752349, 10194727, 21887147, 47020054, 101065880, 217325603, 467484989, 1005881993, 2164843035, 4660016778, 10032642455, 21602193212, 46518438071
Offset: 0
a(0) = 1: 1^k with any k>2 (<= 10^0);
a(1) = 2: 1 and 2^3 (<=10^1);
a(2) = 7: 2 powers <= 10 and 16, 27, 32, 64, 81 (<=10^2).
-
from math import gcd
from sympy import integer_nthroot, mobius
def A377934(n): return int(integer_nthroot(10**(n//(a:=gcd(n,4))),4//a)[0]-sum(mobius(k)*(integer_nthroot(10**(n//(b:=gcd(n,k))),k//b)[0]+integer_nthroot(10**(n//(c:=gcd(n,d:=k<<1))),d//c)[0]-2) for k in range(3,(10**n).bit_length()))) # Chai Wah Wu, Nov 24 2024
A380337
Number of perfect powers (in A001597) that do not exceed primorial A002110(n).
Original entry on oeis.org
1, 1, 2, 7, 19, 63, 208, 802, 3344, 15576, 82368, 453834, 2743903, 17510668, 114616907, 785002449, 5711892439, 43861741799, 342522899289, 2803468693325, 23621594605383, 201819398349092, 1793794228847381, 16342173067958793, 154171432351500060, 1518411003599957803
Offset: 0
Let P = A002110 and let s = A001597.
a(0) = 1 since P(0) = 1, and the set s(1) = {1} contains k that do not exceed 1.
a(1) = 1 since P(1) = 2, and the set s(1) = {1} contains k <= 2.
a(2) = 2 since P(2) = 6, and the set s(1..2) = {1, 4} contains k <= 6.
a(3) = 7 since P(3) = 30, and the set s(1..7) = {1, 4, 8, 9, 16, 25, 27} contains k <= 30.
a(4) = 19 since P(4) = 210, and the set s(1..19) = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196} contains k <= 210, etc.
-
Map[1 - Sum[MoebiusMu[k]*Floor[#^(1/k) - 1], {k, 2, Floor[Log2[#]]}] &, FoldList[Times, 1, Prime[Range[30]]] ]
-
from sympy import primorial, mobius, integer_nthroot
def A380337(n):
if n == 0: return 1
p = primorial(n)
return int(1-sum(mobius(k)*(integer_nthroot(p,k)[0]-1) for k in range(2,p.bit_length()))) # Chai Wah Wu, Jan 23 2025
A075127
Safe perfect powers: perfect powers n such that (n-1)/2 is also a perfect power.
Original entry on oeis.org
9, 243, 289, 9801, 332929, 11309769, 384199201, 13051463049, 443365544449, 15061377048201, 511643454094369, 17380816062160329, 590436102659356801, 20057446674355970889, 681362750825443653409
Offset: 1
-
pp = Select[ Range[10^8], Apply[ GCD, Last[ Transpose[ FactorInteger[ # ]]]] > 1 & ]; Select[pp, Apply[GCD, Last[ Transpose[ FactorInteger[( # - 1)/2]]]] > 1 & ]
-
for(n=1, 1e10, if(ispower(n) && ispower((n-1)/2), print1(n, ", "))) \\ Altug Alkan, Oct 28 2015
A111026
Perfect powers (A001597) of the form 3p + q + 3, p & q are primes.
Original entry on oeis.org
16, 25, 27, 32, 49, 121, 125, 128, 169, 225, 243, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1000, 1225, 1331, 1369, 1681, 1849, 2025, 2048, 2187, 2197, 2209, 2401, 2809, 3025, 3125, 3375, 3481, 3721, 3969, 4225, 4489, 4913, 5041, 5329, 5625, 5929, 6241
Offset: 1
a(5)=49 since 3*3+37+3=49 = 5*3+31+3 = 3*11+13+3 = 3*13+7+7 = 7^2.
6859 = 19^3 is in the sequence because there are 116 different ways to combine primes of the form 3p + q + 3, beginning with p=5 & q=6841 and ending with p=2281 & q=13.
-
with(numtheory); egcd := proc(n) local L; L:=map(proc(z) z[2] end, ifactors(n)[2]); igcd(op(L)) end: PW:=[]: for z to 1 do for j from 1 to 100 do for k from 1 to 100 do p:=ithprime(j); q:=ithprime(k); x:=3*p+q+3; if egcd(x)>1 and andmap(proc(w) not(w[3]=x) end, PW) then PW:=[op(PW), [p,q,x]] fi od od od; PW; map(proc(z) z[3] end, PW);
-
fQ[n_] := GCD @@ Last /@ FactorInteger@n > 1; lst = {}; Do[p = Prime@j; q = Prime@k; x = 3p + q + 3; If[fQ@x, AppendTo[lst, x]], {j, 340}, {k, PrimePi[6856 - 3Prime@j]}]; Union@lst (* Robert G. Wilson v *)
Comments