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

A047918 Triangular array read by rows: a(n,k) = Sum_{d|k} mu(d)*U(n,k/d) if k|n else 0, where U(n,k) = A047916(n,k) (1<=k<=n).

Original entry on oeis.org

1, 2, 0, 6, 0, 0, 8, 0, 0, 16, 20, 0, 0, 0, 100, 12, 24, 36, 0, 0, 648, 42, 0, 0, 0, 0, 0, 4998, 32, 32, 0, 320, 0, 0, 0, 39936, 54, 0, 270, 0, 0, 0, 0, 0, 362556, 40, 160, 0, 0, 3800, 0, 0, 0, 0, 3624800, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39916690, 48, 96
Offset: 1

Views

Author

Keywords

References

  • J. E. A. Steggall, On the numbers of patterns which can be derived from certain elements, Mess. Math., 37 (1907), 56-61.

Crossrefs

Programs

  • Haskell
    a047918 n k = sum [a008683 (fromIntegral d) * a047916 n (k `div` d) |
                       mod n k == 0, d <- [1..k], mod k d == 0]
    a047918_row n = map (a047918 n) [1..n]
    a047918_tabl = map a047918_row [1..]
    -- Reinhard Zumkeller, Mar 19 2014
  • Mathematica
    U[n_, k_] := If[ Divisible[n, k], EulerPhi[n/k]*(n/k)^k*k!, 0]; a[n_, k_] := Sum[ If[ Divisible[n, k], MoebiusMu[d]*U[n, k/d], 0], {d, Divisors[k]}]; Flatten[ Table[ a[n, k], {n, 1, 12}, {k, 1, n}]] (* Jean-François Alcover, May 04 2012 *)

Extensions

Offset corrected by Reinhard Zumkeller, Mar 19 2014

A064649 Row sums of the table A047916.

Original entry on oeis.org

1, 4, 12, 40, 140, 816, 5082, 40800, 363258, 3632880, 39916910, 479052528, 6227020956, 87178936992, 1307674429440, 20922800222848, 355687428096272, 6402373892575992, 121645100408832342, 2432902011892837920
Offset: 1

Views

Author

Antti Karttunen, Oct 04 2001

Keywords

Crossrefs

Also n*A061417[n]. Cf. A047918, A002619.

