cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A230625 Concatenate prime factorization written in binary, convert back to decimal.

This page as a plain text file.
%I A230625 #64 May 21 2018 12:00:04
%S A230625 1,2,3,10,5,11,7,11,14,21,11,43,13,23,29,20,17,46,19,85,31,43,23,47,
%T A230625 22,45,15,87,29,93,31,21,59,81,47,174,37,83,61,93,41,95,43,171,117,87,
%U A230625 47,83,30,86,113,173,53,47,91,95,115,93,59,349,61,95,119,22
%N A230625 Concatenate prime factorization written in binary, convert back to decimal.
%C A230625 As in A080670 the prime factorization 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, all binary digits are concatenated, and the result is converted back to decimal (base 10). - _M. F. Hasler_, Jun 21 2017
%C A230625 The first nontrivial fixed point of this function is 255987. Smaller numbers such that a(a(n)) = n are 1007, 1269; 1503, 3751. See A230627 for further information. - _M. F. Hasler_, Jun 21 2017
%C A230625 255987 is the only nontrivial fixed point less than 10000000. - _Benjamin Knight_, May 16 2018
%H A230625 Chai Wah Wu, <a href="/A230625/b230625.txt">Table of n, a(n) for n = 1..10000</a>
%H A230625 N. J. A. Sloane, <a href="/A195264/a195264.pdf">Confessions of a Sequence Addict (AofA2017)</a>, slides of invited talk given at AofA 2017, Jun 19 2017, Princeton. Mentions this sequence.
%H A230625 N. J. A. Sloane, Three (No, 8) Lovely Problems from the OEIS, Experimental Mathematics Seminar, Rutgers University, Oct 05 2017, <a href="https://vimeo.com/237029685">Part I</a>, <a href="https://vimeo.com/237030304">Part 2</a>, <a href="https://oeis.org/A290447/a290447_slides.pdf">Slides.</a> (Mentions this sequence)
%e A230625 6 = 2*3 = (in binary) 10*11 -> 1011 = 11 in base 10, so a(6) = 11.
%e A230625 20 = 2^2*5 = (in binary) 10^10*101 -> 1010101 = 85 in base 10, so a(20) = 85.
%p A230625 # take ifsSorted from A080670
%p A230625 A230625 := proc(n)
%p A230625     local Ldgs, p,eb,pb,b ;
%p A230625     b := 2;
%p A230625     if n = 1 then
%p A230625         return 1;
%p A230625     end if;
%p A230625     Ldgs := [] ;
%p A230625     for p in ifsSorted(n) do
%p A230625         pb := convert(op(1,p),base,b) ;
%p A230625         Ldgs := [op(pb),op(Ldgs)] ;
%p A230625         if op(2, p) > 1 then
%p A230625             eb := convert(op(2,p),base,b) ;
%p A230625             Ldgs := [op(eb),op(Ldgs)] ;
%p A230625         end if;
%p A230625     end do:
%p A230625     add( op(e,Ldgs)*b^(e-1),e=1..nops(Ldgs)) ;
%p A230625 end proc:
%p A230625 seq(A230625(n),n=1..30) ; # _R. J. Mathar_, Aug 05 2017
%t A230625 Table[FromDigits[#, 2] &@ Flatten@ Map[IntegerDigits[#, 2] &, FactorInteger[n] /. {p_, 1} :> {p}], {n, 64}] (* _Michael De Vlieger_, Jun 23 2017 *)
%o A230625 (Python)
%o A230625 import sympy
%o A230625 [int(''.join([bin(y)[2:] for x in sorted(sympy.ntheory.factorint(n).items()) for y in x if y != 1]),2) for n in range(2,100)] # compute a(n) for n > 1
%o A230625 # _Chai Wah Wu_, Jul 15 2014
%o A230625 (PARI) a(n) = {if (n==1, return(1)); f = factor(n); s = []; for (i=1, #f~, s = concat(s, binary(f[i, 1])); if (f[i, 2] != 1, s = concat(s, binary(f[i, 2])));); subst(Pol(s), x, 2);} \\ _Michel Marcus_, Jul 15 2014
%o A230625 (PARI) A230625(n)=n>1||return(1);fold((x,y)->if(y>1,x<<logint(y<<1,2)+y,x),concat(Col(factor(n))~)) \\ _M. F. Hasler_, Jun 21 2017
%Y A230625 Cf. A080670, A230626, A230627, A287875, A287878.
%Y A230625 See A289667 for the base 3 version.
%Y A230625 See A291803 for partial sums.
%K A230625 nonn,base
%O A230625 1,2
%A A230625 _N. J. A. Sloane_, Oct 27 2013
%E A230625 More terms from _Chai Wah Wu_, Jul 15 2014
%E A230625 Added self-contained definition. - _M. F. Hasler_, Jun 21 2017