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-10 of 25 results. Next

A054523 Triangle read by rows: T(n,k) = phi(n/k) if k divides n, T(n,k)=0 otherwise (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 1, 0, 1, 4, 0, 0, 0, 1, 2, 2, 1, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 4, 2, 0, 1, 0, 0, 0, 1, 6, 0, 2, 0, 0, 0, 0, 0, 1, 4, 4, 0, 0, 1, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 2, 2, 2, 0, 1, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 6
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

From Gary W. Adamson, Jan 08 2007: (Start)
Let H be this lower triangular matrix. Then:
H * [1, 2, 3, ...] = 1, 3, 5, 8, 9, 15, ... = A018804,
H * sigma(n) = A038040 = d(n) * n = 1, 4, 6, 12, 10, ... where sigma(n) = A000203,
H * d(n) (A000005) = sigma(n) = A000203,
Row sums are A000027 (corrected by Werner Schulte, Sep 06 2020, see comment of Gary W. Adamson, Aug 03 2008),
H^2 * d(n) = d(n)*n, H^2 = A127192,
H * mu(n) (A008683) = A007431(n) (corrected by Werner Schulte, Sep 06 2020),
H^2 row sums = A018804. (End)
The Möbius inversion principle of Richard Dedekind and Joseph Liouville (1857), cf. "Concrete Mathematics", p. 136, is equivalent to the statement that row sums are the row index n. - Gary W. Adamson, Aug 03 2008
The multivariable row polynomials give n times the cycle index for the cyclic group C_n, called Z(C_n) (see the MathWorld link with the Harary reference): n*Z(C_n) = Sum_{k=1..n} T(n,k)*(y_{n/k})^k, n >= 1. E.g., 6*Z(C_6) = 2*(y_6)^1 + 2*(y_3)^2 + 1*(y_2)^3 + 1*(y_1)^6. - Wolfdieter Lang, May 22 2012
See A102190 (no 0's, rows reversed). - Wolfdieter Lang, May 29 2012
This is the number of permutations in the n-th cyclic group which are the product of k disjoint cycles. - Robert A. Beeler, Aug 09 2013

Examples

			Triangle begins
   1;
   1, 1;
   2, 0, 1;
   2, 1, 0, 1;
   4, 0, 0, 0, 1;
   2, 2, 1, 0, 0, 1;
   6, 0, 0, 0, 0, 0, 1;
   4, 2, 0, 1, 0, 0, 0, 1;
   6, 0, 2, 0, 0, 0, 0, 0, 1;
   4, 4, 0, 0, 1, 0, 0, 0, 0, 1;
  10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
   4, 2, 2, 2, 0, 1, 0, 0, 0, 0, 0, 1;
		

References

  • Ronald L. Graham, D. E. Knuth, Oren Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., 1994, p. 136.

Crossrefs

Sums incliude: A029935, A069097, A092843 (diagonal), A209295.
Sums of the form Sum_{k} k^p * T(n, k): A000027 (p=0), A018804 (p=1), A069097 (p=2), A343497 (p=3), A343498 (p=4), A343499 (p=5).

Programs

  • Haskell
    a054523 n k = a054523_tabl !! (n-1) !! (k-1)
    a054523_row n = a054523_tabl !! (n-1)
    a054523_tabl = map (map (\x -> if x == 0 then 0 else a000010 x)) a126988_tabl
    -- Reinhard Zumkeller, Jan 20 2014
    
  • Magma
    A054523:= func< n,k | k eq n select 1 else (n mod k) eq 0 select EulerPhi(Floor(n/k)) else 0 >;
    [A054523(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Jun 24 2024
    
  • Maple
    A054523 := proc(n,k) if n mod k = 0 then numtheory[phi](n/k) ; else 0; end if; end proc: # R. J. Mathar, Apr 11 2011
  • Mathematica
    T[n_, k_]:= If[k==n,1,If[Divisible[n, k], EulerPhi[n/k], 0]];
    Table[T[n,k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Dec 15 2017 *)
  • PARI
    for(n=1, 10, for(k=1, n, print1(if(!(n % k), eulerphi(n/k), 0), ", "))) \\ G. C. Greubel, Dec 15 2017
    
  • SageMath
    def A054523(n,k):
        if (k==n): return 1
        elif (n%k)==0: return euler_phi(int(n//k))
        else: return 0
    flatten([[A054523(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jun 24 2024

Formula

Sum_{k=1..n} k * T(n, k) = A018804(n). - Gary W. Adamson, Jan 08 2007
Equals A054525 * A126988 as infinite lower triangular matrices. - Gary W. Adamson, Aug 03 2008
From Werner Schulte, Sep 06 2020: (Start)
Sum_{k=1..n} T(n,k) * A000010(k) = A029935(n) for n > 0.
Sum_{k=1..n} k^2 * T(n,k) = A069097(n) for n > 0. (End)
From G. C. Greubel, Jun 24 2024: (Start)
T(2*n-1, n) = A000007(n-1), n >= 1.
T(2*n, n) = A000012(n), n >= 1.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (1 - (-1)^n)*n/2.
Sum_{k=1..floor(n+1)/2} T(n-k+1, k) = A092843(n+1).
Sum_{k=1..n} (k+1)*T(n, k) = A209295(n).
Sum_{k=1..n} k^3 * T(n, k) = A343497(n).
Sum_{k=1..n} k^4 * T(n, k) = A343498(n).
Sum_{k=1..n} k^5 * T(n, k) = A343499(n). (End)

A007997 a(n) = ceiling((n-3)(n-4)/6).

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 5, 7, 10, 12, 15, 19, 22, 26, 31, 35, 40, 46, 51, 57, 64, 70, 77, 85, 92, 100, 109, 117, 126, 136, 145, 155, 166, 176, 187, 199, 210, 222, 235, 247, 260, 274, 287, 301, 316, 330, 345, 361, 376, 392, 409, 425, 442, 460, 477, 495, 514, 532, 551, 571, 590, 610
Offset: 3

Views

Author

Keywords

Comments

Number of solutions to x+y+z=0 (mod m) with 0<=x<=y<=z
Nonorientable genus of complete graph on n nodes.
Also (with different offset) Molien series for alternating group A_3.
(1+x^3 ) / ((1-x)*(1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for H^*(S_6, F_2).
a(n+5) is the number of necklaces with 3 black beads and n white beads.
The g.f./x^5 is Z(C_3,x), the 3-variate cycle index polynomial for the cyclic group C_3, with substitution x[i]->1/(1-x^i), i=1,2,3. Therefore by Polya enumeration a(n+5) is the number of cyclically inequivalent 3-necklaces whose 3 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... . See A102190 for Z(C_3,x). - Wolfdieter Lang, Feb 15 2005
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x = (y mod 3), and x+y < n. - Clark Kimberling, Jul 02 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part integer compositions of n - 2 that are either weakly increasing or strictly decreasing. For example, the a(5) = 1 through a(13) = 15 compositions are:
(111) (112) (113) (114) (115) (116) (117) (118) (119)
(122) (123) (124) (125) (126) (127) (128)
(222) (133) (134) (135) (136) (137)
(321) (223) (224) (144) (145) (146)
(421) (233) (225) (226) (155)
(431) (234) (235) (227)
(521) (333) (244) (236)
(432) (334) (245)
(531) (532) (335)
(621) (541) (344)
(631) (542)
(721) (632)
(641)
(731)
(821)
(End)

Examples

			For m=7 (n=12), the 12 solutions are xyz = 000 610 520 511 430 421 331 322 662 653 644 554.
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004, p. 204.
  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 105.
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see \bar{I}(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.

Crossrefs

Apart from initial term, same as A058212.
A001399(n-6)*2 = A069905(n-3)*2 = A211540(n-1)*2 counts the strict case.
A014311 intersected with A225620 U A333256 ranks these compositions.
A218004 counts these compositions of any length.
A000009 counts strictly decreasing compositions.
A000041 counts weakly increasing compositions.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A333149 counts neither increasing nor decreasing strict compositions.

Programs

  • Haskell
    a007997 n = ceiling $ (fromIntegral $ (n - 3) * (n - 4)) / 6
    a007997_list = 0 : 0 : 1 : zipWith (+) a007997_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
    
  • Maple
    x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3));
    seq(ceil(binomial(n,2)/3), n=0..63); # Zerinvary Lajos, Jan 12 2009
    a := n -> (n*(n-7)-2*([1,1,-1][n mod 3 +1]-7))/6;
    seq(a(n), n=3..64); # Peter Luschny, Jan 13 2015
  • Mathematica
    k = 3; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    Table[Ceiling[((n-3)(n-4))/6],{n,3,100}] (* or *) LinearRecurrence[ {2,-1,1,-2,1},{0,0,1,1,2},100] (* Harvey P. Dale, Jan 21 2014 *)
  • PARI
    a(n)=(n^2-7*n+16)\6 \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = a(n-3) + n - 2, a(0)=0, a(1)=0, a(2)=1 [Offset 0]. - Paul Barry, Jul 14 2004
G.f.: x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3)) = x^5*(1-x+x^2)/((1-x)^2*(1-x^3)).
a(n+5) = Sum_{k=0..floor(n/2)} C(n-k,L(k/3)), where L(j/p) is the Legendre symbol of j and p. - Paul Barry, Mar 16 2006
a(3)=0, a(4)=0, a(5)=1, a(6)=1, a(7)=2, a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5). - Harvey P. Dale, Jan 21 2014
a(n) = (n^2 - 7*n + 14 - 2*(-1)^(2^(n + 1 - 3*floor((n+1)/3))))/6. - Luce ETIENNE, Dec 27 2014
a(n) = A001399(n-3) + A001399(n-6). Compare to A140106(n) = A001399(n-3) - A001399(n-6). - Gus Wiseman, Oct 17 2020
a(n) = (40 + 3*(n - 7)*n - 4*cos(2*n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/18. - Stefano Spezia, Dec 14 2021
Sum_{n>=5} 1/a(n) = 6 - 2*Pi/sqrt(3) + 2*Pi*tanh(sqrt(5/3)*Pi/2)/sqrt(15). - Amiram Eldar, Oct 01 2022

A008610 Molien series of 4-dimensional representation of cyclic group of order 4 over GF(2) (not Cohen-Macaulay).

Original entry on oeis.org

1, 1, 3, 5, 10, 14, 22, 30, 43, 55, 73, 91, 116, 140, 172, 204, 245, 285, 335, 385, 446, 506, 578, 650, 735, 819, 917, 1015, 1128, 1240, 1368, 1496, 1641, 1785, 1947, 2109, 2290, 2470, 2670, 2870, 3091, 3311, 3553, 3795, 4060, 4324, 4612, 4900, 5213, 5525, 5863
Offset: 0

Keywords

Comments

a(n) is the number of necklaces with 4 black beads and n white beads.
Also nonnegative integer 2 X 2 matrices with sum of elements equal to n, up to rotational symmetry.
The g.f. is Z(C_4,x), the 4-variate cycle index polynomial for the cyclic group C_4, with substitution x[i]->1/(1-x^i), i=1,...,4. Therefore by Polya enumeration a(n) is the number of cyclically inequivalent 4-necklaces whose 4 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_4,x). - Wolfdieter Lang, Feb 15 2005

Examples

			There are 10 inequivalent nonnegative integer 2 X 2 matrices with sum of elements equal to 4, up to rotational symmetry:
[0 0] [0 0] [0 0] [0 0] [0 1] [0 1] [0 1] [0 2] [0 2] [1 1]
[0 4] [1 3] [2 2] [3 1] [1 2] [2 1] [3 0] [1 1] [2 0] [1 1].
		

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 104.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, April 2004.

Crossrefs

Row n=2 of A343874.
Column k=4 of A037306 and A047996.

Programs

  • GAP
    a:=[1,1,3,5,10,14,22,30];; for n in [9..50] do a[n]:=2*a[n-1]-2*a[n-3] +2*a[n-4]-2*a[n-5]+2*a[n-7]-a[n-1]; od; a; # G. C. Greubel, Jan 31 2020
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) )); // G. C. Greubel, Jan 31 2020
    
  • Maple
    1/(1-x)/(1-x^2)^2/(1-x^4)*(1+2*x^3+x^4);
    seq(coeff(series(%, x, n+1), x, n), n=0..40);
  • Mathematica
    k = 4; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    LinearRecurrence[{2,0,-2,2,-2,0,2,-1}, {1,1,3,5,10,14,22,30}, 50] (* G. C. Greubel, Jan 31 2020 *)
  • PARI
    a(n)=if(n,([0,1,0,0,0,0,0,0; 0,0,1,0,0,0,0,0; 0,0,0,1,0,0,0,0; 0,0,0,0,1,0,0,0; 0,0,0,0,0,1,0,0; 0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,1; -1,2,0,-2,2,-2,0,2]^n*[1;1;3;5;10;14;22;30])[1,1],1) \\ Charles R Greathouse IV, Oct 22 2015
    
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4))) \\ G. C. Greubel, Jan 31 2020
    
  • Sage
    def A008610_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) ).list()
    A008610_list(50) # G. C. Greubel, Jan 31 2020
    

Formula

G.f.: (1+2*x^3+x^4)/((1-x)*(1-x^2)^2*(1-x^4)) = (1-x+x^2+x^3)/((1-x)^2*(1-x^2)*(1-x^4)).
a(n) = (1/48)*(2*n^3 + 3*(-1)^n*(n + 4) + 12*n^2 + 25*n + 24 + 12*cos(n*Pi/2)). - Ralf Stephan, Apr 29 2014
G.f.: (1/4)*(1/(1-x)^4 + 1/(1-x^2)^2 + 2/(1-x^4)). - Herbert Kociemba, Oct 22 2016
a(n) = -A032801(-n), per formulae of Colin Barker (A032801) and R. Stephan (above). Also, a(n) - A032801(n+4) = (1+(-1)^signum(n mod 4))/2, i.e., (1,0,0,0,1,0,0,0,...) repeating, (offset 0). - Gregory Gerard Wojnar, Jul 09 2022

Extensions

Comment and example from Vladeta Jovovic, May 18 2000

A008646 Molien series for cyclic group of order 5.

Original entry on oeis.org

1, 1, 3, 7, 14, 26, 42, 66, 99, 143, 201, 273, 364, 476, 612, 776, 969, 1197, 1463, 1771, 2126, 2530, 2990, 3510, 4095, 4751, 5481, 6293, 7192, 8184, 9276, 10472, 11781, 13209, 14763, 16451, 18278, 20254, 22386, 24682, 27151, 29799, 32637, 35673
Offset: 0

Keywords

Comments

a(n) is the number of necklaces with 5 black beads and n white beads.
The g.f. is Z(C_5,x), the 5-variate cycle index polynomial for the cyclic group C_5, with substitution x[i]->1/(1-x^i), i=1,...,5. Therefore by Polya enumeration a(n) is the number of cyclically inequivalent 5-necklaces whose 5 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_5,x). - Wolfdieter Lang, Feb 15 2005

References

  • B. Sturmfels, Algorithms in Invariant Theory, Springer, '93, p. 65.

Crossrefs

Programs

  • Magma
    [Ceiling((n+4)*(n+3)*(n+2)*(n+1)/120): n in [0..50]]; // Vincenzo Librandi, Jun 11 2013
    
  • Maple
    seq(coeff(series((1+x^2+3*x^3+4*x^4+6*x^5+4*x^6+3*x^7+x^8+x^10)/((1-x)* (1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)), x, n+1), x, n), n = 0..50); # corrected by G. C. Greubel, Sep 06 2019
    seq(ceil(binomial(n,4)/5), n=4..41); # Zerinvary Lajos, Jan 12 2009
  • Mathematica
    k = 5; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    CoefficientList[Series[(1 +x^2 +3*x^3 +4*x^4 +6*x^5 +4*x^6 +3*x^7 +x^8 +x^10)/((1-x)*(1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)), {x,0,50}], x] (* Vincenzo Librandi, Jun 11 2013 *)
    LinearRecurrence[{4,-6,4,-1,1,-4,6,-4,1}, {1,1,3,7,14,26,42,66,99}, 50] (* Harvey P. Dale, Jan 11 2017 *)
  • PARI
    a(n)=ceil((n+4)*(n+3)*(n+2)*(n+1)/120)
    
  • PARI
    Vec((1-3*x+5*x^2-3*x^3+x^4)/((1-x)^4*(1-x^5)) + O(x^50)) \\ Altug Alkan, Oct 31 2015
    
  • Sage
    [ceil(binomial(n+5,5)/(n+5)) for n in (0..50)] # G. C. Greubel, Sep 06 2019

Formula

G.f.: (1 +x^2 +3*x^3 +4*x^4 +6*x^5 +4*x^6 +3*x^7 +x^8 +x^10)/((1-x)*(1-x^2)*(1-x^3)*(1- x^4)*(1-x^5)).
a(-5-n) = a(n) for all integers.
a(n) = ceiling( binomial(n+5, 5) / (n+5) ).
G.f.: (1 -3*x +5*x^2 -3*x^3 +x^4)/((1-x)^4*(1-x^5)). - Michael Somos, Dec 04 2001
a(n) = (n^4 +10*n^3 +35*n^2 +50*n +24*(3 -2*(-1)^(2^(n-5*floor(n/5)) )))/120. - Luce ETIENNE, Oct 31 2015
G.f.: (4/(1-x^5) + 1/(1-x)^5)/5. - Herbert Kociemba, Oct 15 2016

A326835 Numbers whose divisors have distinct values of the Euler totient function (A000010).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127
Offset: 1

Author

Amiram Eldar, Oct 28 2019

Keywords

Comments

Since Sum_{d|k} phi(d) = k, these are numbers k such that the set {phi(d) | d|k} is a partition of k into distinct parts.
Includes all the odd prime numbers, since an odd prime p has 2 divisors, 1 and p, whose phi values are 1 and p-1.
If k is a term, then all the divisors of k are also terms. If k is not a term, then all its multiples are not terms. The primitive terms of the complementary sequence are 2, 63, 273, 513, 585, 825, 2107, 2109, 2255, 3069, ....
In particular, all the terms are odd since 2 is not a term (phi(1) = phi(2)).
The number of terms below 10^k for k = 1, 2, ... are 5, 49, 488, 4860, 48598, 485807, 4857394, 48572251, 485716764, 4857144075, ...
Apparently the sequence has an asymptotic density of 0.4857...

Examples

			3 is a term since it has 2 divisors, 1 and 3, and phi(1) = 1 != phi(3) = 2.
15 is a term since the phi values of its divisors, {1, 3, 5, 15}, are distinct: {1, 2, 4, 8}.
		

Programs

  • Maple
    filter:= proc(n) local D;
      D:=numtheory:-divisors(n);
      nops(D) = nops(map(numtheory:-phi,D))
    end proc:
    select(filter, [seq(i,i=1..200,2)]); # Robert Israel, Oct 29 2019
  • Mathematica
    aQ[n_] := Length @ Union[EulerPhi /@ (d = Divisors[n])] == Length[d];  Select[Range[130], aQ]
  • PARI
    isok(k) = #Set(apply(x->eulerphi(x), divisors(k))) == numdiv(k); \\ Michel Marcus, Oct 28 2019

Formula

Numbers k such that A319696(k) = A000005(k).
Numbers k such that A319695(k) = A032741(k).
Numbers k such that the k-th row of A102190 has distinct terms.

A260653 Phi-practical numbers: integers n such that x^n - 1 has divisors of every degree up to n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 15, 16, 18, 20, 24, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 72, 80, 84, 90, 96, 100, 105, 108, 112, 120, 126, 128, 132, 140, 144, 150, 156, 160, 162, 165, 168, 176, 180, 192, 195, 198, 200, 208, 210, 216, 220, 224, 234
Offset: 1

Author

Michel Marcus, Nov 13 2015

Keywords

Comments

n is phi-practical if and only if each natural number up to n is a subsum of the multiset {phi(d) : d | n} (see Pomerance link p. 2).
There are 6 terms up to 10, 28 up to 10^2, 174 up to 10^3, 1198 up to 10^4, 9301 up to 10^5, 74461 up to 10^6, 635528 up to 10^7, 5525973 up to 10^8, and 48386047 up to 10^9. - Charles R Greathouse IV, Nov 13 2015
There are 431320394 terms up to 10^10. - Charles R Greathouse IV, Sep 19 2017
Let F(x) denote the number of phi-practical numbers up to x. F(x) has order of magnitude x/log(x) (See Thompson 2012). Moreover, we have F(x) = c*x/log(x) + O(x/(log(x))^2), where 0.945 < c < 0.967 (See Pomerance, Thompson & Weingartner 2016 and Weingartner 2019). As a result, a(n) = k*n*log(n*log(n)) + O(n), where k = 1/c and 1.034 < k < 1.059. - Andreas Weingartner, Jun 29 2021

Examples

			For n = 3, the divisors of x^3 - 1 are 1, x - 1, x^2 + x + 1, x^3 - 1, so 3 is a term.
For n = 5, the divisors of x^5 - 1 are 1, x - 1, x^4 + x^3 + x^2 + x + 1, x^5 - 1, so 5 is not a term.
		

Crossrefs

Subsequence of A171581.

Programs

  • Mathematica
    PhiPracticalQ[n_] := If[n<1, False, If[n==1, True, (lst=Sort@EulerPhi[Divisors[n]]; ok=True; Do[If[lst[[m]]>Sum[lst[[l]], {l, 1, m-1}]+1, (ok=False; Break[])], {m, 1, Length[lst]}]; ok)]]; Select[Range[1000], PhiPracticalQ] (* Frank M Jackson, Jan 21 2016 *)
  • PARI
    isok(n)=vd = divisors(x^n-1); for (k=1, n, ok = 0; for (j=1, #vd, if (poldegree(vd[j])==k, ok = 1; break);); if (!ok, break);); ok;
    
  • PARI
    is(n)=#Set(apply(poldegree, divisors('x^n-1)))==n+1 \\ Charles R Greathouse IV, Nov 13 2015
    
  • PARI
    is(n)=my(u=List(),f=factor(n),t,s=1); forvec(v=vector(#f~,i,[0,f[i,2]]), t=prod(i=1,#v, if(v[i],(f[i,1]-1)*f[i,1]^(v[i]-1),1)); listput(u,t)); listsort(u); for(i=1,#u, if(u[i]>s, return(0)); s+=u[i]); 1 \\ Charles R Greathouse IV, Nov 13 2015

Formula

Pomerance, Thompson, & Weingartner show that a(n) ~ kn log n for some constant k, strengthening an earlier result of Thompson. The former give a heuristic suggesting that k is about 1/0.96. - Charles R Greathouse IV, Nov 13 2015
More precisely, a(n) = k*n*log(n*log(n)) + O(n), where 1.034 < k < 1.059 (See comments). - Andreas Weingartner, Jun 29 2021

Extensions

a(29)-a(55) from Charles R Greathouse IV, Nov 13 2015

A032191 Number of necklaces with 6 black beads and n-6 white beads.

Original entry on oeis.org

1, 1, 4, 10, 22, 42, 80, 132, 217, 335, 504, 728, 1038, 1428, 1944, 2586, 3399, 4389, 5620, 7084, 8866, 10966, 13468, 16380, 19811, 23751, 28336, 33566, 39576, 46376, 54132, 62832, 72675, 83661, 95988, 109668, 124936, 141778
Offset: 6

Keywords

Comments

The g.f. is Z(C_6,x)/x^6, the 6-variate cycle index polynomial for the cyclic group C_6, with substitution x[i]->1/(1-x^i), i=1,...,6. Therefore by Polya enumeration a(n+6) is the number of cyclically inequivalent 6-necklaces whose 6 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_6,x). Note the equivalence of this formulation with the one given as this sequence's name: start with a black 6-necklace (all 6 beads have labels 0). Insert after each of the 6 black beads k white ones if the label was k and then disregard the labels. - Wolfdieter Lang, Feb 15 2005
The g.f. of the CIK[k] transform of the sequence (b(n): n>=1), which has g.f. B(x) = Sum_{n>=1} b(n)*x^n, is CIK[k](x) = (1/k)*Sum_{d|k} phi(d)*B(x^d)^{k/d}. Here, k = 6, b(n) = 1 for all n >= 1, and B(x) = x/(1-x), from which we get another proof of the g.f.s given below. - Petros Hadjicostas, Jan 07 2018

Examples

			From _Petros Hadjicostas_, Jan 07 2018: (Start)
We explain why a(8) = 4. According to the theory of transforms by C. G. Bower, given in the weblink above, a(8) is the number of ways of arranging 6 indistinct unlabeled boxes (that may differ only in their size) as a necklace, on a circle, such that the total number of balls in all of them is 8. There are 4 ways for doing that on a circle: 311111, 221111, 212111, and 211211.
To translate these configurations of boxes into necklaces with 8 beads, 6 of them black and 2 of them white, we modify an idea given above by W. Lang. We replace each box that has m balls with a black bead followed by m-1 white beads. The four examples above become BWWBBBBB, BWBWBBBB, BWBBWBBB, and BWBBBWBB.
(End)
		

Crossrefs

Column k=6 of A047996.

Programs

  • Mathematica
    k = 6; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)

Formula

"CIK[ 6 ]" (necklace, indistinct, unlabeled, 6 parts) transform of 1, 1, 1, 1, ...
G.f.: (1-x+x^2+4*x^3+2*x^4+3*x^6+x^7+x^8)/((1-x)^6*(1+x)^3*(1+x+x^2)^2*(1-x+x^2)) (conjectured). - Ralf Stephan, May 05 2004
G.f.: (x^6)*(1-x+x^2+4*x^3+2*x^4+3*x^6+x^7+x^8)/((1-x)^2*(1-x^2)^2*(1-x^3)*(1-x^6)). (proving the R. Stephan conjecture (with the correct offset) in a different version; see Comments entry above). - Wolfdieter Lang, Feb 15 2005
G.f.: (1/6)*x^6*((1-x)^(-6)+(1-x^2)^(-3)+2*(1-x^3)^(-2)+2*(1-x^6)^(-1)). - Herbert Kociemba, Oct 22 2016

A032192 Number of necklaces with 7 black beads and n-7 white beads.

Original entry on oeis.org

1, 1, 4, 12, 30, 66, 132, 246, 429, 715, 1144, 1768, 2652, 3876, 5538, 7752, 10659, 14421, 19228, 25300, 32890, 42288, 53820, 67860, 84825, 105183, 129456, 158224, 192130, 231880, 278256, 332112, 394383, 466089, 548340
Offset: 7

Keywords

Comments

"CIK[ 7 ]" (necklace, indistinct, unlabeled, 7 parts) transform of 1, 1, 1, 1, ...
The g.f. is Z(C_7,x)/x^7, the 7-variate cycle index polynomial for the cyclic group C_7, with substitution x[i]->1/(1-x^i), i=1,...,7. Therefore by Polya enumeration a(n+7) is the number of cyclically inequivalent 7-necklaces whose 7 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... See A102190 for Z(C_7,x) and the comment in A032191 on the equivalence of this problem with the one given in the 'Name' line. - Wolfdieter Lang, Feb 15 2005
From Petros Hadjicostas, Dec 08 2017: (Start)
For p prime, if a_p(n) is the number of necklaces with p black beads and n-p white beads, then (a_p(n): n>=1) = CIK[p](1, 1, 1, 1, ...). Since CIK[k](B(x)) = (1/k)*Sum_{d|k} phi(d)*B(x^d)^{k/d} with k = p and B(x) = x + x^2 + x^3 + ... = x/(1-x), we get Sum_{n>=1} a_p(n)*x^n = ((p-1)/(1 - x^p) + 1/(1 - x)^p)*x^p/p, which is Herbert Kociemba's general formula for the g.f. when p is prime.
We immediately get a_p(n) = ((p-1)/p)*I(p|n) + (1/p)*C(n-1,p-1) = ((p-1)/p)*I(p|n) + (1/n)*C(n,p) = ceiling(C(n,p)/n), which is a generalization of the conjecture made by N. J. A. Sloane and Wolfdieter Lang. (Here, I(condition) = 1 if the condition holds, and 0 otherwise. Also, as usual, for integers n and k, C(n,k) = 0 if 0 <= n < k.)
Since the sequence (a_p(n): n>=1) is column k = p of A047996(n,k) = T(n,k), we get from the documentation of the latter sequence that a_p(n) = T(n, p) = (1/n)*Sum_{d|gcd(n,p)} phi(d)*C(n/d, p/d), from which we get another proof of the formulae for a_p(n).
(End)

Crossrefs

Programs

  • Mathematica
    k = 7; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    DeleteCases[CoefficientList[Series[x^7 (x^6 - 5 x^5 + 13 x^4 - 17 x^3 + 13 x^2 - 5 x + 1)/((x^6 + x^5 + x^4 + x^3 + x^2 + x + 1) (1 - x)^7), {x, 0, 41}], x], 0] (* Michael De Vlieger, Oct 10 2016 *)

Formula

Empirically this is ceiling(C(n, 7)/n). - N. J. A. Sloane
G.f.: x^7*(x^6 - 5*x^5 + 13*x^4 - 17*x^3 + 13*x^2 - 5*x + 1)/((x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)*(1 - x)^7). - Gael Linder (linder.gael(AT)wanadoo.fr), Jan 13 2005
G.f.: (6/(1 - x^7) + 1/(1 - x)^7)*x^7/7; in general, for a necklace with p black beads and p prime, the g.f. is ((p-1)/(1 - x^p) + 1/(1 - x)^p)*x^p/p. - Herbert Kociemba, Oct 15 2016
a(n) = ceiling(binomial(n, 7)/n) (conjecture by Wolfdieter Lang).
a(n) = (6/7)*I(7|n) + (1/7)*C(n-1,6) = (6/7)*I(7|n) + (1/n)*C(n,7), where I(condition) = 1 if the condition holds, and = 0 otherwise. - Petros Hadjicostas, Dec 08 2017

A348158 a(n) is the sum of the distinct values obtained when the Euler totient function is applied to the divisors of n.

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 7, 9, 5, 11, 7, 13, 7, 15, 15, 17, 9, 19, 15, 21, 11, 23, 15, 25, 13, 27, 21, 29, 15, 31, 31, 33, 17, 35, 25, 37, 19, 39, 31, 41, 21, 43, 33, 45, 23, 47, 31, 49, 25, 51, 39, 53, 27, 55, 49, 57, 29, 59, 31, 61, 31, 57, 63, 65, 33, 67, 51, 69
Offset: 1

Author

Amiram Eldar, Oct 03 2021

Keywords

Comments

The sum of the distinct values of the n-th row of A102190.
Apparently, all the terms are odd.

Examples

			The divisors of 12 are {1, 2, 3, 4, 6, 12} and their phi values are {1, 1, 2, 2, 2, 4}. The set of distinct values is {1, 2, 4} whose sum is 7. Therefore, a(12) = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(i, i=map(phi, divisors(n))):
    seq(a(n), n=1..69);  # Alois P. Heinz, Nov 15 2021
  • Mathematica
    a[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; Array[a, 100]
  • PARI
    a(n) = vecsum(Set(apply(eulerphi, divisors(n)))); \\ Michel Marcus, Oct 04 2021
    
  • Python
    from sympy import totient, divisors
    def A348158(n): return sum(set(map(totient,divisors(n,generator=True)))) # Chai Wah Wu, Nov 15 2021

Formula

a(n) <= n, with equality if and only if n is in A326835.

A212355 Coefficients for the cycle index polynomial for the dihedral group D_n multiplied by 2n, n>=1, read as partition polynomial.

Original entry on oeis.org

2, 2, 2, 2, 3, 1, 2, 0, 3, 2, 1, 4, 0, 0, 0, 5, 0, 1, 2, 0, 0, 2, 0, 0, 4, 0, 3, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 4, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Author

Wolfdieter Lang, Jun 02 2012

Keywords

Comments

The partitions are ordered like in Abramowitz-Stegun (for the reference see A036036, where also a link to a work by C. F. Hindenburg from 1779 is found where this order has been used).
The row lengths sequence is A000041. The number of nonzero entries in row nr. n is 1 for n=1, 2 for n=2 and A000005(n)+1 otherwise. This is the sequence A212356.
The cycle index (multivariate polynomial) for the dihedral group D_n (of order 2*n), called Z(D_n), is for odd n given by (Z(C_n) + x[1]*x[2]^((n-1)/2))/2 and for even n by (2*Z(C_n) + x[2] ^(n/2) + x[1]^2*x[2]^((n-2)/2))/4, where Z(C_n) is the cycle index for the cyclic group C_n. For the coefficients of Z(C_n) see A054523 or A102190. See the Harary and Palmer reference.

Examples

			n\k   1  2  3  4  5  6  7  8  9 10 11 ...
1:    2
2:    2  2
3:    2  3  1
4:    2  0  3  2  1
5:    4  0  0  0  5  0  1
6:    2  0  0  2  0  0  4  0  3  0  1
...
See the link for rows n=1..8 and the corresponding Z(D_n) polynomials for n=1..15.
n=6: Z(D_6) = (2*x[6] + 2*x[3]^2 +  4*x[2]^3 + 3*x[1]^2*x[2]^2 + x[1]^6)/12, because the relevant partitions of 6 appear for k=1: 6, k=4: 3^2, k=7: 2^3 and k=11: 1^6
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 37, (2.2.11).

Crossrefs

Programs

  • PARI
    C(v)={my(n=vecsum(v), r=#v); if(v[1]==v[r], eulerphi(v[1])) + if(v[r]<=2 && 2*r <= n+2, if(n%2, n, n/2)) }
    row(n)=[C(Vec(p)) | p<-Vec(partitions(n))]
    { for(n=1, 7, print(row(n))) } \\ Andrew Howroyd, Feb 02 2022

Formula

The cycle index polynomial for the dihedral group D_n is Z(D_n) = (a(n,k)*x[1]^(e[k,1])*x[2]^(e[k,2])*...*x[n]^(e[k,n]))/(2*n), n>=1, if the k-th partition of n in Abramowitz-Stegun order is 1^(e[k,1]) 2^(e[k,2]) ... n^(e[k,n]), where a part j with vanishing exponent e[k,j] has to be omitted. The n dependence of the exponents has been suppressed. See the comment above for the Z(D_n) formula and the link for these polynomials for n=1..15.
a(n,k) is the coefficient the term of 2*n*Z(D_n) corresponding to the k-th partition of n in Abramowitz-Stegun order. a(n,k) = 0 if there is no such term in Z(D_n).

Extensions

Terms a(67) and beyond from Andrew Howroyd, Feb 02 2022
Showing 1-10 of 25 results. Next