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.

A304449 Numbers that are either squarefree or a perfect power.

This page as a plain text file.
%I A304449 #17 Aug 20 2024 01:59:24
%S A304449 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,19,21,22,23,25,26,27,29,30,31,
%T A304449 32,33,34,35,36,37,38,39,41,42,43,46,47,49,51,53,55,57,58,59,61,62,64,
%U A304449 65,66,67,69,70,71,73,74,77,78,79,81,82,83,85,86,87,89
%N A304449 Numbers that are either squarefree or a perfect power.
%C A304449 First differs from A072774 at a(105) = 144, A072774(105) = 145.
%C A304449 Apparently the 1 and the members of A062770. - _R. J. Mathar_, May 22 2018
%F A304449 Union of A005117 and A001597. Complement of A303946.
%t A304449 Select[Range[150],SquareFreeQ[#]||GCD@@FactorInteger[#][[All,2]]>1&]
%o A304449 (PARI) isok(n) = issquarefree(n) || ispower(n); \\ _Michel Marcus_, May 13 2018
%o A304449 (Python)
%o A304449 from math import isqrt
%o A304449 from sympy import mobius, integer_nthroot
%o A304449 def A304449(n):
%o A304449     def f(x): return int(n+x-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 A304449     m, k = n, f(n)
%o A304449     while m != k:
%o A304449         m, k = k, f(k)
%o A304449     return m # _Chai Wah Wu_, Aug 19 2024
%Y A304449 Cf. A000009, A000720, A000837, A000837, A001222, A001597, A005117, A007916, A013929, A047966, A072774, A073576, A126706, A303554, A303946.
%K A304449 nonn
%O A304449 1,2
%A A304449 _Gus Wiseman_, May 12 2018