cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A342371 Partial sums of A051697.

This page as a plain text file.
%I A342371 #48 Mar 31 2024 17:12:55
%S A342371 2,4,6,9,12,17,22,29,36,43,54,65,76,89,102,115,132,149,166,185,204,
%T A342371 223,246,269,292,315,338,367,396,425,454,485,516,547,578,615,652,689,
%U A342371 726,763,804,845,886,929,972,1015,1062,1109,1156,1203,1250,1303,1356,1409
%N A342371 Partial sums of A051697.
%F A342371 a(n) = a(n-1) + A051697(n).
%e A342371 n=1, closest prime is 2, add 2; a(1) = 2 + 2 = 4;
%e A342371 n=2, closest prime is 2, add 2; a(2) = 4 + 2 = 6;
%e A342371 n=3, closest prime is 3, add 3; a(3) = 6 + 3 = 9;
%e A342371 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.
%t A342371 Accumulate@ Table[MinimalBy[Prime[If[n < 2, 1, PrimePi[n]] + {0, 1}], Abs[n - #] &][[1]], {n, 0, 53}] (* _Michael De Vlieger_, Mar 12 2021 *)
%Y A342371 Cf. A051697.
%K A342371 nonn
%O A342371 0,1
%A A342371 _Zeljko Vranic_, Mar 09 2021