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-6 of 6 results.

A088118 Duplicate of A088117.

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

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

A257297 a(n) = (initial digit of n) * (n with initial digit removed).

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, 1, 2, 3
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

The initial 100 terms match those of A035930 (maximal product of any two numbers whose concatenation is n) and also those of A171765 (product of digits of n, or 0 for n<10), and except for initial terms, also A007954 (product of decimal digits of n) and A115300 (greatest digit of n * least digit of n).
Iterations of this map always end in 0, since a(n) < n. Sequence A257299 lists numbers for which these iterations reach 0 in exactly 9 steps, with the additional constraint of having each time a different initial digit.
If "initial" is replaced by "last" in the definition (A257850), then we get the same values up to a(100), but (10, 20, 30, ...) for n = 101, 102, 103, ..., again different from each of the 4 other sequences mentioned in the first comment. - M. F. Hasler, Sep 01 2021

Examples

			For n<10, a(n) = n*0 = 0, since removing the initial and only digit leaves nothing, i.e., zero (by convention).
a(10) = 1*0 = 0, a(12) = 1*2 = 2, ..., a(20) = 2*0 = 0, a(21) = 2*1 = 2, a(22) = 2*2 = 4, ...
a(99) = 9*9 = 81, a(100) = 1*00 = 0, a(101) = 1*01 = 1, ..., a(123) = 1*23, ...
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n<10, 0, (s-> parse(s[1])*parse(s[2..-1]))(""||n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, Feb 12 2024
  • Mathematica
    Table[Times@@FromDigits/@TakeDrop[IntegerDigits@n,1],{n,0,103}] (* Giorgos Kalogeropoulos, Sep 03 2021 *)
  • PARI
    apply( {A257297(n)=vecprod(divrem(n,10^logint(n+!n,10)))}, [0..111]) \\ Edited by M. F. Hasler, Sep 01 2021
    
  • Python
    def a(n): s = str(n); return 0 if len(s) < 2 else int(s[0])*int(s[1:])
    print([a(n) for n in range(104)]) # Michael S. Branicky, Sep 01 2021

Formula

For 1 <= m <= 9 and n < 10^k, a(m*10^k + n) = m*n.

Extensions

a(101..103) corrected by M. F. Hasler, Sep 01 2021

A088116 Let n = abc..., where a, b, c, are digits of n. a(n) = a*bc...+b*ac...+c*ab...+..., i.e., a(n) = sum, over all the digits, of the product (number obtained by deleting a digit multiplied by the deleted digit).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 0, 14, 28, 42, 56, 70, 84, 98
Offset: 0

Views

Author

Amarnath Murthy, Sep 25 2003

Keywords

Comments

First 100 terms (for all two digit numbers) match with that of A069816. A088116(10a + b) = 2ab = (a+b)^2 - (a^2 + b^2) = A069816(10a + b).
The first known fixed points, after zero, are numbers of the forms 36*10^k and 1314*10^k for k >= 0. All have 9 as the sum of their digits. Calculated up to n = 10^10. - Stéphane Rézel, Jul 31 2019

Examples

			a(1234) = 234 + 2*134 + 3*124 + 4*123 = 1366.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[Total[IntegerDigits[n]Table[FromDigits[Drop[ IntegerDigits[ n],{d}]],{d,IntegerLength[n]}]],{n,100}]] (* Harvey P. Dale, Dec 23 2021 *)
  • PARI
    a(n) = {v=digits(n);sum(k=1,#v,v[k]*(n\10^(#v-k+1)*10^(#v-k)+n%10^(#v-k)));} \\ Jinyuan Wang, Aug 01 2019

Extensions

More terms from David Wasserman, May 10 2005
Offset 0 from Stéphane Rézel, Jul 31 2019

A330633 The concatenation of the products of every pair of consecutive digits of n (with a(n) = 0 for 0 <= n <= 9).

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
Offset: 0

Views

Author

Scott R. Shannon, Dec 21 2019

Keywords

Comments

If the decimal expansion of n is d_1 d_2 ... d_k then a(n) is the number formed by concatenating the decimal numbers d_1*d_2, d_2*d_3, ..., d_{k-1}*d_k.
Due to the fact that for two digit numbers the sequence is simply the multiplication of those two numbers, this sequence matches numerous others for the first 100 terms. See the sequences in the cross references. The terms begin to differ beyond n = 100.

Crossrefs

Programs

  • Maple
    read("transforms") :
    A330633 := proc(n)
        local dgs,L,i ;
        if n <=9 then
            0;
        else
            dgs := ListTools[Reverse](convert(n,base,10)) ;
            L := [] ;
            for i from 2 to nops(dgs) do
                L := [op(L), op(i-1,dgs)*op(i,dgs)] ;
            end do:
            digcatL(L) ;
        end if;
    end proc: # R. J. Mathar, Jan 11 2020
  • Mathematica
    Array[If[Or[# == 0, IntegerLength@ # == 1], 0, FromDigits[Join @@ IntegerDigits[Times @@ # & /@ Partition[IntegerDigits@ #, 2, 1]]]] &, 81, 0] (* Michael De Vlieger, Dec 23 2019 *)
  • PARI
    a(n) = my(d=digits(n), s="0"); for (k=1, #d-1, s=concat(s, d[k]*d[k+1])); eval(s); \\ Michel Marcus, Apr 28 2020

Formula

a(10) = 0 as 1 * 0 = 0.
a(29) = 18 as 2 * 9 = 18.
a(100) = 0 as 1 * 0 = 0 and 0 = 0 = 0, and '00' is reduced to 0.
a(110) = 10 as 1 * 1 = 1 and 1 * 0 = 0. This is the first term that differs from A007954 and A171765, the multiplication of all digits of n.

A347470 Least product of any two numbers whose concatenation is n, excluding 0*n for n > 9.

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, 80, 90, 0, 11, 12
Offset: 0

Views

Author

M. F. Hasler, Sep 03 2021

Keywords

Comments

Leading zeros are not allowed: e.g., 101 = concat(10,1) but not concat(1,01). Although 0 is a valid number, we don't allow the trivial decomposition n = concat(0, n) except for the single-digit n < 10, otherwise the minimal product would always be 0.
For n < 111, this sequence coincides with A035930 (same with "largest"), because there is only one possible concatenation, but it differs for n > 111, cf. examples.

Examples

			The number n = 112 is the concatenation of 1 and 12, or of 11 and 2, with respective products 1*12 = 12 and 11*2 = 22. Hence, a(112) = 12, while A035930(112) = 22.
		

Crossrefs

Programs

  • PARI
    apply( {A347470(x,t(b,c)=if(c\10<=b%c,b\c*(b%c),c>10,oo))= if(x>9,vecmin(vector(logint(x,10),j,t(x,10^j))))}, [0..112])
Showing 1-6 of 6 results.