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.
%I A077680 #28 Jul 27 2025 10:12:04 %S A077680 41,42,43,46,47,401,402,403,406,407,409,410,411,413,415,417,418,419, %T A077680 421,422,426,427,429,430,431,433,434,435,437,438,439,442,443,445,446, %U A077680 447,449,451,453,454,455,457,458,461,462,463,465,466,467,469,470,471,473 %N A077680 Squarefree numbers beginning with 4. %C A077680 Lower density is 3/(20*Pi^2), upper density is 4/(3*Pi^2). - _Charles R Greathouse IV_, Nov 05 2017 %H A077680 Amiram Eldar, <a href="/A077680/b077680.txt">Table of n, a(n) for n = 1..10000</a> %p A077680 select(numtheory:-issqrfree, [seq(seq(i,i=4*10^d+1 .. 5*10^d-1),d=1..3)]); # _Robert Israel_, May 07 2025 %t A077680 Select[Range[499],First[IntegerDigits[#]]==4&&SquareFreeQ[#]&] (* _Harvey P. Dale_, Apr 24 2018 *) %o A077680 (PARI) is(n)=n>40 && digits(n)[1]==4 && issquarefree(n) \\ _Charles R Greathouse IV_, Nov 05 2017 %o A077680 (Python) %o A077680 from functools import lru_cache %o A077680 from math import isqrt %o A077680 from sympy import mobius %o A077680 def A077680(n): %o A077680 def bisection(f,kmin=0,kmax=1): %o A077680 while f(kmax) > kmax: kmax <<= 1 %o A077680 kmin = kmax >> 1 %o A077680 while kmax-kmin > 1: %o A077680 kmid = kmax+kmin>>1 %o A077680 if f(kmid) <= kmid: %o A077680 kmax = kmid %o A077680 else: %o A077680 kmin = kmid %o A077680 return kmax %o A077680 @lru_cache(maxsize=None) %o A077680 def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))) %o A077680 def h(x): return 0 if x<4 else h(5*10**((l:=len(s:=str(x)))-2)-1)-g(4*10**(l-1)-1)+(g(x) if s[0]=='4' else g(5*10**(l-1)-1) if s[0]>'4' else 0) %o A077680 def f(x): return n+x-h(x) %o A077680 return bisection(f,n,n) # _Chai Wah Wu_, May 07 2025 %Y A077680 Intersection of A005117 and A217397. %Y A077680 Cf. A077677, A077678, A077679, A077681, A077682, A077683, A077684, A077685. %K A077680 base,easy,nonn %O A077680 1,1 %A A077680 _Amarnath Murthy_, Nov 16 2002 %E A077680 More terms from _Sascha Kurz_, Jan 28 2003