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.

A080786 Triangle T(n,k) = number of k-smooth numbers <= n, read by rows.

This page as a plain text file.
%I A080786 #26 Feb 16 2025 08:32:48
%S A080786 1,1,2,1,2,3,1,3,4,4,1,3,4,4,5,1,3,5,5,6,6,1,3,5,5,6,6,7,1,4,6,6,7,7,
%T A080786 8,8,1,4,7,7,8,8,9,9,9,1,4,7,7,9,9,10,10,10,10,1,4,7,7,9,9,10,10,10,
%U A080786 10,11,1,4,8,8,10,10,11,11,11,11,12,12,1,4,8,8,10,10,11,11,11,11,12,12,13,1,4
%N A080786 Triangle T(n,k) = number of k-smooth numbers <= n, read by rows.
%C A080786 T(n,n-1) = A014684(n) for n>1;
%C A080786 T(n,2) = A029837(n) for n>1; T(n,3) = A071521(n) for n>2; T(n,5) = A071520(n) for n>4.
%C A080786 A036234(n) = number of distinct terms in n-th row. - _Reinhard Zumkeller_, Sep 17 2013
%H A080786 Reinhard Zumkeller, <a href="/A080786/b080786.txt">Rows n=1..120 of triangle, flattened</a>
%H A080786 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SmoothNumber.html">Smooth Number</a>.
%e A080786 Triangle begins:
%e A080786 .................. 1
%e A080786 ................ 1...2
%e A080786 .............. 1...2...3
%e A080786 ............ 1...3...4...4
%e A080786 .......... 1...3...4...4...5
%e A080786 ........ 1...3...5...5...6...6
%e A080786 ...... 1...3...5...5...6...6...7
%e A080786 .... 1...4...6...6...7...7...8...8
%e A080786 .. 1...4...7...7...8...8...9...9...9.
%p A080786 A080786 := proc(x,y)
%p A080786     local a,n ;
%p A080786     a := 0 ;
%p A080786     for n from 1 to x do
%p A080786         if A006530(n) <= y then
%p A080786             a := a+1 ;
%p A080786         end if;
%p A080786     end do:
%p A080786     a ;
%p A080786 end proc: # _R. J. Mathar_, Aug 31 2013
%t A080786 P[n_] := FactorInteger[n][[-1, 1]]; P[1]=1; T[n_, k_] := (For[j=0; m=1, m <= n, m++, If[P[m] <= k, j++]]; j); Table[T[n, k], {n, 1, 15}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Nov 22 2015 *)
%o A080786 (Haskell)
%o A080786 a080786 n k = a080786_tabl !! (n-1) !! (k-1)
%o A080786 a080786_row n = a080786_tabl !! (n-1)
%o A080786 a080786_tabl = map reverse $ iterate f [1] where
%o A080786    f xs@(x:_) = (x + 1) :
%o A080786                 (zipWith (+) xs (map (fromEnum . (lpf <=)) [x, x-1 ..]))
%o A080786         where lpf = fromInteger $ a006530 $ fromIntegral (x + 1)
%o A080786 -- _Reinhard Zumkeller_, Sep 17 2013
%o A080786 (Python)
%o A080786 from itertools import count, islice
%o A080786 from sympy import prevprime, integer_log
%o A080786 def A080786_T(n,k):
%o A080786     if k==1: return 1
%o A080786     def g(x,m): return x.bit_length() if m==2 else sum(g(x//(m**i),prevprime(m))for i in range(integer_log(x,m)[0]+1))
%o A080786     return g(n,prevprime(k+1))
%o A080786 def A080786_gen(): # generator of terms
%o A080786     return (A080786_T(n,k) for n in count(1) for k in range(1,n+1))
%o A080786 A080786_list = list(islice(A080786_gen(),100)) # _Chai Wah Wu_, Oct 22 2024
%Y A080786 Cf. A000079, A002473, A003586, A006530, A014684, A029837, A036234, A051037, A051038, A071520, A071521, A080197, A080681, A080682, A080683.
%K A080786 nonn,tabl
%O A080786 1,3
%A A080786 _Reinhard Zumkeller_, Mar 12 2003