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!)
A344324 Let b be the lexicographically earliest weakly increasing sequence of squares such that Sum_{k = 1..m} prime(k) <= Sum_{k = 1..m} b(k) for any m > 0 (where prime(k) denotes the k-th prime number); a(n) = Sum_{k = 1..n} (b(k) - prime(k)). 1

%I #14 May 17 2021 01:53:02

%S 2,3,2,4,2,5,4,1,3,10,15,14,9,2,4,0,5,8,5,15,23,25,23,15,18,17,14,7,

%T 19,27,21,11,18,23,18,11,23,29,31,27,17,5,10,13,12,9,23,25,23,19,11,

%U 28,43,48,47,40,27,12,24,32,38,34,16,29,40,47,40,27,4,16

%N Let b be the lexicographically earliest weakly increasing sequence of squares such that Sum_{k = 1..m} prime(k) <= Sum_{k = 1..m} b(k) for any m > 0 (where prime(k) denotes the k-th prime number); a(n) = Sum_{k = 1..n} (b(k) - prime(k)).

%C This sequence is a variant of A338699; here we use squares, there powers of 2.

%H Rémy Sigrist, <a href="/A344324/b344324.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A344324/a344324.png">Density plot of the first 1000000 terms</a>

%e The first terms, alongside the prime numbers (p(n)) and their partial sums (pp(n)), b(n) and their partial sums (bb(n)), are:

%e n a(n) p(n) pp(n) b(n) bb(n)

%e -- ---- ---- ----- ---- -----

%e 1 2 2 2 4 4

%e 2 3 3 5 4 8

%e 3 2 5 10 4 12

%e 4 4 7 17 9 21

%e 5 2 11 28 9 30

%e 6 5 13 41 16 46

%e 7 4 17 58 16 62

%e 8 1 19 77 16 78

%e 9 3 23 100 25 103

%e 10 10 29 129 36 139

%e 11 15 31 160 36 175

%e 12 14 37 197 36 211

%e 13 9 41 238 36 247

%e 14 2 43 281 36 283

%e 15 4 47 328 49 332

%o (PARI) pp=0; bb=0; b=0; forprime (p=2, 349, pp+=p; while (bb+b^2<pp, b++); bb+=b^2; print1 (bb-pp", "))

%Y Cf. A000290, A007504, A338699.

%K nonn

%O 1,1

%A _Rémy Sigrist_, May 15 2021

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 July 31 20:34 EDT 2024. Contains 374808 sequences. (Running on oeis4.)