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, 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
Examples
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).
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.
Crossrefs
Cf. A065190.
Programs
-
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]]
Formula
a(a(n)) = n for all n (sequence is self inverse).
Comments