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.

A054841 If n = 2^a * 3^b * 5^c * 7^d * ... then a(n) = a + 10 * b + 100 * c + 1000 * d + ... .

Original entry on oeis.org

0, 1, 10, 2, 100, 11, 1000, 3, 20, 101, 10000, 12, 100000, 1001, 110, 4, 1000000, 21, 10000000, 102, 1010, 10001, 100000000, 13, 200, 100001, 30, 1002, 1000000000, 111, 10000000000, 5, 10010, 1000001, 1100, 22, 100000000000, 10000001, 100010
Offset: 1

Views

Author

Henry Bottomley, Apr 11 2000

Keywords

Comments

Are there any other numbers besides n=12 for which n=a(n) ? - Ctibor O. Zizka, Oct 08 2008
The sequence is a morphism from (N*,*) into (N,+), cf. formula. Up to n=1023, the digit sum A007953(a(n)) equals Omega(n) = A001222(n). This holds whenever A051903(n)<10. Restricted to these n, the sequence is also injective. However, when n is a multiple of 2^10, 3^10, 5^10 etc, then a(n) is equal to some a(m) with mM. F. Hasler, Nov 16 2008
This has been called the "Exponential Prime Power Representation" of n by W. Nissen in a post to the sci.math newsgroup (where probably some more sophisticated convention for representing digits > 10 would be used). - M. F. Hasler, Jul 03 2016

Examples

			a(25) = 200 because 25 = 5^2 * 3^0 * 2^0.
a(1024) = 10 = a(3), because 1024 = 2^10; but this two-digit multiplicity overflows into the 10^1 position, which encodes for powers of three.
		

Crossrefs

Row 10 of A104244.
Left inverse of A054842.
Cf. A001222, A048675, A090880, A090881, A090882, A276075, A276085 (analogous constructions for other bases), A090883, A090884, A049084, A027748, A124010, A056239.

Programs

  • Haskell
    a054841 1 = 0
    a054841 n = sum $ zipWith (*)
                      (map ((10 ^) . subtract 1 . a049084) $ a027748_row n)
                      (map fromIntegral $ a124010_row n)
    -- Reinhard Zumkeller, Aug 03 2015
    
  • Maple
    A:= n -> add(t[2]*10^(numtheory:-pi(t[1])-1),t= ifactors(n)[2]);
    seq(A(n), n=1..1000); # Robert Israel, Jul 24 2014
  • Mathematica
    a054841[n_Integer] := Catch[FromDigits[IntegerDigits[Apply[Plus,
         Which[n == 0, Throw["undefined"],
            n == 1, 0,
            Max[Last /@ FactorInteger @ n] > 9, Throw["overflow"],
            True, Power[10, PrimePi[Abs[#]] - 1]] & /@
          Flatten[ConstantArray @@@ FactorInteger[n]]]]]] (* Michael De Vlieger, Jul 24 2014 *)
  • PARI
    A054841(n)=sum(i=1,#n=factor(n)~,10^primepi(n[1,i])*n[2,i])/10 \\ M. F. Hasler, Nov 16 2008
    
  • Python
    from sympy import factorint, primepi
    def a(n): return sum(e*10**(primepi(p)-1) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 41)]) # Michael S. Branicky, Mar 17 2024

Formula

a(m*n) = a(m) + a(n) for all m,n > 0. A007953(a(n))=A001222(n) for all n such that A051903(n) < 10. - M. F. Hasler, Nov 16 2008
a(n) = sum(10^(A049084(A027748(k))-1) * A124010(k): k = 1..A001221(n)). - Reinhard Zumkeller, Aug 03 2015
a(A054842(n)) = n for all n >= 0. - Antti Karttunen, Aug 29 2016
a(n) = Sum_{i>0} e_i*10^(i-1) when n = Product_{i>0} prime(i)^e_i. - M. F. Hasler, Mar 14 2018