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 A340681 #25 Jul 27 2025 08:54:49 %S A340681 8,12,18,20,24,27,28,32,40,44,45,48,50,52,54,56,60,63,64,68,72,75,76, %T A340681 80,84,88,90,92,96,98,99,104,108,112,116,117,120,124,125,126,128,132, %U A340681 135,136,140,144,147,148,150,152,153,156,160,162,164,168,171,172,175,176,180,184,188,189,192,198,200,204,207,208 %N A340681 The closure under squaring of A051144, the nonsquarefree nonsquares. %C A340681 Numbers not of the form s^(2^e), where s is a squarefree number, and e >= 0. %C A340681 The categorization provided by this sequence and its complement, A340682, is an alternative extension (to all integers greater than 1) of the 2-way distinction between squarefree and nonsquarefree as it applies to nonsquares. %C A340681 All positive integers have a unique factorization into powers of nonunit squarefree numbers with distinct exponents that are powers of 2. This sequence lists the numbers where this factorization has more than one term, that is numbers m such that A331591(m) > 1. %C A340681 Presence in the sequence is determined by prime signature (A101296). The set of represented signatures starts: {{3}, {2,1}, {3,1}, {2,1,1}, {5}, {4,1}, {3,2}, {3,1,1}, {2,2,1}, {2,1,1,1}, {6}, {5,1}, {4,2}, {4,1,1}, {3,3}, {3,2,1}, {3,1,1,1}, {2,2,1,1}, {2,1,1,1,1}, {7}, ...}. %C A340681 Gives positions of 1's in A340675 after its initial one. %H A340681 <a href="/index/Pri#prime_signature">Index entries for sequences related to prime signature</a> %e A340681 24 = 6 * 4 = 6^1 * 2^2 = 6^(2^0) * 2^(2^1), which is the factorization into powers of nonunit squarefree numbers with distinct exponents that are powers of 2. As this factorization has 2 terms, 24 is in the sequence. %e A340681 The equivalent factorization for 100 is 100 = 10^2 = 10^(2^1). As this factorization has only 1 term, 100 is not in the sequence. %o A340681 (PARI) isA340681(n) = if(!issquare(n), !issquarefree(n), (n>1)&&isA340681(sqrtint(n))); %o A340681 (Python) %o A340681 from math import isqrt %o A340681 from sympy import mobius, integer_nthroot %o A340681 def A340681(n): %o A340681 def bisection(f,kmin=0,kmax=1): %o A340681 while f(kmax) > kmax: kmax <<= 1 %o A340681 kmin = kmax >> 1 %o A340681 while kmax-kmin > 1: %o A340681 kmid = kmax+kmin>>1 %o A340681 if f(kmid) <= kmid: %o A340681 kmax = kmid %o A340681 else: %o A340681 kmin = kmid %o A340681 return kmax %o A340681 def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) %o A340681 def f(x): return int(n+1+sum(g(integer_nthroot(x,1<<e)[0])-1 for e in range(x.bit_length().bit_length()))) %o A340681 return bisection(f,n,n) # _Chai Wah Wu_, Jun 01 2025 %Y A340681 Cf. A101296, A331591, A340675. %Y A340681 Cf. A340682 (complement, apart from 1 which is in neither). %Y A340681 Cf. subsequences: A051144, A059404. %Y A340681 Subsequence of A013929. %K A340681 nonn,easy %O A340681 1,1 %A A340681 _Antti Karttunen_ and _Peter Munn_, Feb 07 2021