login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101306 a(n) = sum_{i=1..n} {last digit of prime(i)}. 4
2, 5, 10, 17, 18, 21, 28, 37, 40, 49, 50, 57, 58, 61, 68, 71, 80, 81, 88, 89, 92, 101, 104, 113, 120, 121, 124, 131, 140, 143, 150, 151, 158, 167, 176, 177, 184, 187, 194, 197, 206, 207, 208, 211, 218, 227, 228, 231, 238, 247, 250, 259, 260, 261, 268, 271, 280 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

Asymptotically, a(n) ~ 5n by Dirichlet's theorem. [From Charles R Greathouse IV, Sep 28 2008]

FORMULA

Partial sums of A007652.

EXAMPLE

a(1)=2

a(2)=2+3

a(3)=2+3+5

a(4)=2+3+5+7

a(5)=2+3+5+7+1(1)= 2+3+5+7+1

MATHEMATICA

f[n_] := Sum[ Mod[ Prime[i], 10], {i, n}]; Array[ f, 60] (* From Robert G. Wilson v, Dec 22 2004 *)

Rest@ FoldList[Plus, 0, Mod[Prime@ Range@ 60, 10]] (* From Robert G. Wilson v, Jan 16 2011 *)

PROG

(PARI) sum(k=1, n, prime(k)%10) [From Charles R Greathouse IV, Sep 28 2008]

CROSSREFS

Sequence in context: A027613 A192701 A067112 * A051351 A111925 A030723

Adjacent sequences:  A101303 A101304 A101305 * A101307 A101308 A101309

KEYWORD

nonn,base,easy

AUTHOR

Jorge Coveiro (jorgecoveiro(AT)yahoo.com), Dec 22 2004

EXTENSIONS

Corrected and extended by Robert G. Wilson v (rgwv(AT)rgwv.com), Dec 22 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 22:50 EST 2012. Contains 205684 sequences.