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.

Showing 1-5 of 5 results.

A035930 Maximal product of any two numbers whose concatenation is n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 0, 10, 20, 30, 40, 50, 60, 70
Offset: 0

Views

Author

Keywords

Comments

Agrees up to a(100) = 0 with A088117, A171765 and A257297, but all of the four differ in a(101) and subsequent values. - M. F. Hasler, Sep 01 2021

Examples

			a(341) = max(34*1,3*41) = 123.
		

Crossrefs

Different from A007954, A088117, A171765 and A257297. Cf. A035931-A035935.

Programs

  • Haskell
    a035930 n | n < 10    = 0
              | otherwise = maximum $ zipWith (*)
                (map read $ init $ tail $ inits $ show n)
                (map read $ tail $ init $ tails $ show n)
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Maple
    a:= proc(n) local l, m; l:= convert(n, base, 10); m:= nops(l);
          `if`(m<2, 0, max(seq(parse(cat(seq(l[m-i], i=0..j-1)))
           *parse(cat(seq(l[m-i], i=j..m-1))), j=1..m)))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, May 22 2009
  • Mathematica
    Flatten[With[{c=Range[0,9]},Table[c*n,{n,0,10}]]] (* Harvey P. Dale, Jun 07 2012 *)
  • PARI
    apply( {A035930(n)=if(n>9,vecmax([vecprod(divrem( n,10^j))|j<-[1..logint(n,10)]]))}, [0..111]) \\ M. F. Hasler, Sep 01 2021
    
  • Python
    def a(n):
        s = str(n)
        return max((int(s[:i])*int(s[i:]) for i in range(1, len(s))), default=0)
    print([a(n) for n in range(108)]) # Michael S. Branicky, Sep 01 2021

Extensions

An erroneous formula was deleted by N. J. A. Sloane, Dec 23 2008

A035931 Number of steps to reach 0 under "k->max product of two numbers whose concatenation is k".

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 1, 2, 2, 3, 3, 2, 3, 4, 3, 4, 1, 2, 2, 3, 2, 3, 2, 4, 2, 3, 1, 2, 3, 3, 3, 2, 4, 3, 4, 3, 1, 2, 3, 3, 4, 4, 3, 5, 3, 4, 1, 2, 3, 3, 3, 2, 4, 3, 4, 4, 1, 2, 3, 4, 4, 3, 3, 4, 4, 3, 1
Offset: 0

Views

Author

Keywords

Examples

			a(341)=5 since 341->123->36->18->8->0.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[n<10, 0, With[{d = IntegerDigits[n]}, Table[FromDigits[Take[d, k]]*FromDigits[Drop[d, k]], {k, 1, Length[d]-1}] // Max]];
    a[n_] := If[n == 0, 0, Length[FixedPointList[f, n]]-2];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 03 2017 *)

A035934 Smallest number that can be made to take n steps to reach 0 under "k -> any product of 2 numbers whose concatenation is k".

Original entry on oeis.org

0, 1, 11, 26, 39, 77, 117, 139, 429, 529, 777, 1117, 1669, 2238, 2993, 3697, 4779, 5319, 5919, 10998, 11794, 14989, 21179, 26869, 27797, 36177, 38993, 62958, 74297, 85797, 95339, 113319, 125919, 139919, 199683, 201799, 247817, 333329, 360497, 419926
Offset: 0

Views

Author

Keywords

Examples

			a(6) = 117 since 117 -> 77 -> 49 -> 36 -> 18 -> 8 -> 0.
		

Crossrefs

Programs

  • Mathematica
    tbl=Table[1, {10}]; Do[tbl=Append[tbl, b=IntegerDigits[k]; If[(First[b]==0||Last[b]==0), 1, Max[Part[tbl, Table[FromDigits[Take[b, i]]*FromDigits[Take[b, i-Length[b]]], {i, 1, Length[b]-1}]]]+1]], {k, 11, 170000}]; tbl; m=Max[tbl]; Prepend[Flatten[Table[Position[tbl, i, 1, 1], {i, 1, m}]], 0]

Extensions

More terms from Naohiro Nomoto, Apr 11 2001
More terms from Vit Planocka (planocka(AT)mistral.cz), Feb 01 2003
More terms from Martin Fuller, Jun 02 2006

A035932 Smallest number that takes n steps to reach 0 under "k->max product of 2 numbers whose concatenation is k".

Original entry on oeis.org

0, 1, 11, 26, 39, 77, 117, 139, 449, 529, 777, 1117, 2229, 2982, 4267, 4779, 5319, 5919, 8693, 12699, 14119, 17907, 27779, 47877, 80299, 103199, 135199, 274834, 293938, 312794, 606963, 653993, 773989, 1160892, 1296741, 1616696, 1986576
Offset: 0

Views

Author

Keywords

Crossrefs

Extensions

More terms from Naohiro Nomoto, Apr 03 2001

A035933 Smallest number that takes n steps to reach 0 under "k->min product of 2 numbers whose concatenation is k".

Original entry on oeis.org

0, 1, 11, 26, 39, 77, 177, 359, 977, 1977, 3659, 13659, 28879, 128879, 289978, 999663, 4474997, 14474997, 39596964, 139596964, 389999999, 1389999999, 2899999999, 12899999999, 49999999986, 149999999986, 446874999996, 1446874999996
Offset: 0

Views

Author

Keywords

Comments

a(28) > 4.4*10^12. - Jon E. Schoenfield, Jan 05 2009

Crossrefs

Extensions

More terms from Naohiro Nomoto, Apr 03 2001
a(18)-a(27) from Jon E. Schoenfield, Jan 05 2009
Showing 1-5 of 5 results.