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.

A037276 Start with 1; for n>1, replace n with the concatenation of its prime factors in increasing order.

Original entry on oeis.org

1, 2, 3, 22, 5, 23, 7, 222, 33, 25, 11, 223, 13, 27, 35, 2222, 17, 233, 19, 225, 37, 211, 23, 2223, 55, 213, 333, 227, 29, 235, 31, 22222, 311, 217, 57, 2233, 37, 219, 313, 2225, 41, 237, 43, 2211, 335, 223, 47, 22223, 77, 255, 317, 2213, 53, 2333
Offset: 1

Views

Author

Keywords

Examples

			If n = 2^3*5^5*11^2 = 3025000, a(n) = 222555551111 (n=2*2*2*5*5*5*5*5*11*11, then remove the multiplication signs).
		

Crossrefs

Cf. A037274, A048985, A067599, A080670, A084796. Different from A073646.
Cf. also A027746, A289660 (a(n)-n).

Programs

  • Haskell
    a037276 = read . concatMap show . a027746_row
    -- Reinhard Zumkeller, Apr 03 2012
    
  • Maple
    # This is for n>1
    read("transforms") ;
    A037276 := proc(n)
        local L,p ;
        L := [] ;
        for p in ifactors(n)[2] do
            L := [op(L),seq(op(1,p),i=1..op(2,p))] ;
        end do:
        digcatL(L) ;
    end proc: # R. J. Mathar, Oct 29 2012
  • Mathematica
    co[n_, k_] := Nest[Flatten[IntegerDigits[{#, n}]] &, n, k - 1]; Table[FromDigits[Flatten[IntegerDigits[co @@@ FactorInteger[n]]]], {n, 54}] (* Jayanta Basu, Jul 04 2013 *)
    FromDigits@ Flatten@ IntegerDigits[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 54 (* Michael De Vlieger, Jul 14 2015 *)
  • PARI
    a(n)={ n<4 & return(n); for(i=1,#n=factor(n)~, n[1,i]=concat(vector(n[2,i],j,Str(n[1,i])))); eval(concat(n[1,]))}  \\ M. F. Hasler, Jun 19 2011
    
  • Python
    from sympy import factorint
    def a(n):
        f=factorint(n)
        l=sorted(f)
        return 1 if n==1 else int("".join(str(i)*f[i] for i in l))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017