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.

Previous Showing 11-20 of 40 results. Next

A129558 A054523 * A129360.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 1, 0, 1, 3, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 4, 2, 0, 1, 0, 0, 0, 1, 4, 0, 1, 0, 0, 0, 0, 0, 1, 3, 3, 0, 0, 1, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Apr 20 2007

Keywords

Comments

Row sums = A062570, phi(2*n): (1, 2, 2, 4, 4, 4, 6, 8, ...).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 0, 1;
  2, 1, 0, 1;
  3, 0, 0, 0, 1;
  1, 1, 1, 0, 0, 1;
  5, 0, 0, 0, 0, 0, 1;
  4, 2, 0, 1, 0, 0, 0, 1;
  4, 0, 1, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Formula

A054523 * A129360 as infinite lower triangular matrices.

A143276 Triangle read by rows: A054525 * A054523 as infinite lower triangular matrices.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Aug 03 2008

Keywords

Comments

Row sums = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6,...).
Left border = A007431: (1, 0, 1, 1, 3, 0, 5, 2, 4,...).

Examples

			First few rows of the triangle =
1;
0, 1;
1, 0, 1;
1, 0, 0, 1;
3, 0, 0, 0, 1;
0, 1, 0, 0, 0, 1;
5, 0, 0, 0, 0, 0, 1;
2, 1, 0, 0, 0, 0, 0, 1;
...
		

Crossrefs

Formula

Moebius transform of triangle A054523.

Extensions

a(17), a(18) corrected by Georg Fischer, May 29 2023

A129555 A054523 * A129372.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Apr 20 2007

Keywords

Comments

Row sums = A002131: (1, 2, 4, 4, 6, 8, 8, 8, 13, 12, ...). Left column = A016741: (1, 1, 3, 2, 5, 3, 7, ...).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  3, 0, 1;
  2, 1, 0, 1;
  5, 0, 0, 0, 1;
  3, 3, 1, 0, 0, 1;
  7, 0, 0, 0, 0, 0, 1;
  4, 2, 0, 1, 0, 0, 0, 1;
  9, 0, 3, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Formula

A054523 * A129372 as infinite lower triangular matrices.

A129560 A054523 * A128174.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Apr 20 2007

Keywords

Comments

Row sums = A002620: (1, 2, 4, 6, 9, 12, 16, 20, ...). Left column = A106477: (1, 1, 3, 3, 7, 5, 13, 9, 19, ...).

Examples

			First few rows of the triangle:
   1;
   1, 1;
   3, 0, 1;
   3, 2, 0, 1;
   7, 0, 1, 0, 1;
   5, 4, 1, 1, 0, 1;
  13, 0, 1, 0, 1, 0, 1;
  ...
		

Crossrefs

Formula

A054523 * A128174 as infinite lower triangular matrices.

A129561 A054523 * A115369.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Apr 20 2007

Keywords

Comments

Row sums = A026741: (1, 1, 3, 3, 2, 5, 3, 7, 4, ...).

Examples

			First few rows of the triangle:
  1;
  0, 1;
  2, 0, 1;
  1, 0, 0, 1;
  4, 0, 0, 0, 1;
  0, 2, 0, 0, 0, 1;
  6, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Formula

A054523 * A115369 as infinite lower triangular matrices.

A130028 A129686 * A054523.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, May 02 2007

Keywords

Comments

Row sums = A004277, 1 followed by even terms: (1, 2, 4, 6, 8, 10, ...).

Examples

			First few rows of the triangle:
   1;
   1, 1;
   3, 0, 1;
   3, 2, 0, 1;
   6, 0, 1, 0, 1;
   4, 3, 1, 1, 0, 1;
  10, 0, 0, 0, 1, 0, 1;
   6, 4, 1, 1, 0, 1, 0, 1;
  ...
		

Crossrefs

Formula

A129686 * A054523 as infinite lower triangular matrices, where A129686 = the alternate term operator.

A130313 A000012 * A054523.

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 6, 2, 1, 1, 10, 2, 1, 1, 1, 12, 4, 2, 1, 1, 1, 18, 4, 2, 1, 1, 1, 1, 22, 6, 2, 2, 1, 1, 1, 1, 28, 6, 4, 2, 1, 1, 1, 1, 1, 32, 10, 4, 2, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, May 21 2007

Keywords

Comments

