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.
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
Keywords
Examples
A045763(x) - A073757(x) = 0 is first satisfied at x = 30 = a(0).
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..257
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
Comments