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

A048240 Number of new colors that can be mixed with n units of yellow, blue, red.

Original entry on oeis.org

1, 3, 3, 7, 9, 18, 15, 33, 30, 45, 42, 75, 54, 102, 81, 108, 108, 168, 117, 207, 156, 210, 195, 297, 204, 330, 270, 351, 306, 462, 300, 525, 408, 510, 456, 612, 450, 738, 567, 708, 600, 900, 594, 987, 750, 900, 825, 1173, 792, 1239, 930, 1200
Offset: 0

Views

Author

Jurjen N.E. Bos, N. J. A. Sloane, Robin Trew (trew(AT)hcs.harvard.edu)

Keywords

Crossrefs

A032125(n) = a(2^n).

Programs

  • Maple
    A048240 := proc(n) local ans, i, j, k; ans := 0; for i from n by -1 to 0 do for j from n by -1 to 0 do k := n - i - j; if 0 <= k and k <= n and gcd(gcd(i, j), k) = 1 then ans := ans + 1; fi; od; od; RETURN(ans); end;
  • Mathematica
    a[n_] := Sum[ MoebiusMu[n/d]*(d+1)*(d+2)/2, {d, Divisors[n]}]; a[0] = 1; Table[a[n], {n, 0, 51}] (* Jean-François Alcover, Jun 14 2012, after Vladeta Jovovic *)

Formula

a(n) = number of triples (i, j, k) with i+j+k = n and gcd(i, j, k) = 1.
a(n) = Sum_{d|n} mu(n/d)*(d+1)*(d+2)/2. G.f.: Sum_{k>0} mu(k)/(1-x^k)^3. - Vladeta Jovovic, Dec 22 2002

A048241 Number of colors that can be mixed with n >= 0 units of yellow, blue, red.

Original entry on oeis.org

1, 4, 7, 14, 23, 41, 56, 89, 119, 164, 206, 281, 335, 437, 518, 626, 734, 902, 1019, 1226, 1382, 1592, 1787, 2084, 2288, 2618, 2888, 3239, 3545, 4007, 4307, 4832, 5240, 5750, 6206, 6818, 7268, 8006, 8573, 9281, 9881, 10781, 11375, 12362
Offset: 0

Views

Author

Jurjen N.E. Bos, N. J. A. Sloane, Robin Trew (trew(AT)hcs.harvard.edu)

Keywords

Examples

			a(2)=7: white, primary and secondary colors (null, Y^1, B^1, R^1, Y^1*B^1, Y^1*R^1, B^1*R^1).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[ Table[ Sum[ MoebiusMu[n/d]*(d+1)*(d+2)/2, {d, Divisors[n]}], {n, 0, 43}]] + 1 (* Jean-François Alcover, Oct 16 2013, after T. D. Noe *)

Formula

a(n) = number of triples (i, j, k) with 0 <= i+j+k <= n and gcd(i, j, k) = 1.
a(n) = A048134(n)+1. - T. D. Noe, Jan 16 2007

A295849 Number of nonnegative solutions to gcd(x,y,z) = 1 and x^2 + y^2 + z^2 <= n.

Original entry on oeis.org

0, 3, 6, 7, 7, 13, 16, 16, 16, 19, 25, 28, 28, 34, 40, 40, 40, 49, 52, 55, 55, 61, 64, 64, 64, 70, 82, 85, 85, 97, 103, 103, 103, 109, 118, 124, 124, 130, 139, 139, 139, 154, 160, 163, 163, 169, 175, 175, 175, 181, 193, 199, 199, 211, 220, 220, 220, 226, 232, 241
Offset: 0

Views

Author

Seiichi Manyama, Nov 29 2017

Keywords

Crossrefs

Programs

  • Maple
    N:= 100:
    V:= Vector(N):
    for x from 0 to floor(sqrt(N/3)) do
      for y from x to floor(sqrt((N-x^2)/2)) do
        for z from y to floor(sqrt(N-x^2-y^2)) do
          if igcd(x,y,z) = 1 then
            r:= x^2 + y^2 + z^2;
            m:= nops({x,y,z});
            if m=3 then V[r]:= V[r]+6
            elif m=2 then V[r]:= V[r]+3
            else V[r]:= V[r]+1
            fi
          fi
    od od od:
    0,op(ListTools:-PartialSums(convert(V,list))); # Robert Israel, Nov 30 2017
  • Mathematica
    a[n_] := Sum[Boole[GCD[i, j, k] == 1], {i, 0, Sqrt[n]}, {j, 0, Sqrt[n - i^2]}, {k, 0, Sqrt[n - i^2 - j^2]}];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jul 07 2018, after Andrew Howroyd *)
  • PARI
    a(n) = {sum(i=0, sqrtint(n), sum(j=0, sqrtint(n-i^2), sum(k=0, sqrtint(n-i^2-j^2), gcd([i, j, k]) == 1)))} \\ Andrew Howroyd, Dec 12 2017

Formula

a(n) = a(n-1) + A295848(n) for n > 0.

A048600 Array a(n,k) = number of colors that can be produced by n units of paint from k primary colors, read by descending antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 5, 6, 4, 1, 7, 13, 10, 5, 1, 11, 22, 26, 15, 6, 1, 13, 40, 51, 45, 21, 7, 1, 19, 55, 103, 100, 71, 28, 8, 1, 23, 88, 161, 221, 176, 105, 36, 9, 1, 29, 118, 277, 386, 422, 287, 148, 45, 10
Offset: 1

Views

Author

Keywords

Examples

			Table array begins:
  1  1  1   1   1
  2  3  5   7  11
  3  6 13  22  40
  4 10 26  51 103
  5 15 45 100 221
  ...
a(3,2) = 6 because you can take each color once, or mix two colors.
		

Crossrefs

Cf. A005728 (row 2), A048134 (row 3). Cf. A048240, A048241.

Programs

  • Mathematica
    max = 10; col[k_] := Accumulate[ Table[ Sum[ MoebiusMu[n/d]*Product[d+j, {j, 1, k}]/k!, {d, Divisors[n]}], {n, 1, max}]]; t = Table[col[k], {k, 0, max-1}] // Transpose; Flatten[ Table[ t[[n-k+1, k]], {n, 1, max}, {k, 1, n}]] (* Jean-François Alcover, Dec 26 2012 *)

Formula

All partitions of size n: if GCD is not 1, skip; else: fill the partition with zeros to get k numbers; count occurrences of each number (e.g.: 2 2 1 0 0 0 becomes 2 1 3); compute multinomial of k over these digits (e.g. 2 1 3 becomes 6!/(2!*1!*3!) = 60); sum.

Extensions

Name edited by Michel Marcus, Aug 11 2024
Showing 1-4 of 4 results.