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

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

A115300 Greatest digit of n * least digit of n.

Original entry on oeis.org

1, 4, 9, 16, 25, 36, 49, 64, 81, 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
Offset: 1

Views

Author

Rick L. Shepherd, Jan 20 2006

Keywords

Comments

a(101) = 0 and A111707(101) = 1, but all previous terms match.
a(n) = A169669(n) for n <= 100.

Examples

			a(3) = 3 * 3 = 9, a(232) = 3 * 2 = 6, a(1889009898) = 9 * 0 = 0.
		

Crossrefs

Cf. A037904 (greatest-least), A115299 (greatest+least), A111707.

Programs

  • Haskell
    a115300 n = a054054 n * a054055 n  -- Reinhard Zumkeller, Apr 29 2015
    
  • Mathematica
    Array[Max[#] * Min[#] &@ IntegerDigits[#] &, 81] (* James C. McMahon, Aug 18 2024 *)
  • PARI
    a(n) = my(d=digits(n)); vecmin(d)*vecmax(d); \\ Michel Marcus, Aug 18 2024
  • Python
    def a(n): d = list(map(int, str(n))); return max(d) * min(d)
    print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Dec 12 2023
    

Formula

a(n) = A054054(n)*A054055(n). - Reinhard Zumkeller, Apr 29 2015

A169669 (first digit of n) * (last digit of n) in decimal representation.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 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

Reinhard Zumkeller, Apr 05 2010

Keywords

Comments

a(n) = A000030(n)*A010879(n);
a(n) = A115300(n) for n<=100, A115300(101) = 0;
a(n) = A111707(n) for n<=109, A111707(110) = 1;
0 <= a(n) <= 81, range = A174995;
a(10*n + n mod 10) = a(n);
a(A008592(n)) = 0;
a(n) = a(A004086(n))*A168184(n);

Crossrefs

Programs

  • Haskell
    a169669 n = a000030 n * mod n 10
    -- Reinhard Zumkeller, Apr 29 2015
    
  • Python
    def a(n): return int(str(n)[0])*(n%10)
    print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 13 2022

A085942 Write digit reversal of n below n. Then a(n) = the sum of the product of digits in the same column.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 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
Offset: 0

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 14 2003

Keywords

Comments

a(n) = sum of the products of r-th most significant digit and the r-th least significant digit, the sum being taken over all the digits of n.
If the number of digits in n is even then a(n) is also even.
a(36) = 36.

Examples

			a(4) = 4*4 = 16.
a(123) = 10: 123
............ 321 (1*3 +2*2 +3*1 = 10).
a(1203) = 1*3 + 2*0 + 0*2 +3*1 = 6.
a(1234) = 1*4 +2*3 + 3*2 +4*1 = 20.
		

Crossrefs

Cf. A111707.

Programs

  • Mathematica
    dr[n_]:=Module[{idn=IntegerDigits[n]},Total[Times@@@Transpose[Join[{idn, Reverse[idn]}]]]]; Array[dr,80] (* Harvey P. Dale, May 03 2011 *)
  • PARI
    a(n) = { my (d=digits(n)); d*Colrev(d) } \\ Rémy Sigrist, May 21 2021

Extensions

More terms from David Wasserman, Feb 14 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
a(0) = 0 prepended by Rémy Sigrist, May 21 2021
Showing 1-4 of 4 results.