OFFSET
1,2
COMMENTS
A self inverse sequence containing no odd primes (n composite implies composite a(n) and n prime > 2 implies a(n) = m*n for some m > 1).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Annotated log log scatterplot of a(n), n = 1..10000, showing primes in red, proper prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, where purple also represents powerful numbers that are not prime powers.
FORMULA
a(a(n)) = n for all n.
EXAMPLE
a(1) = 1 since 1 = 2^0 is a power of 2, likewise a(2) = 2.
a(3) = 33, the smallest novel number sharing a prime factor (3) and a digit (3) with 3, and having the same binary weight (2).
a(49) = 84, smallest novel number sharing a prime factor (7) and a digit (4) with 49 and having same binary weight (3).
MATHEMATICA
nn = 120; c[_] := True;
Table[If[IntegerQ@ Log2[n], k = n,
Set[{m, d, w}, {1, IntegerDigits[n], DigitCount[n, 2, 1]}];
If[PrimePowerQ[n],
p = FactorInteger[n][[1, 1]];
Until[k = m*p;
And[c[k], k != n, IntersectingQ[d, IntegerDigits[k]],
DigitCount[k, 2, 1] == w], m++],
k = m;
Until[And[c[k], k != n, IntersectingQ[d, IntegerDigits[k]],
DigitCount[k, 2, 1] == w, GCD[k, n] > 1], k++]]];
c[k] = False; k, {n, nn}] (* Michael De Vlieger, Feb 20 2025 *)
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
David James Sycamore, Feb 04 2025
STATUS
approved