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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 12 2003

Keywords

Comments

T(n,n-1) = A014684(n) for n>1;
T(n,2) = A029837(n) for n>1; T(n,3) = A071521(n) for n>2; T(n,5) = A071520(n) for n>4.
A036234(n) = number of distinct terms in n-th row. - Reinhard Zumkeller, Sep 17 2013

Examples

			Triangle begins:
.................. 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...8...8
.. 1...4...7...7...8...8...9...9...9.
		

Crossrefs

Programs

  • Haskell
    a080786 n k = a080786_tabl !! (n-1) !! (k-1)
    a080786_row n = a080786_tabl !! (n-1)
    a080786_tabl = map reverse $ iterate f [1] where
       f xs@(x:_) = (x + 1) :
                    (zipWith (+) xs (map (fromEnum . (lpf <=)) [x, x-1 ..]))
            where lpf = fromInteger $ a006530 $ fromIntegral (x + 1)
    -- Reinhard Zumkeller, Sep 17 2013
    
  • Maple
    A080786 := proc(x,y)
        local a,n ;
        a := 0 ;
        for n from 1 to x do
            if A006530(n) <= y then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Aug 31 2013
  • Mathematica
    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 *)
  • Python
    from itertools import count, islice
    from sympy import prevprime, integer_log
    def A080786_T(n,k):
        if k==1: return 1
        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))
        return g(n,prevprime(k+1))
    def A080786_gen(): # generator of terms
        return (A080786_T(n,k) for n in count(1) for k in range(1,n+1))
    A080786_list = list(islice(A080786_gen(),100)) # Chai Wah Wu, Oct 22 2024