OFFSET
1,2
COMMENTS
As in A080670 the prime factorization of n is written as p1^e1*...*pN^eN (except for exponents eK = 1 which are omitted), with all factors and exponents in binary (cf. A007088). Then "^" and "*" signs are dropped and all binary digits are concatenated.
See A230625 for the terms written in base 10, and for further information (fixed points, trajectories).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
a(1) = 1 by convention.
a(2) = 10 (= 2 written in binary).
a(4) = 1010 = concatenate(10,10), since 4 = 2^2 = 10[2] ^ 10[2].
a(6) = 1011 = concatenate(10,11), since 6 = 2*3 = 10[2] * 11[2].
a(8) = 1011 = concatenate(10,11), since 8 = 2^3 = 10[2] ^ 11[2].
MAPLE
f:= proc(n) local F, L, i;
F:= map(op, subs(1=NULL, sort(ifactors(n)[2], (a, b) -> a[1] < b[1])));
F:= map(convert, F, binary);
L:= map(length, F);
L:= ListTools:-Reverse(ListTools:-PartialSums(ListTools:-Reverse(L)));
add(F[i]*10^L[i+1], i=1..nops(F)-1)+F[-1];
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Jun 20 2017
MATHEMATICA
fn[1] = 1; fn[n_] := FromDigits[Flatten[IntegerDigits[DeleteCases[Flatten[FactorInteger[n]], 1], 2]]];
Table[fn[n], {n, 37}] (* Robert Price, Mar 16 2020 *)
PROG
(PARI) A287874(n)=if(n>1, fromdigits(concat(apply(binary, select(t->t>1, concat(Col(factor(n))~)))), 10), 1) \\ M. F. Hasler, Jun 21 2017
(Python)
from sympy import factorint
def a(n):
f=factorint(n)
return 1 if n==1 else int("".join(bin(i)[2:] + bin(f[i])[2:] if f[i]!=1 else bin(i)[2:] for i in f))
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 15 2017
EXTENSIONS
Edited by M. F. Hasler, Jun 21 2017
STATUS
approved