The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289667 Concatenate prime factorization written in base 3, convert back to decimal. 5
1, 2, 3, 8, 5, 21, 7, 21, 11, 23, 11, 75, 13, 25, 32, 22, 17, 65, 19, 77, 34, 65, 23, 192, 17, 67, 30, 79, 29, 194, 31, 23, 92, 71, 52, 227, 37, 73, 94, 194, 41, 196, 43, 227, 104, 77, 47, 201, 23, 71, 98, 229, 53, 192, 146, 196, 100, 191, 59, 680, 61, 193, 106, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A080670 is the base 10 version, A230625 is the binary version.
LINKS
MAPLE
# take ifsSorted from A080670
A289667 := proc(n)
local Ldgs, p, eb, pb, b ;
b := 3;
if n = 1 then
return 1;
end if;
Ldgs := [] ;
for p in ifsSorted(n) do
pb := convert(op(1, p), base, b) ;
Ldgs := [op(pb), op(Ldgs)] ;
if op(2, p) > 1 then
eb := convert(op(2, p), base, b) ;
Ldgs := [op(eb), op(Ldgs)] ;
end if;
end do:
add( op(e, Ldgs)*b^(e-1), e=1..nops(Ldgs)) ;
end proc:
seq(A289667(n), n=1..30) ; # R. J. Mathar, Aug 05 2017
MATHEMATICA
Table[FromDigits[#, 3] &@ Flatten@ Map[IntegerDigits[#, 3] &, FactorInteger[n] /. {p_, e_} /; p > 0 :> If[e == 1, p, {p, e}]], {n, 64}] (* Michael De Vlieger, Jul 29 2017 *)
PROG
(PARI) a(n) = {if (n==1, return(1)); f = factor(n); s = []; for (i=1, #f~, s = concat(s, digits(f[i, 1], 3)); if (f[i, 2] != 1, s = concat(s, digits(f[i, 2], 3))); ); fromdigits(s, 3); } \\ Michel Marcus, Jul 27 2017
CROSSREFS
Sequence in context: A346957 A062956 A333375 * A053650 A119794 A117987
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jul 27 2017
EXTENSIONS
More terms from Michel Marcus, Jul 27 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 11:18 EDT 2024. Contains 373331 sequences. (Running on oeis4.)