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!)
A189892 a(n) = n*prime(n) - sum_{i=1..n-1} prime(i). 2
2, 4, 10, 18, 38, 50, 78, 94, 130, 190, 212, 284, 336, 364, 424, 520, 622, 658, 772, 852, 894, 1026, 1118, 1262, 1462, 1566, 1620, 1732, 1790, 1910, 2344, 2472, 2670, 2738, 3088, 3160, 3382, 3610, 3766, 4006, 4252, 4336, 4766, 4854, 5034, 5126, 5690 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A033286(n+1) - A007504(n) for n>1.
EXAMPLE
a(4) = 4*prime(4) - (prime(3) + prime(2) + prime(1)) = 4*7 - (5 + 3 + 2) = 18.
MATHEMATICA
nn=50; Join[{2}, With[{prs=Accumulate[Prime[Range[nn]]]}, Table[n*Prime[n]-prs[[n-1]], {n, 2, nn}]]] (* Harvey P. Dale, Nov 21 2014 *)
PROG
(Magma) [2] cat [n*NthPrime(n)-(&+[NthPrime(k): k in [1..n-1]]): n in [2..47]];
(PARI) v=vector(10000); s=n=i=0; forprime(p=2, 1e9, v[i++]=n++*p-s; if(i==#v, return, s+=p)) \\ Charles R Greathouse IV, May 01 2011
CROSSREFS
Sequence in context: A320968 A279359 A242261 * A240877 A218008 A303346
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Apr 30 2011
STATUS
approved

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 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)