login
A380809
For n a power of 2, a(n) = n. If n is not a power of 2, a(n) is the smallest number not yet in the sequence which shares a decimal digit and a prime factor with n, and has the same binary weight.
1
1, 2, 33, 4, 65, 36, 70, 8, 96, 12, 176, 10, 104, 21, 45, 16, 136, 48, 133, 24, 14, 26, 92, 20, 35, 22, 57, 38, 232, 39, 93, 32, 3, 40, 25, 6, 74, 28, 30, 34, 164, 44, 344, 42, 15, 54, 94, 18, 84, 52, 75, 50, 3392, 46, 115, 76, 27, 78, 295, 86, 122, 124, 123, 64
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, 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
Cf. A000120.
Sequence in context: A185995 A012604 A012731 * A073402 A304145 A305485
KEYWORD
nonn,base,new
AUTHOR
STATUS
approved