login
A380671
a(n) is the smallest number not yet in the sequence which is coprime to n and shares at least one decimal digit with n.
1
1, 21, 13, 41, 51, 61, 17, 81, 19, 11, 10, 23, 3, 15, 14, 31, 7, 71, 9, 27, 2, 25, 12, 29, 22, 63, 20, 83, 24, 37, 16, 33, 32, 35, 34, 43, 30, 39, 38, 47, 4, 121, 36, 45, 44, 49, 40, 85, 46, 53, 5, 55, 50, 59, 52, 57, 56, 65, 54, 67, 6, 69, 26, 141, 58, 161, 60
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, 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
Cf. A065190.
Sequence in context: A307312 A120742 A118296 * A068015 A040422 A214037
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved