|
|
A273258
|
|
Write the distinct prime divisors p of n in the (PrimePi(p) - 1)-th place, ignoring multiplicity. Decode the resulting number after first reversing the code, ignoring any leading zeros.
|
|
4
|
|
|
1, 2, 2, 2, 2, 6, 2, 2, 2, 10, 2, 6, 2, 14, 6, 2, 2, 6, 2, 10, 10, 22, 2, 6, 2, 26, 2, 14, 2, 30, 2, 2, 14, 34, 6, 6, 2, 38, 22, 10, 2, 70, 2, 22, 6, 46, 2, 6, 2, 10, 26, 26, 2, 6, 10, 14, 34, 58, 2, 30, 2, 62, 10, 2, 14, 154, 2, 34, 38, 42, 2, 6, 2, 74, 6, 38, 6, 286, 2, 10, 2, 82, 2, 70, 22, 86
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Encode n with the function f(n) = noting the distinct prime divisors p of n by writing "1" in the (PrimePi(n) - 1)-th place, e.g, f(6) = f(12) = "11". This function is akin to A054841(n) except we don't note the multiplicity e of p in n, rather merely note "1" if e > 0.
This sequence decodes f(n) by reversing the digits.
If we decode f(n) without reversal, we have A007947(n), since f(n) sets any multiplicity e > 1 of prime divisor p of n to 1.
All terms except a(1) are of the form 2x with x odd. a(1) = 1, since f(1) = "0" and stands unaffected in reversal and decoding, and any zeros to the right of all 1's are lost in reversal. Thus f(15) = "110" reversed becomes "011" -> "11" decoded equals 2 * 3 = 6. Because we lose leading zeros, we always have 1 in position 1, which decoded is interpreted as the factor 2.
a(p) for p prime = 2, since primes are written via f(p) as 1 in the (PrimePi(p)-1)-th place. There is only one 1 in this number (similar to a perfect power of ten decimally) and when it is reversed, the number loses all leading zeros to become "1" -> 2. This also applies to prime powers p^e, since e is rendered as 1 by f(p^e), i.e., f(p^e) = f(p).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(3) = 2 since f(3) = "10" reversed becomes "01", loses leading zeros to become "1" -> 2.
a(6) = a(12) = "11" reversed stays the same -> 2 * 3 = 6.
a(15) = "110" reversed becomes "011", loses leading zeros to become "11" -> 6.
a(42) = "1101" reversed becomes "1011" -> 70 (a(70) = 42).
|
|
MATHEMATICA
|
Table[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ If[# == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> 1 &, f]]@ FactorInteger@ #] &@ n, {n, 86}]
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|