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.

A162153 Differences between the sum of consecutive composites and the prime that precedes them.

Original entry on oeis.org

1, 1, 20, 1, 32, 1, 44, 107, 1, 139, 80, 1, 92, 203, 227, 1, 259, 140, 1, 307, 164, 347, 562, 200, 1, 212, 1, 224, 1447, 260, 539, 1, 1157, 1, 619, 643, 332, 683, 707, 1, 1493, 1, 392, 1, 2056, 2176, 452, 1, 464, 947, 1, 1973, 1019, 1043, 1067, 1, 1099, 560, 1, 2309
Offset: 1

Views

Author

Claudio Meller, Jun 26 2009

Keywords

Examples

			a(1) = 4-3 = 1;
a(2) = 6-5 = 1;
a(3) = (8+9+10)-7 = 20;
a(4) = 12-11 = 1;
a(5) = (14+15+16)-13 = 32;
a(6) = 18-17 = 1;
a(7) = (20+21+22)-19 = 44;
a(8) = (24+25+26+27+28)-23 = 107; etc.
		

Crossrefs

Cf. A000040, A054265, A155752 (n for which a(n)=1).

Programs

  • Maple
    Primes:= select(isprime,[2,seq(i,i=3..1000,2)]):
    seq((Primes[i+1]^2-Primes[i+1]-Primes[i]^2-3*Primes[i])/2, i=2..nops(Primes)-1); # Robert Israel, Jul 18 2018

Formula

a(n) = A054265(n+1) - A000040(n+1). - R. J. Mathar, Jun 27 2009
a(n) = (prime(n+2)^2 - prime(n+1)^2 - prime(n+2) - 3*prime(n+1))/2. - Robert Israel, Jul 19 2018

Extensions

Edited and corrected by Robert Israel, Jul 18 2018