OFFSET
1,2
COMMENTS
Like A065190 but with the extra condition that n and a(n) must have at least one decimal digit in common. Definition implies that a(1) = 1 is the only fixed point. Let a(n) be even then 2|a(n) -> 2!|n-> 2|(n+1)->2!|a(n+1), therefore there are no consecutive even terms. Let [n] = |n - a(n)|, then it follows from the coprime conditions of the definition that n, a(n), [n] are pairwise coprime. Sequence is conjectured to be a permutation of the natural numbers with [n] < 100 (= base^2).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16.
FORMULA
a(a(n)) = n for all n (sequence is self inverse).
EXAMPLE
a(1) = 1 since 1 is the smallest novel number prime to 1 and sharing a digit with it so a(2) = 21 because digit 2 is shared, Gcd(2,21) = 1 and there is no smaller number with this property. a(7) = 17 implies a(17) = 7 (self inverse property).
MATHEMATICA
nn = 120; c[_] := True; u = 1;
Reap[Do[s = Union@ IntegerDigits[n]; k = u;
While[
Nand[c[k], IntersectingQ[s, IntegerDigits[k]], CoprimeQ[n, k]],
k++];
Sow[k]; c[k] = False;
If[k == u, While[! c[u], u++]], {n, nn}] ][[-1, 1]]
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
David James Sycamore and Michael De Vlieger, Jan 30 2025
STATUS
approved
