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.

A082749 Difference between the sum of next prime(n) natural numbers and the sum of next n primes.

Original entry on oeis.org

1, 4, 9, 10, 54, 71, 191, 236, 446, 1025, 1310, 2259, 3245, 3820, 5048, 7321, 10060, 11473, 15328, 18358, 20381, 25672, 30222, 36561, 46367, 53031, 58108, 65444, 70971, 78391, 104184, 116542, 133095, 142728, 169931, 181324, 203429, 226622
Offset: 1

Views

Author

Amarnath Murthy, Apr 17 2003

Keywords

Comments

Group the natural numbers with prime(n) elements in each group. (1,2),(3,4,5),(6,7,8,9,10),(11,12,13,14,15,16,17),... The sum corresponding the groups is 3,12,40,98,... Group the prime numbers such that the n-th group contains n primes. (2),(3,5),(7,11,13),(17,19,23,29),... The sum corresponding the groups is 2,8,31,88,... The required difference is 1,4,9,10,...
The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004

Programs

  • Mathematica
    Module[{nn=80,trms=40,c,nat,pr},c=(nn(nn+1))/2;nat=Total/@TakeList[Range[c],Prime[Range[trms]]];pr=Total/@TakeList[Prime[Range[c]], Range[trms]]; Differences/@ Thread[{pr,nat}]]//Flatten (* Harvey P. Dale, Apr 13 2025 *)

Formula

a(n) = ((A061802(n-1) + 1)*A000040(n))/2 - A007468(n). - Gionata Neri, May 17 2015

Extensions

More terms from Ray Chandler, May 13 2003