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.

A080998 a(n) is n's rank among the positive integers in terms of centrality -the fraction of n represented by the average gcd of n and the positive integers, or A018804(n)/n^2 (cf. A080997).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 10, 7, 11, 9, 18, 8, 20, 13, 12, 15, 25, 14, 33, 16, 21, 23, 40, 17, 32, 28, 27, 22, 53, 19, 56, 30, 35, 39, 36, 24, 69, 46, 43, 26, 79, 29, 89, 38, 37, 55, 95, 31, 67, 45, 57, 47, 108, 41, 60, 42, 65, 75
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Examples

			a(5)=6 because the centrality of 5 is 9/25 (.36), which places it sixth among positive integers in centrality; it ranks behind 1 (whose centrality is 1), 2 (3/4, .75), 3 (5/9, .555...), 4 (1/2, .5) and 6 (5/12, .41666...).
		

Crossrefs

A080997 gives fuller description of centrality, as well as finite portion of the arrangement of positive integers in order of their centrality. For more about where numbers occur in A080997, see also A081000, A081001, A081028, A081029.

A081000 n is a member if and only if it ranks among top n positive integers in centrality (cf. A080997 for fuller description of this concept).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 36, 40, 42, 44, 45, 48, 50, 52, 54, 56, 60, 63, 64, 66, 68, 70, 72, 75, 76, 78, 80, 84, 88, 90, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 117, 120
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Comments

1, 2, 3, 4, 21 and 27 are currently the only known examples of n that rank exactly n-th in centrality; it is not known whether there are others.

Crossrefs

Cf. A080997, A080998, also A081029, the highly central integers (a subset of this sequence). Complement is A081001.

Formula

The formula for the centrality of an integer is A018804(n)/n^2; see also A080997.

A081001 n is in the sequence if and only if it does not rank among the top n positive integers in centrality (cf. A080997 for fuller explanation of this concept).

Original entry on oeis.org

5, 7, 9, 11, 13, 17, 19, 22, 23, 25, 26, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 74, 77, 79, 81, 82, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 116, 118, 119
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Comments

Complement of A081000.

Crossrefs

Cf. A080997, A080998, also A081028 for centrality ranks of primes (all of which are members of this sequence except 2 and 3).

Formula

Formula for the centrality of n: A018804(n)/n^2 (see also A080997).

A081028 Numbers n such that n-th term of A080997 is prime; a(n) is ranking of n-th prime number among the positive integers in terms of centrality (cf. A080997 for explanation of this concept).

Original entry on oeis.org

2, 3, 6, 10, 18, 20, 25, 33, 40, 53, 56, 69, 79, 89, 95, 108
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Comments

Let p(n) be the n-th prime. In order for the centrality rankings of all numbers from 1 to p(n) to be known, it is necessary for the numbers that occupy all of the ranking positions from 1 to a(n) to be determined.

Crossrefs

Formula

Formula for centrality of n: A018804(n)/n^2 (see also A080997).

A080999 Centrality of A080997(n) = a(n)/(A080997(n))^2.

Original entry on oeis.org

1, 3, 5, 8, 15, 9, 20, 40, 27, 13, 21, 45, 39, 63, 48, 72, 100, 21, 135, 25, 65, 104, 63, 168, 33, 180, 81, 75, 195, 112, 240, 65, 37, 360, 105, 117, 189, 168, 99, 45, 243, 260, 125, 420, 195, 111, 200, 520, 315, 351, 567, 273, 57, 432, 135, 61, 165, 256, 900, 189, 375
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Comments

A permutation of sequence A018804, which gives the sum of gcd (k,n) for 1 <= k <= n.

Crossrefs

Cf. A080997, A080998 for centrality rankings of the positive integers.

Formula

The multiplicative formula for the numerator in a positive integer's centrality fraction is: for prime p, a(p^e)= p^(e-1)*((p-1)e+p) (cf. A018804). Dividing by the square of the integer gives the integer's centrality, which is defined to be the average fraction of the integer that it shares with the other integers as a gcd; see A080997 for other interpretations. This sequence gives the unreduced centrality numerators for A080997(n), where A080997 is the sequence of positive integers in nonincreasing order of their centrality.

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

A081029 Highly central numbers: numbers having a centrality higher than that of any larger number.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 15, 18, 20, 24, 30, 36, 40, 42, 48, 60, 72, 84, 90, 120, 126, 144, 180, 210, 240
Offset: 1

Views

Author

Matthew Vandermast, Mar 02 2003

Keywords

Comments

A subset of A081000.

Crossrefs

Cf. A080997, A080998 for centrality rankings of the positive integers.

Formula

Formula for centrality of n: A018804(n)/n^2 (cf. A080997 for fuller description of this concept).
Showing 1-7 of 7 results.