cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Keywords

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

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

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