cp's OEIS Frontend

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.

A126706 Positive integers which are neither squarefree integers nor prime powers.

This page as a plain text file.
%I A126706 #28 Aug 15 2024 02:02:21
%S A126706 12,18,20,24,28,36,40,44,45,48,50,52,54,56,60,63,68,72,75,76,80,84,88,
%T A126706 90,92,96,98,99,100,104,108,112,116,117,120,124,126,132,135,136,140,
%U A126706 144,147,148,150,152,153,156,160,162,164,168,171,172,175,176,180,184,188
%N A126706 Positive integers which are neither squarefree integers nor prime powers.
%H A126706 Michael De Vlieger, <a href="/A126706/b126706.txt">Table of n, a(n) for n = 1..10000</a>
%e A126706 45 is in the sequence because 45=3^2*5, i.e., neither squarefree nor a prime power.
%p A126706 with(numtheory): a:=proc(n) if mobius(n)=0 and nops(factorset(n))>1 then n else fi end: seq(a(n), n=1..230); # _Emeric Deutsch_, Feb 17 2007
%t A126706 Select[Range[200], Max @@ Last /@ FactorInteger[ # ] >1 && Length[FactorInteger[ # ]] > 1 &] (* _Ray Chandler_, Feb 17 2007 *)
%t A126706 Select[Range[200],!SquareFreeQ[#]&&!PrimePowerQ[#]&] (* _Harvey P. Dale_, Aug 05 2023 *)
%o A126706 (PARI) isok(k) = !issquarefree(k) && !isprimepower(k); \\ _Michel Marcus_, Nov 02 2022
%o A126706 (Python)
%o A126706 from math import isqrt
%o A126706 from sympy import primepi, integer_nthroot, mobius
%o A126706 def A126706(n):
%o A126706     def f(x): return int(n+sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length()))+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
%o A126706     m, k = n, f(n)
%o A126706     while m != k:
%o A126706         m, k = k, f(k)
%o A126706     return m # _Chai Wah Wu_, Aug 15 2024
%Y A126706 Cf. A005117, A000961, A059404.
%K A126706 nonn
%O A126706 1,1
%A A126706 _Leroy Quet_, Feb 11 2007
%E A126706 Extended by _Emeric Deutsch_ and _Ray Chandler_, Feb 17 2007