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!)
A342371 Partial sums of A051697. 0
2, 4, 6, 9, 12, 17, 22, 29, 36, 43, 54, 65, 76, 89, 102, 115, 132, 149, 166, 185, 204, 223, 246, 269, 292, 315, 338, 367, 396, 425, 454, 485, 516, 547, 578, 615, 652, 689, 726, 763, 804, 845, 886, 929, 972, 1015, 1062, 1109, 1156, 1203, 1250, 1303, 1356, 1409 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = a(n-1) + A051697(n).
EXAMPLE
n=1, closest prime is 2, add 2; a(1) = 2 + 2 = 4;
n=2, closest prime is 2, add 2; a(2) = 4 + 2 = 6;
n=3, closest prime is 3, add 3; a(3) = 6 + 3 = 9;
n=4, closest prime is 3 (taking the smaller of the equal closest primes 3 and 5, as in A051697), add 3 - a(4) = 9 + 3 = 12.
MATHEMATICA
Accumulate@ Table[MinimalBy[Prime[If[n < 2, 1, PrimePi[n]] + {0, 1}], Abs[n - #] &][[1]], {n, 0, 53}] (* Michael De Vlieger, Mar 12 2021 *)
CROSSREFS
Cf. A051697.
Sequence in context: A194450 A080556 A229093 * A064985 A090631 A001365
KEYWORD
nonn
AUTHOR
Zeljko Vranic, Mar 09 2021
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)