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

A069249 a(n) = n^2 - phi(n)*sigma(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 12, 1, 4, 3, 28, 1, 32, 1, 52, 33, 8, 1, 90, 1, 64, 57, 124, 1, 96, 5, 172, 9, 112, 1, 324, 1, 16, 129, 292, 73, 204, 1, 364, 177, 160, 1, 612, 1, 256, 153, 532, 1, 320, 7, 640, 297, 352, 1, 756, 145, 256, 369, 844, 1, 912, 1, 964, 225, 32, 193, 1476, 1, 592
Offset: 1

Views

Author

Benoit Cloitre, Apr 13 2002

Keywords

Comments

Always >0 for n>0. a(n)=1 if n is prime.
If p is a prime and k is a natural number then a(p^k)=p^(k-1) because a(p^k)=(p^k)^2-sigma(p^k)*phi(p^k) =p^(2k)-(p-1)*p^(k-1)*(p^(k+1)-1)/(p-1)=p^(k-1). If n is a composite number then a(n)>1 and a(1)=0, so n is prime iff a(n)=1. - Farideh Firoozbakht, Nov 15 2005

Examples

			sigma(10) = 18; phi(10) = 4; 10^2 - sigma(10)*phi(10) = 28. sigma(p) = p+1; phi(p) = p-1; p^2 - (p+1)(p-1) = 1. [From _Walter Nissen_, Aug 29 2009]
		

Crossrefs

Programs

Formula

a(n) = n^2-A062354(n). - R. J. Mathar, Oct 01 2011
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = 1 - A065465 = 0.118486... . - Amiram Eldar, Dec 04 2023

A164876 Record differences for n^2 - phi(n)*sigma(n).

Original entry on oeis.org

0, 1, 2, 12, 28, 32, 52, 90, 124, 172, 324, 364, 612, 640, 756, 844, 912, 964, 1476, 2052, 2484, 3492, 4356, 4644, 4804, 6372, 7620, 8164, 10116, 11556, 16452, 20196, 22212, 26532, 28980, 33732, 39780, 41796, 44676, 55332, 60516, 63972, 75204, 82692
Offset: 1

Views

Author

Walter Nissen, Aug 29 2009

Keywords

Comments

These are the largest differences between n^2 and sigma(n)*phi(n).
All of the differences are in A069249.

Examples

			sigma(10) = 18; phi(10) = 4; 10^2 - sigma(10)*phi(10) = 28. This difference, 28, exceeds the difference for every smaller n, so 28 is in this sequence and 10 is in A164875.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n^2 - EulerPhi[n] * DivisorSigma[1, n]; s = {}; fm = -1; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, fm]], {n, 1, 500}]; s (* Amiram Eldar, Aug 29 2019 *)

Formula

a(n) = A069249(A164875(n)). - Amiram Eldar, Aug 29 2019

Extensions

a(1) = 0 added by Amiram Eldar, Aug 29 2019
Showing 1-2 of 2 results.