Programs

  • Haskell
    a064649 = sum . a047916_row  -- Reinhard Zumkeller, Mar 19 2014
  • Maple
    A064649 := proc(n) local d, s; s := 0; for d in divisors(n) do s := s + phi(n/d)*(n/d)^d*d!; od; RETURN(s); end;
  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[n/#]*(n/#)^#*#!&]; Array[a, 20] (* Jean-François Alcover, Mar 06 2016 *)
  • PARI
    { for (n=1, 100, a=0; v=divisors(n); for (i=1, length(v), d=v[i]; a+=eulerphi(n/d)*(n/d)^d*d!); write("b064649.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 21 2009
    
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*(n/d)^d*d!); \\ Michel Marcus, Mar 06 2016
    

Formula

a(n) = Sum_{d|n} phi(n/d)*(n/d)^d*d!. - Michel Marcus, Mar 06 2016

A047919 Triangular array read by rows: a(n,k) = Sum_{d|k} mu(d)*U(n,k/d)/n if k|n else 0, where U(n,k) = A047916(n,k) (1<=k<=n).

Original entry on oeis.org

1, 1, 0, 2, 0, 0, 2, 0, 0, 4, 4, 0, 0, 0, 20, 2, 4, 6, 0, 0, 108, 6, 0, 0, 0, 0, 0, 714, 4, 4, 0, 40, 0, 0, 0, 4992, 6, 0, 30, 0, 0, 0, 0, 0, 40284, 4, 16, 0, 0, 380, 0, 0, 0, 0, 362480, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628790, 4, 8, 60, 312, 0, 3768, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

References

  • J. E. A. Steggall, On the numbers of patterns which can be derived from certain elements, Mess. Math., 37 (1907), 56-61.

Crossrefs

Divide n-th row of array A047918 by n.
Cf. A002024.

Programs

  • Haskell
    a047919 n k = a047919_tabl !! (n-1) !! (k-1)
    a047919_row n = a047919_tabl !! (n-1)
    a047919_tabl = zipWith (zipWith div) a047918_tabl a002024_tabl
    -- Reinhard Zumkeller, Mar 19 2014
  • Mathematica
    U[n_, k_] := If[Divisible[n, k], EulerPhi[n/k]*(n/k)^k*k!, 0]; a[n_, k_] := Sum[If[Divisible[n, k], MoebiusMu[d]*U[n, k/d], 0], {d, Divisors[k]}]; row[n_] := Table[a[n, k], {k, 1, n}]/n; Table[row[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Nov 21 2012, after A047918 *)

Extensions

Offset corrected by Reinhard Zumkeller, Mar 19 2014

A049820 a(n) = n - d(n), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 5, 4, 6, 6, 9, 6, 11, 10, 11, 11, 15, 12, 17, 14, 17, 18, 21, 16, 22, 22, 23, 22, 27, 22, 29, 26, 29, 30, 31, 27, 35, 34, 35, 32, 39, 34, 41, 38, 39, 42, 45, 38, 46, 44, 47, 46, 51, 46, 51, 48, 53, 54, 57, 48, 59, 58, 57, 57, 61, 58, 65
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of non-divisors of n in 1..n. - Jaroslav Krizek, Nov 14 2009
Also equal to the number of partitions p of n such that max(p)-min(p) = 1. The number of partitions of n with max(p)-min(p) <= 1 is n; there is one with k parts for each 1 <= k <= n. max(p)-min(p) = 0 iff k divides n, leaving n-d(n) with a difference of 1. It is easiest to see this by looking at fixed k with increasing n: for k=3, starting with n=3 the partitions are [1,1,1], [2,1,1], [2,2,1], [2,2,2], [3,2,2], etc. - Giovanni Resta, Feb 06 2006 and Franklin T. Adams-Watters, Jan 30 2011
Number of positive numbers in n-th row of array T given by A049816.
Number of proper non-divisors of n. - Omar E. Pol, May 25 2010
a(n+2) is the sum of the n-th antidiagonal of A225145. - Richard R. Forberg, May 02 2013
For n > 2, number of nonzero terms in n-th row of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
Number of partitions of n of the form [j,j,...,j,i] (j > i). Example: a(7)=5 because we have [6,1], [5,2], [4,3], [3,3,1], and [2,2,2,1]. - Emeric Deutsch, Sep 22 2016

Examples

			a(7) = 5; the 5 non-divisors of 7 in 1..7 are 2, 3, 4, 5, and 6.
The 5 partitions of 7 with max(p) - min(p) = 1 are [4,3], [3,2,2], [2,2,2,1], [2,2,1,1,1] and [2,1,1,1,1,1]. - _Emeric Deutsch_, Mar 01 2006
		

Crossrefs

Cf. A000005.
One less than A062968, two less than A059292.
Cf. A161664 (partial sums).
Cf. A060990 (number of solutions to a(x) = n).
Cf. A045765 (numbers not occurring in this sequence).
Cf. A236561 (same sequence sorted into ascending order), A236562 (with also duplicates removed), A236565, A262901 and A262903.
Cf. A262511 (numbers that occur only once).
Cf. A055927 (positions of repeated terms).
Cf. A245388 (positions of squares).
Cf. A155043 (number of steps needed to reach zero when iterating a(n)), A262680 (number of nonzero squares encountered).
Cf. A259934 (an infinite trunk of the tree defined by edge-relation a(child) = parent, conjectured to be unique).
Cf. tables and arrays A047916, A051731, A051778, A173540, A173541.
Cf. also arrays A225145, A262898, A263255 and tables A263265, A263267.

Programs

Formula

a(n) = Sum_{k=1..n} ceiling(n/k)-floor(n/k). - Benoit Cloitre, May 11 2003
G.f.: Sum_{k>0} x^(2*k+1)/(1-x^k)/(1-x^(k+1)). - Emeric Deutsch, Mar 01 2006
a(n) = A006590(n) - A006218(n) = A161886(n) - A000005(n) - A006218(n) + 1 for n >= 1. - Jaroslav Krizek, Nov 14 2009
a(n) = Sum_{k=1..n} A000007(A051731(n,k)). - Reinhard Zumkeller, Mar 09 2010
a(n) = A076627(n) / A000005(n). - Reinhard Zumkeller, Feb 06 2012
For n >= 2, a(n) = A094181(n) / A051953(n). - Antti Karttunen, Nov 27 2015
a(n) = Sum_{k=1..n} ((n mod k) + (-n mod k))/k. - Wesley Ivan Hurt, Dec 28 2015
G.f.: Sum_{j>=2} (x^(j+1)*(1-x^(j-1))/(1-x^j))/(1-x). - Emeric Deutsch, Sep 22 2016
Dirichlet g.f.: zeta(s-1)- zeta(s)^2. - Ilya Gutkovskiy, Apr 12 2017
a(n) = Sum_{i=1..n-1} sign(i mod n-i). - Wesley Ivan Hurt, Sep 27 2018

Extensions

Edited by Franklin T. Adams-Watters, Jan 30 2012

A002618 a(n) = n*phi(n).

Original entry on oeis.org

1, 2, 6, 8, 20, 12, 42, 32, 54, 40, 110, 48, 156, 84, 120, 128, 272, 108, 342, 160, 252, 220, 506, 192, 500, 312, 486, 336, 812, 240, 930, 512, 660, 544, 840, 432, 1332, 684, 936, 640, 1640, 504, 1806, 880, 1080, 1012, 2162, 768, 2058, 1000
Offset: 1

Views

Author

Keywords

Comments

Also Euler phi function of n^2.
For n >= 3, a(n) is also the size of the automorphism group of the dihedral group of order 2n. This automorphism group is isomorphic to the group of transformations x -> ax + b, where a, b and x are integers modulo n and a is coprime to n. Its order is n*phi(n). - Ola Veshta (olaveshta(AT)my-deja.com), Mar 18 2001
Order of metacyclic group of polynomial of degree n. - Artur Jasinski, Jan 22 2008
It appears that this sequence gives the number of permutations of 1, 2, 3, ..., n that are arithmetic progressions modulo n. - John W. Layman, Aug 27 2008
The conjecture by Layman is correct. Obviously any such permutation must have an increment that is prime to n, and almost as obvious that any such increment will work, with any starting value; hence phi(n) * n total. - Franklin T. Adams-Watters, Jun 09 2009
Consider the numbers from 1 to n^2 written line by line as an n X n square: a(n) = number of numbers that are coprime to all their horizontal and vertical immediate neighbors. - Reinhard Zumkeller, Apr 12 2011
n -> a(n) is injective: a(m) = a(n) implies m = n. - Franz Vrabec, Dec 12 2012 (See Mathematics Stack Exchange link for a proof.)
a(p) = p*(p-1) a pronic number, see A036689 and A002378. - Fred Daniel Kline, Mar 30 2015
Conjecture: All the rational numbers Sum_{i=j..k} 1/a(i) with 0 < min{2,k} <= j <= k have pairwise distinct fractional parts. - Zhi-Wei Sun, Sep 24 2015
From Jianing Song, Aug 25 2023: (Start)
a(n) is the order of the holomorph (see the Wikipedia link) of the cyclic group of order n. Note that Hol(C_n) and Aut(D_{2n}) are isomorphic unless n = 2, where D_{2n} is the dihedral group of order 2*n. See the Wordpress link.
The odd-indexed terms form a subsequence of A341298: the holomorph of an abelian group of odd order is a complete group. See Theorem 3.2, Page 618 of the W. Peremans link. (End)

Examples

			a(4) = 8 since phi(4) = 2 and 4 * 2 = 8.
a(5) = 20 since phi(5) = 4 and 5 * 4 = 20.
		

References

  • Peter Giblin, Primes and Programming: An Introduction to Number Theory with Computing. Cambridge: Cambridge University Press (1993) p. 116, Exercise 1.10.
  • J. L. Lagrange, Oeuvres, Vol. III Paris 1869.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of A047916.
Cf. A002619, A011755 (partial sums), A047918, A000010, A053650, A053191, A053192, A036689, A058161, A009262, A082473 (same terms, sorted into ascending order), A256545, A327172 (a left inverse), A327173, A065484.
Subsequence of A323333.

Programs

Formula

Multiplicative with a(p^e) = (p-1)*p^(2e-1). - David W. Wilson, Aug 01 2001
Dirichlet g.f.: zeta(s-2)/zeta(s-1). - R. J. Mathar, Feb 09 2011
a(n) = A173557(n) * A102631(n). - R. J. Mathar, Mar 30 2011
From Wolfdieter Lang, May 12 2011: (Start)
a(n)/2 = A023896(n), n >= 2.
a(n)/2 = (1/n) * Sum_{k=1..n-1, gcd(k,n)=1} k, n >= 2 (see A023896 and A076512/A109395). (End)
a(n) = lcm(phi(n^2),n). - Enrique Pérez Herrero, May 11 2012
a(n) = phi(n^2). - Wesley Ivan Hurt, Jun 16 2013
a(n) = A009195(n) * A009262(n). - Michel Marcus, Oct 24 2013
G.f.: -x + 2*Sum_{k>=1} mu(k)*k*x^k/(1 - x^k)^3. - Ilya Gutkovskiy, Jan 03 2017
a(n) = A082473(A327173(n)), A327172(a(n)) = n. -- Antti Karttunen, Sep 29 2019
Sum_{n>=1} 1/a(n) = 2.203856... (A065484). - Amiram Eldar, Sep 30 2019
Define f(x) = #{n <= x: a(n) <= x}. Gabdullin & Iudelevich show that f(x) ~ c*sqrt(x) for c = Product_{p prime} (1 + 1/(p*(p - 1 + sqrt(p^2 - p)))) = 1.3651304521525857... - Charles R Greathouse IV, Mar 16 2022
a(n) = Sum_{d divides n} A001157(d)*A046692(n/d); that is, the Dirichlet convolution of sigma_2(n) and the Dirichlet inverse of sigma_1(n). - Peter Bala, Jan 26 2024

Extensions

Better description from Labos Elemer, Feb 18 2000

A002619 Number of 2-colored patterns on an n X n board.

Original entry on oeis.org

1, 1, 2, 3, 8, 24, 108, 640, 4492, 36336, 329900, 3326788, 36846288, 444790512, 5811886656, 81729688428, 1230752346368, 19760413251956, 336967037143596, 6082255029733168, 115852476579940152, 2322315553428424200, 48869596859895986108
Offset: 1

Views

Author

Keywords

Comments

Also number of orbits in the set of circular permutations (up to rotation) under cyclic permutation of the elements. - Michael Steyer, Oct 06 2001
Moser shows that (1/n^2)*Sum_{d|n} k^d*phi(n/d)^2*(n/d)^d*d! is an integer. Here we have k=1. - Michel Marcus, Nov 02 2012

Examples

			n=6: {(123456)}, {(135462), (246513), (351624)} and {(124635), (235146), (346251), (451362), (562413), (613524)} are 3 of the 24 orbits, consisting of 1, 3 and 6 permutations, respectively.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • J. E. A. Steggall, On the numbers of patterns which can be derived from certain elements, Mess. Math., 37 (1907), 56-61.
  • K. Yordzhev, On the cardinality of a factor set in the symmetric group. Asian-European Journal of Mathematics, Vol. 7, No. 2 (2014) 1450027, doi: 10.1142/S1793557114500272, ISSN:1793-5571, E-ISSN:1793-7183, Zbl 1298.05035.

Crossrefs

Cf. A000010.
Cf. A000939, A000940, A089066, A262480, A275527 (other classes of permutations under various symmetries).

Programs

  • Maple
    with(numtheory): a:=proc(n) local div: div:=divisors(n): sum(phi(div[j])^2*(n/div[j])!*div[j]^(n/div[j]),j=1..tau(n))/n^2 end: seq(a(n),n=1..23); # Emeric Deutsch, Aug 23 2005
  • Mathematica
    a[n_] := EulerPhi[#]^2*(n/#)!*#^(n/#)/n^2 & /@ Divisors[n] // Total; a /@ Range[23] (* Jean-François Alcover, Jul 11 2011, after Emeric Deutsch *)
  • PARI
    a(n)={sumdiv(n, d, eulerphi(n/d)^2*d!*(n/d)^d)/n^2} \\ Andrew Howroyd, Sep 09 2018
    
  • Python
    from sympy import totient, factorial, divisors
    def A002619(n): return sum(totient(m:=n//d)**2*factorial(d)*m**d for d in divisors(n,generator=True))//n**2 # Chai Wah Wu, Nov 07 2022

Formula

a(n) = Sum_{k|n} u(n, k)/(nk), where u(n, k) = A047918(n, k).
a(n) = (1/n^2)*Sum_{d|n} phi(d)^2*(n/d)!*d^(n/d), where phi is Euler's totient function (A000010). - Emeric Deutsch, Aug 23 2005
From Richard L. Ollerton, May 09 2021: (Start)
Let A(n,k) = (1/n^2)*Sum_{d|n} k^d*phi(n/d)^2*(n/d)^d*d!, then:
A(n,k) = (1/n^2)*Sum_{i=1..n} k^gcd(n,i)*phi(n/gcd(n,i))*(n/gcd(n,i))^gcd(n,i)*gcd(n,i)!.
A(n,k) = (1/n^2)*Sum_{i=1..n} k^(n/gcd(n,i))*phi(gcd(n,i))^2*(gcd(n,i))^(n/gcd(n,i))*(n/gcd(n,i))!.
a(n) = A(n,1). (End)

A047917 Triangular array read by rows: a(n,k) = phi(n/k)*(n/k)^k*k!/n if k|n else 0 (1<=k<=n).

Original entry on oeis.org

1, 1, 1, 2, 0, 2, 2, 2, 0, 6, 4, 0, 0, 0, 24, 2, 6, 8, 0, 0, 120, 6, 0, 0, 0, 0, 0, 720, 4, 8, 0, 48, 0, 0, 0, 5040, 6, 0, 36, 0, 0, 0, 0, 0, 40320, 4, 20, 0, 0, 384, 0, 0, 0, 0, 362880, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628800, 4, 12, 64, 324, 0, 3840, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Examples

			1; 1,1; 2,0,2; 2,2,0,6; 4,0,0,0,24; 2,6,8,0,0,120; ...
		

References

  • J. E. A. Steggall, On the numbers of patterns which can be derived from certain elements, Mess. Math., 37 (1907), 56-61.

Crossrefs

Divide n-th row of A047916 by n.
Row sums give A061417.
Cf. A002024.

Programs

  • Haskell
    a047917 n k = a047917_tabl !! (n-1) !! (k-1)
    a047917_row n = a047917_tabl !! (n-1)
    a047917_tabl = zipWith (zipWith div) a047916_tabl a002024_tabl
    -- Reinhard Zumkeller, Mar 19 2014
  • Mathematica
    a[n_, k_] := If[ Divisible[n, k], EulerPhi[n/k]*(n/k)^k*k!/n, 0]; Flatten[ Table[ a[n, k], {n, 1, 12}, {k, 1, n}]](* Jean-François Alcover, Feb 17 2012 *)

Extensions

Offset corrected by Reinhard Zumkeller, Mar 19 2014
Showing 1-7 of 7 results.