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.
%I A340674 #24 Jul 27 2025 08:55:00 %S A340674 4,9,16,25,36,49,81,100,121,169,196,225,256,289,361,441,484,529,625, %T A340674 676,841,900,961,1089,1156,1225,1296,1369,1444,1521,1681,1764,1849, %U A340674 2116,2209,2401,2601,2809,3025,3249,3364,3481,3721,3844,4225,4356,4489,4761,4900 %N A340674 Numbers of the form s^(2^e), where s is a squarefree number, and e >= 1. %H A340674 Antti Karttunen, <a href="/A340674/b340674.txt">Table of n, a(n) for n = 1..20000</a> %F A340674 Sum_{n>=1} 1/a(n) = Sum_{k>=1} (zeta(2^k)/zeta(2^(k+1))-1) = 0.6018231854... - _Amiram Eldar_, Feb 08 2021 %t A340674 Select[Range[10^4], Length[(u = Union[FactorInteger[#][[;; , 2]]])] == 1 && u[[1]] > 1 && u[[1]] == 2^IntegerExponent[u[[1]], 2] &] (* _Amiram Eldar_, Feb 08 2021 *) %o A340674 (PARI) %o A340674 A209229(n) = (n && !bitand(n,n-1)); %o A340674 isA340674(n) = { my(b,e); (((e=ispower(n,,&b))>0)&&issquarefree(b)&&A209229(e)); }; %o A340674 (Python) %o A340674 from math import isqrt %o A340674 from sympy import mobius, integer_nthroot %o A340674 def A340674(n): %o A340674 def bisection(f,kmin=0,kmax=1): %o A340674 while f(kmax) > kmax: kmax <<= 1 %o A340674 kmin = kmax >> 1 %o A340674 while kmax-kmin > 1: %o A340674 kmid = kmax+kmin>>1 %o A340674 if f(kmid) <= kmid: %o A340674 kmax = kmid %o A340674 else: %o A340674 kmin = kmid %o A340674 return kmax %o A340674 def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) %o A340674 def f(x): return n+x-sum(g(integer_nthroot(x,1<<e)[0])-1 for e in range(1,x.bit_length().bit_length())) %o A340674 return bisection(f,n,n) # _Chai Wah Wu_, Jun 01 2025 %Y A340674 Cf. A000079, A005117, A050376, A209229, A302777. %Y A340674 Positions of terms larger than 2 in A340673 (also in A340675), and of terms larger than 1 in A340676. %Y A340674 Subsequence of A072777 and of A340682. %K A340674 nonn %O A340674 1,1 %A A340674 _Antti Karttunen_, Jan 31 2021