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

A100450 Number of ordered triples (i,j,k) with |i| + |j| + |k| <= n and gcd(i,j,k) <= 1.

Original entry on oeis.org

1, 7, 19, 51, 99, 195, 291, 483, 675, 963, 1251, 1731, 2115, 2787, 3363, 4131, 4899, 6051, 6915, 8355, 9507, 11043, 12483, 14595, 16131, 18531, 20547, 23139, 25443, 28803, 31107, 34947, 38019, 41859, 45315, 49923, 53379, 58851, 63171, 68547
Offset: 0

Views

Author

N. J. A. Sloane, Nov 21 2004

Keywords

Comments

Note that gcd(0,m) = m for any m.
I would also like to get the sequences of the numbers of distinct sums i+j+k (also distinct products i*j*k) over all ordered triples (i,j,k) with |i| + |j| + |k| <= n; also over all ordered triples (i,j,k) with |i| + |j| + |k| <= n and gcd(i,j,k) <= 1.
Also the sequences of the numbers of distinct sums i+j+k (also distinct products i*j*k) over all ordered triples (i,j,k) with i >= 0, j >= 0, k >= 0 and i + j + k = n; also over all ordered triples (i,j,k) with i >= 0, j >= 0, k >= 0, i + j + k = n and gcd(i,j,k) <= 1.
Also the number of ordered triples (i,j,k) with i >= 0, j >= 0, k >= 0, i + j + k = n and gcd(i,j,k) <= 1.
From Robert Price, Mar 05 2013: (Start)
The sequences that address the previous comments are:
Distinct sums i+j+k with or without the GCD qualifier results in a(n)=2n+1 (A005408).
Distinct products i*j*k without the GCD qualifier is given by A213207.
Distinct products i*j*k with the GCD qualifier is given by A213208.
With the restriction i,j,k >= 0 ...
Distinct sums or products equal to n is trivial and always equals one (A000012).
Distinct sums <= n results in a(n)=n (A001477).
Distinct products <= n without the GCD qualifier is given by A213213.
Distinct products <= n with the GCD qualifier is given by A213212.
Ordered triples with sum = n without the GCD qualifier is A000217(n+1).
Ordered triples with sum = n with the GCD qualifier is A048240.
Ordered triples with sum <= n without the GCD qualifier is A000292.
Ordered triples with sum <= n with the GCD qualifier is A048241. (End)
This sequence (A100450) without the GCD qualifier results in A001845. - Robert Price, Jun 04 2013

Crossrefs

Programs

  • Maple
    f:=proc(n) local i,j,k,t1,t2,t3; t1:=0; for i from -n to n do for j from -n to n do t2:=gcd(i,j); for k from -n to n do if abs(i) + abs(j) + abs(k) <= n then t3:=gcd(t2,k); if t3 <= 1 then t1:=t1+1; fi; fi; od: od: od: t1; end;
  • Mathematica
    f[n_] := Length[ Union[ Flatten[ Table[ If[ Abs[i] + Abs[j] + Abs[k] <= n && GCD[i, j, k] <= 1, {i, j, k}, {0, 0, 0}], {i, -n, n}, {j, -n, n}, {k, -n, n}], 2]]]; Table[ f[n], {n, 0, 40}] (* Robert G. Wilson v, Dec 14 2004 *)

Formula

G.f.: (3 + Sum_{k>=1} (moebius(k)*((1+x^k)/(1-x^k))^3))/(1-x). - Vladeta Jovovic, Nov 22 2004. [Sketch of proof: Let b(n) = number of ordered triples (i, j, k) with |i| + |j| + |k| = n and gcd(i, j, k) <= 1. Then a(n) = A100450(n) = partial sums of b(n) and Sum_{d divides n} b(d) = 4*n^2+2 = A005899(n) with g.f. ((1+x)/(1-x))^3.]

A048134 Number of colors that can be mixed with up to n units of yellow, blue, red.

Original entry on oeis.org

0, 3, 6, 13, 22, 40, 55, 88, 118, 163, 205, 280, 334, 436, 517, 625, 733, 901, 1018, 1225, 1381, 1591, 1786, 2083, 2287, 2617, 2887, 3238, 3544, 4006, 4306, 4831, 5239, 5749, 6205, 6817, 7267, 8005, 8572, 9280, 9880, 10780, 11374, 12361
Offset: 0

Views

Author

Keywords

Examples

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

Crossrefs

Two colors gives A005728.

Programs

Formula

