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.

Showing 1-2 of 2 results.

A241944 Row sums of triangle A027420.

Original entry on oeis.org

1, 4, 9, 20, 33, 54, 79, 114, 153, 200, 251, 320, 395, 488, 589, 700, 815, 956, 1105, 1284, 1471, 1670, 1879, 2122, 2373, 2642, 2925, 3226, 3537, 3894, 4261, 4672, 5097, 5542, 6005, 6492, 6985, 7534, 8105, 8700, 9307, 9976, 10661, 11408, 12175, 12960, 13769
Offset: 0

Views

Author

Reinhard Zumkeller, May 02 2014

Keywords

Comments

a(n) = sum(A027420(n,k): k = 0..n).

Programs

  • Haskell
    a241944 = sum . a027420_row

A027384 Number of distinct products i*j with 0 <= i, j <= n.

Original entry on oeis.org

1, 2, 4, 7, 10, 15, 19, 26, 31, 37, 43, 54, 60, 73, 81, 90, 98, 115, 124, 143, 153, 165, 177, 200, 210, 226, 240, 255, 268, 297, 309, 340, 355, 373, 391, 411, 424, 461, 481, 502, 518, 559, 576, 619, 639, 660, 684, 731, 748, 779, 801, 828, 851, 904, 926, 957, 979, 1009, 1039
Offset: 0

Views

Author

Fred Schwab (fschwab(AT)nrao.edu)

Keywords

Comments

a(n) = A027420(n,0) = A027420(n,n). - Reinhard Zumkeller, May 02 2014

Crossrefs

Equals A027424 + 1, n>0.

Programs

  • Haskell
    import Data.List (nub)
    a027384 n = length $ nub [i*j | i <- [0..n], j <- [0..n]]
    -- Reinhard Zumkeller, Jan 01 2012
    
  • Maple
    A027384 := proc(n)
        local L,i,j ;
        L := {};
        for i from 0 to n do
            for j from i to n do
                L := L union {i*j};
            end do:
        end do:
        nops(L);
    end proc: # R. J. Mathar, May 06 2016
  • Mathematica
    u = {}; Table[u = Union[u, n*Range[0, n]]; Length[u], {n, 0, 100}] (* T. D. Noe, Jan 07 2012 *)
  • PARI
    a(n) = {my(s=Set()); for (i=0, n, s = setunion(s, Set(vector(n+1, k, i*(k-1))));); #s;} \\ Michel Marcus, Jan 01 2019
    
  • Python
    def A027384(n): return len({i*j for i in range(1,n+1) for j in range(1,i+1)})+1 # Chai Wah Wu, Oct 13 2023

Formula

For prime p, a(p) = a(p - 1) + p. - David A. Corneth, Jan 01 2019
Showing 1-2 of 2 results.