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.

A083253 Smallest number k for which abs(A045763(k) - A073757(k)) = n, i.e., signed difference of size of related and unrelated sets to k equals either n or -n.

Original entry on oeis.org

30, 1, 2, 3, 4, 5, 8, 7, 16, 21, 32, 11, 64, 13, 84, 27, 78, 17, 200, 19, 90, 57, 140, 23, 102, 69, 120, 435, 114, 29, 132, 31, 126, 93, 392, 81, 138, 37, 156, 49, 230, 41, 168, 43, 322, 129, 260, 47, 150, 77, 180, 795, 186, 53, 204, 95, 198, 885, 280, 59, 434, 61, 228, 183
Offset: 0

Views

Author

Labos Elemer, May 07 2003

Keywords

Comments

a(258) > 10^5. - Michael De Vlieger, Jul 31 2017

Examples

			A045763(x) - A073757(x) = 0 is first satisfied at x = 30 = a(0).
		

Crossrefs

Programs

  • Mathematica
    With[{s = Table[Abs[n - 2 (DivisorSigma[0, n] + EulerPhi[n] - 1)], {n, 10^3}]}, TakeWhile[#, # > 0 &] &@ Flatten@ Map[FirstPosition[s, #] /. k_ /; MissingQ@ k -> 0 &, Range[0, Max@ s]]] (* Michael De Vlieger, Jul 31 2017 *)
  • PARI
    a(n) = {my(k = 1); while (abs(k - 2*(numdiv(k) + eulerphi(k) - 1)) != n, k++); k;} \\ Michel Marcus, Aug 01 2017

Formula

a(n) = min{x; abs(A045763(x) - A073757(x)) = n}.
a(p) = p, for p prime.