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!)
A274206 a(n) = the last nonzero digit of n followed by all the trailing zeros of n. 2

%I #69 Nov 08 2016 21:04:18

%S 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,20,1,2,3,4,5,6,7,8,9,30,1,2,3,

%T 4,5,6,7,8,9,40,1,2,3,4,5,6,7,8,9,50,1,2,3,4,5,6,7,8,9,60,1,2,3,4,5,6,

%U 7,8,9,70,1,2,3,4,5,6,7,8,9,80

%N a(n) = the last nonzero digit of n followed by all the trailing zeros of n.

%C a(n) is the number formed by the rightmost A160094(n) digits -- only the position(s) that changed -- of a decimal counter (e.g., an odometer) after it increments from n - 1 to n. - _Rick L. Shepherd_, Jun 29 2016

%H A. D. Skovgaard, <a href="/A274206/b274206.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = n mod 10 if n is not a multiple of 10.

%F From _Robert Israel_, Aug 08 2016: (Start)

%F a(10*n) = 10*a(n).

%F a(10*n+k) = k for 1 <= k <= 9.

%F G.f. g(x) satisfies g(x) = (x+2x^2+...+9x^9)/(1-x^10) + 10 g(x^10). (End)

%e a(1) = 1 because when 1 is added to 1 - 1 = 0, the units digit changes so the units digit of 1 is shown.

%e a(110) = 10 because when 1 is added to 109, the tens digit and the units digit change, so the last two digits of 110 are shown.

%e a(1000) = 1000 because when 1 is added to 999, all the digits change so they are all shown.

%p f:= n -> n mod 10^(1+min(padic:-ordp(n,2), padic:-ordp(n,5))):

%p map(f, [$1..100]); # _Robert Israel_, Aug 08 2016

%t Table[FromDigits@ Join[{Last@ #}, Table[0, {Log10[n/FromDigits@ #]}]] &@ Select[IntegerDigits@ n, # != 0 &], {n, 120}] (* _Michael De Vlieger_, Jun 29 2016 *)

%o (PARI) a(n) = n%10^(valuation(n,10)+1); \\ _David A. Corneth_, Jun 29 2016

%Y Cf. A010879, A037124 (these increasing distinct terms), A006519 (binary equivalent shown in decimal), A160094.

%K base,easy,nonn

%O 1,2

%A _A. D. Skovgaard_, Jun 13 2016

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 April 23 07:16 EDT 2024. Contains 371905 sequences. (Running on oeis4.)