a(n) = number of triples (i, j, k) with 1 <= i+j+k <= n and gcd(i, j, k) = 1.
Cumulative sums of A048240(k) for k>0.

Extensions

More terms from Robin Trew (trew(AT)hcs.harvard.edu).

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

A032125 "BIK" (reversible, indistinct, unlabeled) transform of 3,3,3,3...

Original entry on oeis.org

3, 9, 30, 108, 408, 1584, 6240, 24768, 98688, 393984, 1574400, 6294528, 25171968, 100675584, 402677760, 1610661888, 6442549248, 25770000384, 103079608320, 412317646848, 1649269014528, 6597072912384, 26388285358080, 105553128849408
Offset: 1

Views

Author

Keywords

Comments

Number of solutions (x,y,z) to x+y+z = 2^n, x>=0, y>=0, z>=0, gcd(x,y,z)=1. - Vladeta Jovovic, Dec 22 2002

Crossrefs

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

Programs

  • Mathematica
    Table[3*2^(n-2)(2^(n-1)+1),{n,30}] (* or *) LinearRecurrence[{6,-8},{3,9},30] (* Harvey P. Dale, Jan 01 2012 *)
    RecurrenceTable[{a[0]== 3, a[1]== 9, a[n]== 6*a[n-1]  - 8*a[n-2]}, a, {n,50}] (* G. C. Greubel, Aug 22 2015 *)

Formula

a(n) = 3*2^(n-2)*(2^(n-1)+1). - Vladeta Jovovic, Dec 22 2002
Binomial transform of A067771 (if the offset is changed to 0). - Carl Najafi, Sep 09 2011
G.f. -3*x*(-1+3*x) / ( (4*x-1)*(2*x-1) ). a(n)=3*A007582(n-1). - R. J. Mathar, Sep 11 2011
a(1)=3, a(2)=9, a(n) = 6*a(n-1)-8*a(n-2). [Harvey P. Dale, Jan 01 2012]
E.g.f.: (3/8)*(exp(4*x) + 2*exp(2*x) - 3). - G. C. Greubel, Aug 22 2015

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

Original entry on oeis.org

0, 3, 3, 1, 0, 6, 3, 0, 0, 3, 6, 3, 0, 6, 6, 0, 0, 9, 3, 3, 0, 6, 3, 0, 0, 6, 12, 3, 0, 12, 6, 0, 0, 6, 9, 6, 0, 6, 9, 0, 0, 15, 6, 3, 0, 6, 6, 0, 0, 6, 12, 6, 0, 12, 9, 0, 0, 6, 6, 9, 0, 12, 12, 0, 0, 18, 12, 3, 0, 12, 6, 0, 0, 9, 18, 6, 0, 12, 6, 0, 0, 9, 9, 9
Offset: 0

Views

Author

Seiichi Manyama, Nov 29 2017

Keywords

Comments

a(n)=0 for n in A047536. - Robert Israel, Nov 30 2017

Examples

			a(1) = 3;
(1,0,0) = 1 and 1^2 + 0^2 + 0^2 = 1.
(0,1,0) = 1 and 0^2 + 1^2 + 0^2 = 1.
(0,0,1) = 1 and 0^2 + 0^2 + 1^2 = 1.
a(2) = 3;
(1,1,0) = 1 and 1^2 + 1^2 + 0^2 = 2.
(1,0,1) = 1 and 1^2 + 0^2 + 1^2 = 2.
(0,1,1) = 1 and 0^2 + 1^2 + 1^2 = 2.
a(3) = 1;
(1,1,1) = 1 and 1^2 + 1^2 + 1^2 = 3.
a(5) = 6;
(2,1,0) = 1 and 2^2 + 1^2 + 0^2 = 5.
(2,0,1) = 1 and 2^2 + 0^2 + 1^2 = 5.
(1,2,0) = 1 and 1^2 + 2^2 + 0^2 = 5.
(1,0,2) = 1 and 1^2 + 0^2 + 2^2 = 5.
(0,2,1) = 1 and 0^2 + 2^2 + 1^2 = 5.
(0,1,2) = 1 and 0^2 + 1^2 + 2^2 = 5.
		

Crossrefs

Programs

  • Maple
    N:= 100:
    V:= Array(0..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:
    convert(V,list); # Robert Israel, Nov 30 2017
  • Mathematica
    f[n_] := Total[ Length@ Permutations@# & /@ Select[ PowersRepresentations[n, 3, 2], GCD[#[[1]], #[[2]], #[[3]]] == 1 &]]; Array[f, 90, 0] (* Robert G. Wilson v, Nov 30 2017 *)

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