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”).

A318516
a(n) = A032742(n) OR n-A032742(n), where OR is bitwise-or (A003986) and A032742 = the largest proper divisor of n.
5
1, 1, 3, 2, 5, 3, 7, 4, 7, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 15, 11, 23, 12, 21, 13, 27, 14, 29, 15, 31, 16, 31, 17, 31, 18, 37, 19, 31, 20, 41, 21, 43, 22, 31, 23, 47, 24, 47, 25, 51, 26, 53, 27, 47, 28, 55, 29, 59, 30, 61, 31, 63, 32, 61, 33, 67, 34, 63, 35, 71, 36, 73, 37, 59, 38, 75, 39, 79, 40, 63, 41, 83, 42
OFFSET
1,3
FORMULA
a(n) = A003986(A032742(n), A060681(n)).
a(n) = n - A318518(n).
PROG
(PARI)
A032742(n) = if(1==n, n, n/vecmin(factor(n)[, 1]));
A318516(n) = bitor(A032742(n), n-A032742(n));
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 28 2018
STATUS
approved