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!)
A004155 Sum of digits of n-th odd number. 2

%I #16 Oct 24 2023 20:33:32

%S 1,3,5,7,9,2,4,6,8,10,3,5,7,9,11,4,6,8,10,12,5,7,9,11,13,6,8,10,12,14,

%T 7,9,11,13,15,8,10,12,14,16,9,11,13,15,17,10,12,14,16,18,2,4,6,8,10,3,

%U 5,7,9,11,4,6,8,10,12,5

%N Sum of digits of n-th odd number.

%H G. C. Greubel, <a href="/A004155/b004155.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = 2n - 1 - 9*Sum_{k=1..1+floor(log_10(2n-1))} floor( (n-1)/(5*10^(k-1)) ). - _Anthony Browne_, Jun 18 2016

%F a(n) = A004092(n+5). - _G. C. Greubel_, Jun 19 2016

%t Table[Sum[DigitCount[2*n + 1][[i]]*i, {i, 9}], {n, 0, 100}] (* _G. C. Greubel_, Jun 19 2016 *)

%o (PARI) a(n)=sumdigits(2*n+1) \\ _Charles R Greathouse IV_, Jun 19 2016

%Y Cf. A004092, A007953.

%K nonn,base,easy

%O 0,2

%A _N. J. A. Sloane_

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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)