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.

A107079 Minimal number of squared primes in a squarefree gap of length n.

This page as a plain text file.
%I A107079 #35 Aug 02 2025 21:55:06
%S A107079 1,2,3,4,4,5,6,7,7,7,8,9,9,10,11,12,12,13,13,14,14,15,16,17,17,17,18,
%T A107079 18,18,19,20,21,21,22,23,24,24,25,26,27,27,28,29,30,30,30,31,32,32,32,
%U A107079 32,33,33,34,34,35,35,36,37,38,38,39,40,40,40,41,42,43,43,44,45,46,46,47
%N A107079 Minimal number of squared primes in a squarefree gap of length n.
%H A107079 Antti Karttunen, <a href="/A107079/b107079.txt">Table of n, a(n) for n = 1..100000</a>
%H A107079 Louis Marmet, <a href="http://www.marmet.org/louis/sqfgap/">First occurrences of squarefree gaps and an algorithm for their computation</a>
%H A107079 Louis Marmet, <a href="https://arxiv.org/abs/1210.3829">First occurrences of square-free gaps and an algorithm for their computation</a>, arXiv preprint arXiv:1210.3829 [math.NT], 2012. - _N. J. A. Sloane_, Jan 01 2013
%F A107079 a(n) = sum{k=0..n-1, moebius_mu(n-k-1) mod 2}.
%F A107079 a(n) = A013928(n+1) + A107078(n).
%F A107079 From _Antti Karttunen_, Oct 07 2016: (Start)
%F A107079 a(n) = 1 + A013928(n). [Cf. _Charles R Greathouse IV_'s PARI-program.]
%F A107079 For all n >= 1, a(A005117(n)) = n. (End)
%t A107079 a[n_] := Sum[Boole[SquareFreeQ[k]], {k, 1, n-1}] + 1;
%t A107079 Array[a, 100] (* _Jean-François Alcover_, Sep 11 2018, from A013928 *)
%o A107079 (PARI) A107079(n)=1+sum(k=1,n-1,bitand(moebius(k),1)) \\ _Charles R Greathouse IV_, Sep 22 2008
%o A107079 (Python)
%o A107079 from math import isqrt
%o A107079 from sympy import mobius
%o A107079 def A107079(n): return 1+sum(mobius(k)*((n-1)//k**2) for k in range(1,isqrt(n-1)+1)) # _Chai Wah Wu_, Jan 03 2024
%Y A107079 One more than A013928. A left inverse of A005117.
%Y A107079 Cf. A045882, A107078.
%K A107079 nonn
%O A107079 1,2
%A A107079 _Paul Barry_, May 10 2005
%E A107079 New definition from _Charles R Greathouse IV_, Sep 22 2008