Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A156230
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A156230 Sum of the products of the digits of n and the positions of the digits m in n starting from the last digit. +0
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 (list; graph; listen)
OFFSET

1,2

COMMENT

Starts to differ from A081594 when n>=100. [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 19 2009]

FORMULA

Let n = d(1)d(2)...d(m) where d(1),d(2),...,d(m) are the digits of n. Then a(n) = m*d1+(m-1)*d2+...+d(m).

EXAMPLE

a(19) = 9*1 + 1*2 = 11.

PROGRAM

(PARI) gr(n) = v=Vec((rev(n))); sum(x=1, length(v), x*eval(v[x]))

gr1(n) = for(j=1, n, print1(gr(j)", "))

rev(str) = /* Get the reverse of the input string

*/ {

local(tmp, s, j);

tmp = Vec(Str(str));

s="";

forstep(j=length(tmp), 1, -1,

s=concat(s, tmp[j]));

return(s)

}

CROSSREFS

Sequence in context: A138795 A093017 A028897 this_sequence A081594 A038506 A091047

Adjacent sequences: A156227 A156228 A156229 this_sequence A156231 A156232 A156233

KEYWORD

base,nonn

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), Feb 06 2009

EXTENSIONS

Changed the description, formula and Pari code Cino Hilliard (hillcino368(AT)hotmail.com), Feb 08 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 6 22:55 EST 2009. Contains 170429 sequences.


AT&T Labs Research