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.

A303946 Numbers that are neither squarefree nor perfect powers.

This page as a plain text file.
%I A303946 #20 Aug 20 2024 01:59:27
%S A303946 12,18,20,24,28,40,44,45,48,50,52,54,56,60,63,68,72,75,76,80,84,88,90,
%T A303946 92,96,98,99,104,108,112,116,117,120,124,126,132,135,136,140,147,148,
%U A303946 150,152,153,156,160,162,164,168,171,172,175,176,180,184,188,189
%N A303946 Numbers that are neither squarefree nor perfect powers.
%C A303946 First differs from A059404 at a(40) = 147, A059404(40) = 144.
%C A303946 First differs from A126706 at a(6) = 40, A126706(6) = 36.
%H A303946 Robert Israel, <a href="/A303946/b303946.txt">Table of n, a(n) for n = 1..10000</a>
%F A303946 a(n) ~ n/k, where k = 1 - 1/zeta(2) = 1 - 6/Pi^2 = A229099. - _Charles R Greathouse IV_, Jun 01 2018
%p A303946 filter:= proc(n) local F;
%p A303946 F:= map(t->t[2],ifactors(n)[2]);
%p A303946 max(F)>1 and igcd(op(F))=1
%p A303946 end proc:
%p A303946 select(filter, [$1..1000]); # _Robert Israel_, May 06 2018
%t A303946 Select[Range[200], !SquareFreeQ[#] && GCD@@FactorInteger[#][[All, 2]] == 1 &]
%o A303946 (PARI) isok(n) = !issquarefree(n) && !ispower(n); \\ _Michel Marcus_, May 05 2018
%o A303946 (Python)
%o A303946 from math import isqrt
%o A303946 from sympy import mobius, integer_nthroot
%o A303946 def A303946(n):
%o A303946     def f(x): return int(n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
%o A303946     m, k = n, f(n)
%o A303946     while m != k:
%o A303946         m, k = k, f(k)
%o A303946     return m # _Chai Wah Wu_, Aug 19 2024
%Y A303946 Cf. A000009, A000837, A001597, A005117, A007916, A013929, A047966, A052409, A052410, A072774, A073576, A126706, A132350.
%K A303946 nonn
%O A303946 1,1
%A A303946 _Gus Wiseman_, May 03 2018