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 A077685 #28 Jul 27 2025 10:11:56 %S A077685 91,93,94,95,97,901,902,903,905,906,907,910,911,913,914,915,917,919, %T A077685 921,922,923,926,929,930,933,934,935,937,938,939,941,942,943,946,947, %U A077685 949,951,953,955,957,958,959,962,965,966,967,969,970,971,973,974,977,978 %N A077685 Squarefree numbers beginning with 9. %C A077685 Intersection of A005117 and A217402. - _Michel Marcus_, Sep 14 2013 %C A077685 Lower density is 1/(15*Pi^2), upper density is 2/(3*Pi^2). - _Charles R Greathouse IV_, Nov 05 2017 %H A077685 Amiram Eldar, <a href="/A077685/b077685.txt">Table of n, a(n) for n = 1..10000</a> %t A077685 Select[Range[1000],SquareFreeQ[#]&&First[IntegerDigits[#]]==9&] (* _Harvey P. Dale_, Dec 15 2013 *) %o A077685 (PARI) isok(n) = issquarefree(n) && (digits(n)[1] == 9); \\ _Michel Marcus_, Sep 14 2013 %o A077685 (Python) %o A077685 from math import isqrt %o A077685 from sympy import mobius %o A077685 def A077685(n): %o A077685 def bisection(f,kmin=0,kmax=1): %o A077685 while f(kmax) > kmax: kmax <<= 1 %o A077685 kmin = kmax >> 1 %o A077685 while kmax-kmin > 1: %o A077685 kmid = kmax+kmin>>1 %o A077685 if f(kmid) <= kmid: %o A077685 kmax = kmid %o A077685 else: %o A077685 kmin = kmid %o A077685 return kmax %o A077685 def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))) %o A077685 def h(x): return 0 if x<9 else h(10**(len(s:=str(x))-1)-1)+(g(x)-g(9*10**(len(s)-1)-1) if s[0]=='9' else 0) %o A077685 def f(x): return n+x-h(x) %o A077685 return bisection(f,n,n) # _Chai Wah Wu_, May 06 2025 %Y A077685 Cf. A077677, A077678, A077679, A077680, A077681, A077682, A077683, A077684. %K A077685 base,easy,nonn %O A077685 1,1 %A A077685 _Amarnath Murthy_, Nov 16 2002 %E A077685 More terms from _Sascha Kurz_, Jan 28 2003