login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257297 a(n) = (initial digit of n) * (n with initial digit removed). 6

%I #22 Feb 12 2024 20:08:40

%S 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,

%T 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,

%U 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

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

%C 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).

%C 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.

%C 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

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

%e For n<10, a(n) = n*0 = 0, since removing the initial and only digit leaves nothing, i.e., zero (by convention).

%e 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, ...

%e a(99) = 9*9 = 81, a(100) = 1*00 = 0, a(101) = 1*01 = 1, ..., a(123) = 1*23, ...

%p a:= n-> `if`(n<10, 0, (s-> parse(s[1])*parse(s[2..-1]))(""||n)):

%p seq(a(n), n=0..120); # _Alois P. Heinz_, Feb 12 2024

%t Table[Times@@FromDigits/@TakeDrop[IntegerDigits@n,1],{n,0,103}] (* _Giorgos Kalogeropoulos_, Sep 03 2021 *)

%o (PARI) apply( {A257297(n)=vecprod(divrem(n,10^logint(n+!n,10)))}, [0..111]) \\ Edited by _M. F. Hasler_, Sep 01 2021

%o (Python)

%o def a(n): s = str(n); return 0 if len(s) < 2 else int(s[0])*int(s[1:])

%o print([a(n) for n in range(104)]) # _Michael S. Branicky_, Sep 01 2021

%Y Cf. A257850, A007954, A035930, A080464, A115300, A169669, A111707, A088117, A187844.

%K nonn,base,easy

%O 0,13

%A _M. F. Hasler_, May 10 2015

%E a(101..103) corrected by _M. F. Hasler_, Sep 01 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 20:42 EDT 2024. Contains 374288 sequences. (Running on oeis4.)