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.

A080686 Number of 19-smooth numbers <= n.

This page as a plain text file.
%I A080686 #17 Apr 29 2025 04:43:41
%S A080686 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,22,23,24,25,
%T A080686 26,27,27,28,28,29,30,31,32,33,33,34,35,36,36,37,37,38,39,39,39,40,41,
%U A080686 42,43,44,44,45,46,47,48,48,48,49,49,49,50,51,52,53,53,54,54,55,55,56
%N A080686 Number of 19-smooth numbers <= n.
%C A080686 Range = primes 2 to 19. Input pn=19 in script below. Code below is much faster than the code for cross-reference. For input of n=200 13 times as fast and many times faster for larger input of n.
%H A080686 Amiram Eldar, <a href="/A080686/b080686.txt">Table of n, a(n) for n = 1..10000</a>
%t A080686 Accumulate[Table[Boole[Max[FactorInteger[n][[;; , 1]]] <= 19], {n, 100}]] (* _Amiram Eldar_, Apr 29 2025 *)
%o A080686 (PARI) smoothn(n,pn) = { for(m=1,n, pr=1; forprime(p=2,pn, pr*=p; ); ct=1; for(x=1,m, f=0; forprime(y=nextprime(pn+1),floor(x), if(x%y == 0,f=1; break) ); if(gcd(x,pr)<>1,if(f==0,ct+=1; )) ); print1(ct","); ) }
%o A080686 (Python)
%o A080686 from sympy import integer_log, prevprime
%o A080686 def A080686(n):
%o A080686     def g(x,m): return sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1)) if m==3 else sum(g(x//(m**i),prevprime(m))for i in range(integer_log(x,m)[0]+1))
%o A080686     return g(n,19) # _Chai Wah Wu_, Sep 17 2024
%Y A080686 Cf. A080682.
%Y A080686 Number of p-smooth numbers <= n: A070939 (p=2), A071521 (p=3), A071520 (p=5), A071604 (p=7), A071523 (p=11), A080684 (p=13), A080685 (p=17), this sequence (p=19).
%K A080686 easy,nonn
%O A080686 1,2
%A A080686 _Cino Hilliard_, Mar 02 2003