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.

A048985 Working in base 2, replace n with the concatenation of its prime divisors in increasing order (write answer in base 10).

This page as a plain text file.
%I A048985 #28 Oct 07 2022 20:35:16
%S A048985 1,2,3,10,5,11,7,42,15,21,11,43,13,23,29,170,17,47,19,85,31,43,23,171,
%T A048985 45,45,63,87,29,93,31,682,59,81,47,175,37,83,61,341,41,95,43,171,125,
%U A048985 87,47,683,63,173,113,173,53,191,91,343,115,93,59,349,61,95,127,2730
%N A048985 Working in base 2, replace n with the concatenation of its prime divisors in increasing order (write answer in base 10).
%H A048985 Reinhard Zumkeller, <a href="/A048985/b048985.txt">Table of n, a(n) for n = 1..10000</a>
%H A048985 Patrick De Geest, <a href="http://www.worldofnumbers.com/topic1.htm">Home Primes</a>
%e A048985 15 = 3*5 -> 11.101 -> 11101 = 29, so a(15) = 29.
%t A048985 f[n_] := FromDigits[ Flatten[ IntegerDigits[ Flatten[ Table[ #1, {#2}] & @@@ FactorInteger@n], 2]], 2]; Array[f, 64] (* _Robert G. Wilson v_, Jun 02 2010 *)
%o A048985 (Haskell)
%o A048985 -- import Data.List (unfoldr)
%o A048985 a048985 = foldr (\d v -> 2 * v + d) 0 . concatMap
%o A048985    (unfoldr (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2))
%o A048985    . reverse . a027746_row
%o A048985 -- _Reinhard Zumkeller_, Jul 16 2012
%o A048985 (Python)
%o A048985 from sympy import factorint
%o A048985 def a(n):
%o A048985     if n == 1: return 1
%o A048985     return int("".join(bin(p)[2:]*e for p, e in factorint(n).items()), 2)
%o A048985 print([a(n) for n in range(1, 65)]) # _Michael S. Branicky_, Oct 07 2022
%Y A048985 Cf. A037276, A048986, A064841.
%Y A048985 Cf. A193652, A029744 (record values and where they occur).
%Y A048985 Cf. A027746.
%K A048985 nonn,easy,nice,base,look
%O A048985 1,2
%A A048985 _N. J. A. Sloane_
%E A048985 More terms from Sam Alexander (pink2001x(AT)hotmail.com) and _Michel ten Voorde_