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.

A040976 a(n) = prime(n) - 2.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 15, 17, 21, 27, 29, 35, 39, 41, 45, 51, 57, 59, 65, 69, 71, 77, 81, 87, 95, 99, 101, 105, 107, 111, 125, 129, 135, 137, 147, 149, 155, 161, 165, 171, 177, 179, 189, 191, 195, 197, 209, 221, 225, 227, 231, 237, 239, 249, 255, 261
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k! reduced mod (k+2) is 1. - Benoit Cloitre, Mar 11 2002
The first a(n) numbers starting from 2 are divisible by primes up to prime(n-1). - Lekraj Beedassy, Jun 21 2006
The terms in this sequence are the cumulative sums of distances from one prime to another. For example for the distance from the first to 26th prime, 2 to 101, the cumulative sum of distances is 99, always the last prime, here 101, minus 2. - Enoch Haga, Apr 24 2006
The primes in this sequence are the initial primes of twin prime pairs. - Sebastiao Antonio da Silva, Dec 21 2008
Note that many, but not all, of these numbers satisfy x such that x^(x+1) = 1 mod (x+2). The first exception is 339. - Thomas Ordowski, Nov 27 2013
If this sequence had an infinite number of primes, the twin prime conjecture would follow. Sequence holds all primes in A001359. - John W. Nicholson, Apr 14 2014
From Bernard Schott, Feb 19 2023: (Start)
Equivalently, except for a(1)=0, all terms are odd integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has only two elements.
For each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 2, so this unique AP is (2, 2+d) = (2, prime(m)) with m > 1; so, first examples are (2,3), (2,5), (2,7), (2,11), ... next elements should be respectively: 4, 8, 12, 20, ... that are all composite numbers.
Similar sequence with even common differences d is A360735.
This subsequence of A359408 corresponds to the first case: '2 is prime'; second case corresponding to the even common differences d is A360735. (End)

Examples

			a(13) = 39, because A000040(13) = 41.
		

Crossrefs

Equals A359408 \ A360735.
First column of A086800, and of A379011, last diagonal of A090321, and of A162621.
See also irregular triangles A103728, A319148, A369497.

Programs

Formula

a(n) = A000040(n) - 2 = Sum_{i=1..n-1} A001223(i).
For n > 2: A092953(a(n)) = 1. - Reinhard Zumkeller, Nov 10 2012
If m is a term then A123556(m) = 2, but the converse is false: a counterexample is A123556(16) = 2 and 16 is not a term. - Bernard Schott, Feb 19 2023
a(n) = Sum_{k = 2..floor(2n*log(n)+2)} (1-floor(A000720(k)/n)). [Ruiz and Sondow]. - Elias Alejandro Angulo Klein, Apr 09 2024