login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350576
a(n) = n/A055874(n) - A055874(n).
1
0, -1, 2, 0, 4, -1, 6, 2, 8, 3, 10, -1, 12, 5, 14, 6, 16, 3, 18, 8, 20, 9, 22, 2, 24, 11, 26, 12, 28, 7, 30, 14, 32, 15, 34, 5, 36, 17, 38, 18, 40, 11, 42, 20, 44, 21, 46, 8, 48, 23, 50, 24, 52, 15, 54, 26, 56, 27, 58, 4, 60, 29, 62, 30, 64, 19, 66, 32, 68, 33, 70, 14, 72, 35, 74
OFFSET
1,3
LINKS
FORMULA
a(n) = A350509(n) - A055874(n).
a(n) = n-1 if n is odd.
MATHEMATICA
a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; k--; n/k - k]; Array[a, 100] (* Amiram Eldar, Jan 07 2022 *)
PROG
(PARI) a4(n) = my(m=1); while ((n % m) == 0, m++); m - 1; \\ A055874
a(n) = my(x=a4(n)); n/x - x;
(Python)
def a(n):
m = 2
while n%m == 0: m += 1
return n//(m-1) - (m-1)
print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Jan 07 2022
CROSSREFS
Cf. A005408 (odd numbers), A056737 (another difference n/d-d).
Sequence in context: A338824 A056737 A289144 * A008797 A239004 A168036
KEYWORD
sign
AUTHOR
Michel Marcus, Jan 07 2022, after a suggestion from Charles Kusniec
STATUS
approved