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 A363597 #15 Aug 03 2024 01:52:53 %S A363597 1,2,3,4,5,7,8,9,11,12,13,16,17,18,19,20,23,24,25,27,28,29,31,32,36, %T A363597 37,40,41,43,44,45,47,48,49,50,52,53,54,56,59,60,61,63,64,67,68,71,72, %U A363597 73,75,76,79,80,81,83,84,88,89,90,92,96,97,98,99,100,101,103 %N A363597 Union of prime powers and numbers that are not squarefree. %C A363597 Numbers that are prime powers p^m, m >= 0, or products of multiple powers of distinct primes p^m where at least 1 prime power p^m is such that m > 1. %C A363597 Let N = A000027. Analogous to the following sequences: %C A363597 A002808 = N \ {{1} U A000040} = {1} U A024619 U A013929, %C A363597 A303554 = N \ A126706 = A000961 U A005117, and %C A363597 A085961 = N \ {{1} U A246547} = {A005117 U A024619} \ {1}. %H A363597 Michael De Vlieger, <a href="/A363597/b363597.txt">Table of n, a(n) for n = 1..10000</a> %F A363597 Complement of A120944, i.e., A000027 \ A120944. %F A363597 Union of A000961 and A013929. %F A363597 Union of {1}, A000040, A126706, and A246547. %e A363597 1 is in the sequence because it is the empty product. %e A363597 Prime p is in the sequence because it is not a composite squarefree number. %e A363597 Numbers k that have prime power factors p^m | k where at least one prime power factor is such that m > 1 are in the sequence because they are not squarefree composites. Examples include 8, 9, 12, 20, and 36. %t A363597 Select[Range[103], Nand[SquareFreeQ[#], CompositeQ[#]] &] %o A363597 (PARI) isok(k) = (k==1) || isprimepower(k) || !issquarefree(k); \\ _Michel Marcus_, Aug 24 2023 %o A363597 (Python) %o A363597 from math import isqrt %o A363597 from sympy import mobius, primepi %o A363597 def A363597(n): %o A363597 if n==1: return 1 %o A363597 def f(x): return n-1+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-primepi(x) %o A363597 m, k = n-1, f(n-1) %o A363597 while m != k: %o A363597 m, k = k, f(k) %o A363597 return m # _Chai Wah Wu_, Aug 02 2024 %Y A363597 Cf. A000040, A000961, A013929, A120944, A126706, A246547. %K A363597 nonn,easy %O A363597 1,2 %A A363597 _Michael De Vlieger_, Aug 15 2023