Row sums = the triangular series, A000217: (1, 3, 6, 10, ...).
Left column = A002088: (1, 2, 4, 6, 10, 12, 18, ...).

Examples

			First few rows of the triangle:
   1;
   2, 1;
   4, 1, 1;
   6, 2, 1, 1;
  10, 2, 1, 1, 1;
  12, 4, 2, 1, 1, 1;
  18, 4, 2, 1, 1, 1, 1;
  ...
		

Crossrefs

Formula

A000012 * A054523 as infinite lower triangular matrices.

A141294 Triangle read by rows, A054523 * A000012, 1<=k<=n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 4, 2, 1, 1, 5, 1, 1, 1, 1, 6, 4, 2, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 9, 3, 3, 1, 1, 1, 1, 1, 1, 10, 6, 2, 2, 2, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 8, 6, 4, 2, 2, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 8, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Aug 02 2008

Keywords

Comments

Row sums = A018804: (1, 3, 5, 8, 9, 15, 13, 20,...).

Examples

			First few rows of the triangle =
1;
2, 1;
3, 1, 1;
4, 2, 1, 1;
5, 1, 1, 1, 1;
6, 4, 2, 1, 1, 1;
7, 1, 1, 1, 1, 1, 1;
8, 4, 2, 2, 1, 1, 1, 1;
...
		

Crossrefs

Formula

Triangle read by rows, A054523 * A000012, 1<=k<=n. By rows, partial sums starting from the right.

A018804 Pillai's arithmetical function: Sum_{k=1..n} gcd(k, n).

Original entry on oeis.org

1, 3, 5, 8, 9, 15, 13, 20, 21, 27, 21, 40, 25, 39, 45, 48, 33, 63, 37, 72, 65, 63, 45, 100, 65, 75, 81, 104, 57, 135, 61, 112, 105, 99, 117, 168, 73, 111, 125, 180, 81, 195, 85, 168, 189, 135, 93, 240, 133, 195, 165, 200, 105, 243, 189, 260, 185, 171, 117, 360
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of times the number 1 appears in the character table of the cyclic group C_n. - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 02 2001
a(n) is the number of ways to express all fractions f/g whereby each product (f/g)*n is a natural number between 1 and n (using fractions of the form f/g with 1 <= f,g <= n). For example, for n=4 there are 8 such fractions: 1/1, 1/2, 2/2, 3/3, 1/4, 2/4, 3/4 and 4/4. - Ron Lalonde (ronronronlalonde(AT)hotmail.com), Oct 03 2002
Number of non-congruent solutions to xy == 0 (mod n). - Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 06 2003
Conjecture: n>1 divides a(n)+1 iff n is prime. - Thomas Ordowski, Oct 22 2014
The above conjecture is false, with counterexample given by n = 3*37*43*42307*116341 and a(n)+1 = 26*n. - Varun Vejalla, Jun 19 2025
a(n) is the number of 0's in the multiplication table Z/nZ (cf. A000010 for number of 1's). - Eric Desbiaux, Jun 11 2015
{a(n)} == 1, 3, 1, 0, 1, 3, 1, 0, ... (mod 4). - Isaac Saffold, Dec 30 2017
Since a(p^e) = p^(e-1)*((p-1)e+p) it follows a(p) = 2p-1 and therefore p divides a(p)+1. - Ruediger Jehn, Jun 23 2022

Examples

			G.f. = x + 3*x^2 + 5*x^3 + 8*x^4 + 9*x^5 + 15*x^6 + 13*x^7 + 20*x^8 + ...
		

References

  • S. S. Pillai, On an arithmetic function, J. Annamalai University 2 (1933), pp. 243-248.
  • J. Sándor, A generalized Pillai function, Octogon Mathematical Magazine Vol. 9, No. 2 (2001), 746-748.

Crossrefs

Column 1 of A343510 and A343516.
Cf. A080997, A080998 for rankings of the positive integers in terms of centrality, defined to be the average fraction of an integer that it shares with the other integers as a gcd, or A018804(n)/n^2, also A080999, a permutation of this sequence (A080999(n) = A018804(A080997(n))).

