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-3 of 3 results.

A027430 Number of distinct products i*j*k with 1 <= i < j < k <= n.

Original entry on oeis.org

0, 0, 1, 4, 10, 16, 29, 42, 60, 75, 111, 126, 177, 206, 238, 274, 361, 396, 507, 554, 613, 677, 838, 883, 1004, 1092, 1198, 1277, 1529, 1590, 1881, 1998, 2133, 2275, 2432, 2518, 2921, 3096, 3278, 3391, 3884, 4014, 4563, 4750, 4938, 5186, 5840, 5987, 6422, 6652
Offset: 1

Views

Author

Keywords

References

  • Amarnath Murthy, Generalization of partition function introducing Smarandache Factor Partitions, Smarandache Notions Journal, 1-2-3, Vol. 11, 2000.

Crossrefs

Number of terms in row n of A083507.

Programs

  • Haskell
    import Data.List (nub)
    a027430 n = length $ nub [i*j*k | k<-[3..n], j<-[2..k-1], i<-[1..j-1]]
    -- Reinhard Zumkeller, Jan 01 2012
    
  • Mathematica
    nn = 50;
    prod = Table[0, {1 + nn^3}];
    a[1] = 0;
    a[n_] := (Do[prod[[1 + i*j*k]] = 1, {i, 0, n}, {j, i+1, n}, {k, j+1, n}]; Count[Take[prod, 1 + n^3], 1] - 1);
    Array[a, nn] (* Jean-François Alcover, Jul 31 2018, after T. D. Noe *)
  • PARI
    \\ See PARI link. David A. Corneth, Jul 31 2018
    
  • Python
    def A027430(n): return len({i*j*k for i in range(1,n+1) for j in range(1,i) for k in range(1,j)}) # Chai Wah Wu, Oct 16 2023

Formula

a(n) = A027429(n)-1. - T. D. Noe, Jan 16 2007
a(n) <= A000292(n - 2). - David A. Corneth, Jul 31 2018

Extensions

Corrected by David Wasserman, Nov 18 2004

A027426 Number of distinct products ijk with 0 <= i,j,k <= n.

Original entry on oeis.org

1, 2, 5, 11, 17, 31, 41, 66, 81, 101, 121, 174, 195, 267, 302, 344, 379, 493, 537, 679, 733, 805, 877, 1076, 1131, 1248, 1344, 1451, 1538, 1834, 1910, 2249, 2363, 2516, 2669, 2851, 2941, 3401, 3588, 3790, 3920, 4478, 4625, 5243, 5441, 5655, 5917, 6647, 6799, 7197
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (nub)
    a027426 n = length $ nub [i*j*k | i <- [0..n], j <- [0..n], k <- [0..n]]
    -- Reinhard Zumkeller, Jan 01 2012
    
  • Maple
    a:=proc(n): nops({seq(seq(seq(i*j*k,k=0..j),j=0..i),i=0..n)}) end: seq(a(n),n=0..50); # Emeric Deutsch, Jan 25 2007
  • Mathematica
    a[n_] := Table[i*j*k, {i, 0, n}, {j, i, n}, {k, j, n}] // Flatten // Union // Length; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    pr(n)=my(v=List());for(i=1,n, for(j=i,n, listput(v, i*j))); Set(v)
    a(n)=my(v=pr(n),u=v); for(i=2,n,u=Set(concat(u,v*i))); #u+1 \\ Charles R Greathouse IV, Mar 04 2014
    
  • Python
    from itertools import combinations_with_replacement as mc
    def a(n): return len(set(i*j*k for i, j, k in mc(range(n+1), 3)))
    print([a(n) for n in range(50)]) # Michael S. Branicky, May 28 2021

Formula

a(n) = A027425(n) + 1. - T. D. Noe, Jan 16 2007

A027427 Number of distinct products ij with 0 <= i < j <= n.

Original entry on oeis.org

0, 1, 2, 4, 7, 11, 14, 20, 25, 32, 37, 47, 52, 64, 71, 79, 88, 104, 112, 130, 140, 151, 162, 184, 193, 211, 224, 240, 253, 281, 292, 322, 338, 355, 372, 391, 404, 440, 459, 479, 494, 534, 550, 592, 612, 632, 655, 701, 718, 753, 775, 801, 824, 876
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A027430, etc.

Programs

  • Haskell
    import Data.List (nub)
    a027427 n = length $ nub [i*j | j <- [1..n], i <- [0..j-1]]
    -- Reinhard Zumkeller, Jan 01 2012
    
  • Maple
    A027427 := proc(n)
        local L, i, j ;
        L := {};
        for i from 0 to n do
            for j from i+1 to n do
                L := L union {i*j};
            end do:
        end do:
        nops(L);
    end proc:  # R. J. Mathar, Jun 09 2016
  • Mathematica
    a[n_] := Table[i*j, {i, 0, n}, {j, i+1, n}] // Flatten // Union // Length;
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 03 2018 *)
  • Python
    def A027427(n): return 1+len({i*j for i in range(1,n+1) for j in range(1,i)}) if n else 0 # Chai Wah Wu, Oct 13 2023

Formula

a(n) = A027428(n)+1. - T. D. Noe, Jan 16 2007
Showing 1-3 of 3 results.