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.

A120944 Composite squarefree numbers.

This page as a plain text file.
%I A120944 #67 Aug 02 2024 22:37:21
%S A120944 6,10,14,15,21,22,26,30,33,34,35,38,39,42,46,51,55,57,58,62,65,66,69,
%T A120944 70,74,77,78,82,85,86,87,91,93,94,95,102,105,106,110,111,114,115,118,
%U A120944 119,122,123,129,130,133,134,138,141,142,143,145,146,154,155,158,159,161
%N A120944 Composite squarefree numbers.
%C A120944 Intersection of A002808 and A005117: n > 1 such that A008966(n) * (1-A010051(n)) = 1. - _Reinhard Zumkeller_, Dec 19 2011
%H A120944 Reinhard Zumkeller, <a href="/A120944/b120944.txt">Table of n, a(n) for n = 1..10000</a>
%F A120944 From _Enrique Pérez Herrero_, Apr 01 2012: (Start)
%F A120944 Solutions to floor(omega(x)/bigomega(x))*(1-floor(1/bigomega(x))) = 1, where bigomega is A001222 and omega is A001221.
%F A120944 Sum_{n>=1} 1/a(n)^s  = zeta(s)/zeta(2s) - 1 - PrimeZeta(s). (End)
%F A120944 a(n) = kn + O(n/log n) where k = Pi^2/6. - _Charles R Greathouse IV_, Aug 02 2024
%p A120944 select(not(isprime) and numtheory:-issqrfree, [$2..1000]); # _Robert Israel_, Jul 07 2015
%t A120944 lst={};Do[If[SquareFreeQ[n],If[ !PrimeQ[n],AppendTo[lst,n]]],{n,2,6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jan 20 2009; updated by _Jean-François Alcover_, Jun 19 2013 *)
%t A120944 Select[Range[200], PrimeNu[#] > 1 && SquareFreeQ[#] &] (* _Carlos Eduardo Olivieri_, Jul 07 2015 *)
%o A120944 (Magma) [n: n in [6..161] | IsSquarefree(n) and not IsPrime(n)]; // _Bruno Berselli_, Mar 03 2011
%o A120944 (Haskell)
%o A120944 a120944 n = a120944_list !! (n-1)
%o A120944 a120944_list = filter ((== 1) . a008966) a002808_list
%o A120944 -- _Reinhard Zumkeller_, Dec 19 2011
%o A120944 (PARI) is(n)=issquarefree(n)&&!isprime(n)&&n>1 \\ _Charles R Greathouse IV_, Apr 11 2012
%o A120944 (Python)
%o A120944 from sympy import factorint
%o A120944 def ok(n): f = factorint(n); return len(f) > 1 and all(f[p] < 2 for p in f)
%o A120944 print(list(filter(ok, range(1, 162)))) # _Michael S. Branicky_, Jun 10 2021
%o A120944 (Python)
%o A120944 from math import isqrt
%o A120944 from sympy import primepi, mobius
%o A120944 def A120944(n):
%o A120944     def f(x): return n+1+primepi(x)+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o A120944     m, k = n+1, f(n+1)
%o A120944     while m != k:
%o A120944         m, k = k, f(k)
%o A120944     return m # _Chai Wah Wu_, Aug 02 2024
%Y A120944 Cf. A000469 (Nonprime squarefree numbers).
%Y A120944 Cf. A001221, A001222, A002808, A005117, A008966, A010051.
%Y A120944 Set of powers: A182853.
%K A120944 nonn
%O A120944 1,1
%A A120944 _Zak Seidov_, Aug 19 2006