Programs

  • Haskell
    a018804 n = sum $ map (gcd n) [1..n]  -- Reinhard Zumkeller, Jul 16 2012
    
  • Magma
    [&+[Gcd(n,k):k in [1..n]]:n in [1..60]]; // Marius A. Burtea, Nov 14 2019
  • Maple
    a:=n->sum(igcd(n,j),j=1..n): seq(a(n), n=1..60); # Zerinvary Lajos, Nov 05 2006
  • Mathematica
    f[n_] := Block[{d = Divisors[n]}, Sum[ d*EulerPhi[n/d], {d, d}]]; Table[f[n], {n, 60}] (* Robert G. Wilson v, Mar 20 2012 *)
    a[ n_] := If[ n < 1, 0, n Sum[ EulerPhi[d] / d, {d, Divisors@n}]]; (* Michael Somos, Jan 07 2017 *)
    f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jul 19 2019 *)
  • PARI
    {a(n) = direuler(p=2, n, (1 - X) / (1 - p*X)^2)[n]}; /* Michael Somos, May 31 2000 */
    
  • PARI
    a(n)={ my(ct=0); for(i=0,n-1,for(j=0,n-1, ct+=(Mod(i*j,n)==0) ) ); ct; } \\ Joerg Arndt, Aug 03 2013
    
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~,(f[i,2]*(f[i,1]-1)/f[i,1] + 1)*f[i,1]^f[i,2]) \\ Charles R Greathouse IV, Oct 28 2014
    
  • PARI
    a(n) = sumdiv(n, d, n*eulerphi(d)/d); \\ Michel Marcus, Jan 07 2017
    
  • Python
    from sympy.ntheory import totient, divisors
    print([sum(n*totient(d)//d for d in divisors(n)) for n in range(1, 101)]) # Indranil Ghosh, Apr 04 2017
    
  • Python
    from sympy import factorint
    from math import prod
    def A018804(n): return prod(p**(e-1)*((p-1)*e+p) for p, e in factorint(n).items()) # Chai Wah Wu, Nov 29 2021
    

Formula

a(n) = Sum_{d|n} d*phi(n/d), where phi(n) is Euler totient function (cf. A000010). - Vladeta Jovovic, Apr 04 2001
Multiplicative; for prime p, a(p^e) = p^(e-1)*((p-1)e+p).
Dirichlet g.f.: zeta(s-1)^2/zeta(s).
a(n) = Sum_{d|n} d*tau(d)*mu(n/d). - Benoit Cloitre, Oct 23 2003
Equals A054523 * [1,2,3,...]. Equals row sums of triangle A010766. - Gary W. Adamson, May 20 2007
Equals inverse Mobius transform of A029935 = A054525 * (1, 2, 4, 5, 8, 8, 12, 12, ...). - Gary W. Adamson, Aug 02 2008, corrected Feb 07 2023
Equals row sums of triangle A127478. - Gary W. Adamson, Aug 03 2008
G.f.: Sum_{k>=1} phi(k)*x^k/(1 - x^k)^2, where phi(k) is the Euler totient function. - Ilya Gutkovskiy, Jan 02 2017
a(n) = Sum_{a = 1..n} Sum_{b = 1..n} Sum_{c = 1..n} 1, for n > 1. The sum is over a,b,c such that n*c - a*b = 0. - Benedict W. J. Irwin, Apr 04 2017
Proof: Let gcd(a, n) = g and x = n/g. Define B = {x, 2*x, ..., g*x}; then for all b in B there exists a number c such that a*b = n*c. Since the set B has g elements it follows that Sum_{b=1..n} Sum_{c=1..n} 1 >= g = gcd(a, n) and therefore Sum_{a=1..n} Sum_{b=1..n} Sum_{c=1..n} 1 >= Sum_{a=1..n} gcd(a, n). On the other hand, for all b not in B there is no number c <= n such that a*b = n*c and hence Sum_{b = 1..n} Sum_{c = 1..n} 1 = g. Therefore Sum_{a=1..n} Sum_{b = 1..n} Sum_{c = 1..n} 1 = a(n). - Ruediger Jehn, Jun 23 2022
a(2*n) = a(n)*(3-A007814(n)/(A007814(n)+2)) - Velin Yanev, Jun 30 2017
Proof: Let m = A007814(m) and decompose n into n = k*2^m. We know from Chai Wah Wu's program below that a(n) = Product(p_i^(e_i-1)*((p_i-1)*e_i+p_i)) where the numbers p_i are the prime factors of n and e_i are the corresponding exponents. Hence a(2n) = 2^m*(m+3)*a(k) = 2^m*(m+3)*a(k). On the other hand, a(n) = 2^(m-1)*(m+2)*a(k). Dividing the first equation by the second yields a(2n)/a(n) = 2*(m+3)/(m+2), which equals 3 - m/(m+2). Hence a(2n) = a(n)*(3 - m/(m+2)). - Ruediger Jehn, Jun 23 2022
Sum_{k=1..n} a(k) ~ 3*n^2/Pi^2 * (log(n) - 1/2 + 2*gamma - 6*Zeta'(2)/Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 08 2019
a(n) = Sum_{k=1..n} n/gcd(n,k)*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 10 2021
log(a(n)/n) << log n log log log n/log log n; in particular, a(n) << n^(1+e) for any e > 0. See Broughan link for bounds in terms of omega(n). - Charles R Greathouse IV, Sep 08 2022
a(n) = (1/4)*Sum_{k = 1..4*n} (-1)^k * gcd(k, 4*n) = (1/4) * A344372(2*n). - Peter Bala, Jan 01 2024

A102190 Irregular triangle read by rows: coefficients of cycle index polynomial for the cyclic group C_n, Z(C_n,x), multiplied by n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 1, 4, 1, 1, 2, 2, 1, 6, 1, 1, 2, 4, 1, 2, 6, 1, 1, 4, 4, 1, 10, 1, 1, 2, 2, 2, 4, 1, 12, 1, 1, 6, 6, 1, 2, 4, 8, 1, 1, 2, 4, 8, 1, 16, 1, 1, 2, 2, 6, 6, 1, 18, 1, 1, 2, 4, 4, 8, 1, 2, 6, 12, 1, 1, 10, 10, 1, 22, 1, 1, 2, 2, 2, 4, 4, 8, 1, 4, 20, 1, 1, 12, 12, 1, 2, 6, 18, 1, 1, 2, 6, 6
Offset: 1

Views

Author

Wolfdieter Lang, Feb 15 2005

Keywords

Comments

Row n gives the coefficients of x[k]^{n/k} with increasing divisors k of n.
The length of row n is tau(n) = A000005(n) (number of divisors of n, including 1 and n).
See also table A054523 with zeros if k does not divide n, and reversed rows. [Wolfdieter Lang, May 29 2012]

Examples

			Array begins:
1: [1],
2: [1, 1],
3: [1, 2],
4: [1, 1, 2],
5: [1, 4],
6: [1, 1, 2, 2],
7: [1, 6], ...
The entry for n=6 is obtained as follows:
Z(C_6,x)=(1*x[1]^6 + 1*x[2]^3 + 2*x[3]^2 + 2*x[6]^1)/6.
a(6,1)=phi(1)=1, a(6,2)=phi(2)=1, a(6,3)=phi(3)=2, a(6,4)=phi(6)=2.
		

References

  • N. G. De Bruijn, Polya's theory of counting, in E. F. Beckenbach, ed., Applied Combinatorial Mathematics, Wiley, 1964, pp. 144-184 (see Example 5.7).
  • F. Harary, Graph Theory, Addison-Wesley, Reading, MA, 1994; pp. 181 and 184.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 36, (2.2.10).

Crossrefs

Cf. A054523.

Programs

  • Mathematica
    k[n_, m_] := Divisors[n][[m]]; a[n_, m_] := EulerPhi[k[n, m]]; Flatten[Table[a[n, m], {n, 1, 28}, {m, 1, DivisorSigma[0, n]}]] (* Jean-François Alcover, Jul 25 2011, after given formula *)
    row[n_] := If[n == 1, {1}, n List @@ CycleIndexPolynomial[CyclicGroup[n], Array[x, n]] /. x[] -> 1]; Array[row, 30] // Flatten (* _Jean-François Alcover, Nov 04 2016 *)
  • PARI
    tabf(nn) = for (n=1, nn, print(apply(x->eulerphi(x), divisors(n)))); \\ Michel Marcus, Nov 13 2015
    
  • PARI
    tabf(nn) = for (n=1, nn, print(apply(x->poldegree(x), factor(x^n-1)[,1]))) \\ Michel Marcus, Nov 13 2015

Formula

a(n, m) = phi(k(m)), m=1..tau(n), n>=1, with k(m) the m-th divisor of n, written in increasing order.
Z(C_n, x):=sum(sum(phi(k)*x[k]^{n/k}, k|n))/n, where phi(n)= A000010(n) (Euler's totient function) and k|n means 'k divides n'. Cf. Harary-Palmer reference and MathWorld link.
Previous Showing 11-20 of 40 results. Next