OFFSET
1,1
COMMENTS
It appears that a(m) = m*k/p if m = p*2^n ... . Are these formulas related to some well-known sequence of rational numbers?
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(A003627(n)) = 3.
a(A077065(n)) = 6. For n > 2.
If a(n) = 10, then n mod 10 is in most cases 8 and seldom 6.
a(m) = m*3/5 if m = 5*2^n or m = 15. This formula is valid for all positive n because (5*2^n) mod (5*2^n)*(3/5) = 2^(n+1). If the sequence of solutions does not create powers of two in the modulo operation, it will be of finite length. See next two formulas:
a(m) = m*3/11 if m = 11, 22, 33 or 66.
a(m) = m*4/43 if m = 43*2^n for n < 4. This series of solutions terminates because of the next formula which replaces the powers of two:
a(m) = m*41/(43*2^4) if m = 43*2^4*2^n. This formula is valid for all positive n.
a(m) = m*5/9 if m = 9*2^n or m = 27 or 45. This formula is valid for all positive n.
For each k = a(p) if k < p and gcd(k, p) = 1 such a formula, of the form a(m) = m*k/p, if m = p*2^n ..., can be developed.
EXAMPLE
a(10) = 6 because 10 = 5*2 and 10 mod 6 = 4 = 2*2.
PROG
(PARI)
a(n) = my(k=2); while(bigomega(n) != bigomega(max(n%k, 1)), k++); k
(Python)
from itertools import count
from sympy.ntheory.factor_ import primeomega
def A353172(n):
a = primeomega(n)
for k in count(2):
if (m := n % k) > 0 and primeomega(m) == a:
return k # Chai Wah Wu, Jun 20 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Thomas Scheuerle, Apr 28 2022
STATUS
approved