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.

User: Jurjen N.E. Bos

Jurjen N.E. Bos's wiki page.

Jurjen N.E. Bos has authored 5 sequences.

A276833 Sum of mu(d)*phi(d) over divisors d of n.

Original entry on oeis.org

1, 0, -1, 0, -3, 0, -5, 0, -1, 0, -9, 0, -11, 0, 3, 0, -15, 0, -17, 0, 5, 0, -21, 0, -3, 0, -1, 0, -27, 0, -29, 0, 9, 0, 15, 0, -35, 0, 11, 0, -39, 0, -41, 0, 3, 0, -45, 0, -5, 0, 15, 0, -51, 0, 27, 0, 17, 0, -57, 0, -59, 0, 5, 0, 33, 0, -65, 0, 21, 0, -69, 0, -71, 0, 3, 0, 45, 0, -77, 0, -1, 0, -81, 0, 45, 0, 27, 0, -87, 0, 55, 0, 29, 0, 51, 0, -95, 0, 9
Offset: 1

Author

Jurjen N.E. Bos, Sep 20 2016

Keywords

Comments

Discovered when incorrectly applying Mobius inversion formula.
a(n)*a(m) = a(n*m) if gcd(n,m)=1 (has a simple proof).
Strongly multiplicative: a(p^e) = 2 - p. - Charles R Greathouse IV, Oct 01 2019

Examples

			mu(d)*phi(d) = 1*1,-1*1,-1*2, 1*2 for d=1,2,3,6, so a(6) = 1*1-1*1-1*2+1*2 = 0.
		

Crossrefs

For squarefree numbers, the absolute value is equal to A166586 (first exception at 25).
Cf. A097945.

Programs

  • Maple
    with(numtheory):seq(convert(map(x->2-x,factorset(n)),`*`),n=1..99); # Robert FERREOL, Mar 14 2020
  • Mathematica
    Table[Sum[MoebiusMu[d] EulerPhi[d], {d, Divisors[n]}], {n, 99}] (* Indranil Ghosh, Mar 10 2017 *)
    a[1] = 1; a[n_] := Times @@ ((2 - First[#])& /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 21 2020 *)
  • PARI
    r=0;fordiv(n,d,r+=moebius(d)*eulerphi(d));r
    
  • PARI
    a(n) = sumdiv(n, d, moebius(d)*eulerphi(d)); \\ Michel Marcus, Sep 30 2016
    
  • PARI
    a(n)=my(f=factor(n)[,1]); prod(i=1,#f, 2-f[i]) \\ Charles R Greathouse IV, Oct 01 2019
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 - p*X + X)/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020

Formula

a(n) = Sum_{d|n} mu(d)*phi(d).
G.f.: Sum_{k>=1} mu(k)*phi(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Nov 06 2018
a(n) = Product_{p prime and p|n} (2-p). - Robert FERREOL, Mar 14 2020
Dirichlet g.f.: zeta(s) * Product_{primes p} (1 - p^(1-s) + p^(-s)). - Vaclav Kotesovec, Jun 14 2020
a(n) = Sum_{k = 1..n} mu(lcm(k, n)/k). - Peter Bala, Jan 16 2024

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

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

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

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

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

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

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