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

A164875 Record holders for n^2 - phi(n)*sigma(n).

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 14, 18, 22, 26, 30, 38, 42, 50, 54, 58, 60, 62, 66, 78, 90, 102, 114, 126, 130, 138, 150, 170, 174, 186, 210, 246, 258, 282, 294, 318, 330, 354, 366, 390, 426, 438, 462, 498, 510, 534, 546, 570, 606, 618, 642, 654, 678, 690, 714, 750, 762, 786
Offset: 1

Views

Author

Walter Nissen, Aug 29 2009

Keywords

Comments

These numbers exhibit the largest differences between n^2 and sigma(n)*phi(n).
All of the differences are in A069249, and are guaranteed to be positive by Th. 329 in Hardy & Wright. The record differences are in A164876.

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 10 is in this sequence and 28 is in A164876.
		

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, n]], {n, 1, 786}]; s (* Amiram Eldar, Aug 29 2019 *)

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

A324331 a(n) = (n-1)^2 - phi(n)*sigma(n), where phi is A000010 and sigma is A000203.

Original entry on oeis.org

-1, -2, -4, -5, -8, 1, -12, -11, -14, 9, -20, 9, -24, 25, 4, -23, -32, 55, -36, 25, 16, 81, -44, 49, -44, 121, -44, 57, -56, 265, -60, -47, 64, 225, 4, 133, -72, 289, 100, 81, -80, 529, -84, 169, 64, 441, -92, 225, -90, 541, 196, 249, -104, 649, 36, 145, 256, 729, -116, 793
Offset: 1

Views

Author

Michel Marcus, Feb 23 2019

Keywords

Comments

For squarefree semiprimes n = p*q a(n)=(p-q)^2 is a square. But the converse, a(n) is prime, can happen: see A324332.

Crossrefs

Programs

  • Mathematica
    Table[(n-1)^2 - EulerPhi[n]*DivisorSigma[1, n], {n, 1, 60}] (* Vaclav Kotesovec, Feb 23 2019 *)
  • PARI
    a(n) = (n-1)^2 - eulerphi(n)*sigma(n);

Formula

a(A006881(n)) = A176881(n)^2.
a(n) = A069249(n) - 2*n + 1. - Amiram Eldar, Dec 04 2023

A073477 Least k such that 2^n = k^2-sigma(k)*phi(k).

Original entry on oeis.org

2, 4, 8, 16, 32, 12, 20, 256, 44, 1024, 2048, 4096, 8192, 16384, 992, 65536, 724, 262144, 2080, 1048576, 16256, 4194304, 8388608, 16777216, 33554432, 67108864, 48832, 268435456, 536870912, 1073741824, 471808, 4294967296, 8589934592, 17179869184, 34359738368
Offset: 0

Views

Author

Benoit Cloitre, Aug 26 2002

Keywords

Comments

Sequence is always defined since for s=2^(n+1), 2^n = s^2-sigma(s)*phi(s). - R. J. Mathar, Oct 01 2011
a(38) = 67100672. a(50) = 17179738112. a(56) <= 274877382656. - Donovan Johnson, Oct 02 2011

Programs

  • PARI
    a(n)=if(n<0,0,x=1; while(abs(x^2-sigma(x)*eulerphi(x)-2^n)>0,x++)); x

Formula

a(n) = min{k: A069249(k)=2^n}. - R. J. Mathar, Oct 01 2011

Extensions

Edited and extended by Klaus Brockhaus, Aug 29 2002
a(26) and a(30) from R. J. Mathar, Oct 01 2011
a(25), a(27)-a(29) and a(31)-a(34) from Donovan Johnson, Oct 02 2011
Showing 1-4 of 4 results.