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.
%I A095116 #38 Jun 27 2025 18:54:04 %S A095116 2,4,7,10,15,18,23,26,31,38,41,48,53,56,61,68,75,78,85,90,93,100,105, %T A095116 112,121,126,129,134,137,142,157,162,169,172,183,186,193,200,205,212, %U A095116 219,222,233,236,241,244,257,270,275,278,283,290,293,304,311,318,325 %N A095116 a(n) = prime(n) + n - 1. %C A095116 Positions of second occurrences of n in A165634: A165634(a(n)) = n. [_Reinhard Zumkeller_, Sep 23 2009] %C A095116 a(n) = b(n)-th highest positive integer not equal to any a(k), 1 <= k <= n-1, where b(n) = primes = A000040(n). a(1) = 2, a(n) = a(n-1) + A000040(n) - A000040(n-1) + 1 for n >= 2. a(1) = 2, a(n) = a(n-1) + A001223(n-1) + 1 for n >= 2. a(n) = A014688(n) - 1. [_Jaroslav Krizek_, Oct 28 2009] %C A095116 Comment from _N. J. A. Sloane_, Mar 28 2024 (Start): %C A095116 On March 23 2024, _Davide Rotondo_ sent me an email with the following conjecture. (I've simplified it a bit.) %C A095116 For a positive integer n, define a sequence b by b(0) = n; b(i) = n - pi(b(i-1)) for i >= 1, where pi(x) = number of primes <= x. %C A095116 The conjecture is that after some initial terms, b becomes periodic with period length 1 or 2, and the n for which the period is 2 are 3 together with the present sequence, that is, 2, 3, 4, 7, 10, 15, 18, 23, 26, 31, 38, 41, 48, ... (End) %C A095116 Proof from _Robert Israel_, Mar 26 2024 (Start): %C A095116 This is simply a consequence of the fact that if x < y, 0 <= pi(y) - pi(x) <= y - x and the inequality on the right is strict if y-x > 1 except for the case of 1 and 3. %C A095116 Thus we start with b(0) - b(1) = pi(n). While |b(i) - b(i+1)| > 2 we get |b(i+1) - b(i+2)| = |pi(b(i+1)) - pi(b(i+2))| < |b(i) - b(i+1)|. %C A095116 Eventually we must either reach |b(j+1) - b(j)| = 0 or |b(j+1) - b(j)| = 1. %C A095116 If we reach 0, i.e. b(j+1) = b(j), then clearly b(k) = b(j) for all k > j. %C A095116 If b(j+1) = b(j) + 1 = n - pi(b(j)), then b(j+2) = n - pi(b(j)+1) = b(j+1) or b(j+1)-1. %C A095116 If b(j+1) = b(j) - 1, then b(j+2) = n - pi(b(j)-1) = b(j+1) or b(j+1)+1. %C A095116 Thus from this point on we either get a 2-cycle or a 1-cycle. (End) %H A095116 Reinhard Zumkeller, <a href="/A095116/b095116.txt">Table of n, a(n) for n = 1..10000</a> %F A095116 a(n) = A014690(n-1), n > 1. [_R. J. Mathar_, Sep 05 2008] %p A095116 with (numtheory):seq(n+ithprime(n+1),n=0..56); # _Zerinvary Lajos_, Aug 24 2008 %t A095116 Table[n + Prime[n] - 1, {n, 100}] (* _Vincenzo Librandi_, Aug 15 2017 *) %o A095116 (Haskell) %o A095116 a095116 n = a000040 n + toInteger n - 1 %o A095116 -- _Reinhard Zumkeller_, Apr 17 2012 %o A095116 (Magma) [n+NthPrime(n)-1: n in [1..60]]; // _Vincenzo Librandi_, Aug 15 2017 %Y A095116 Complement of A095117. %Y A095116 Essentially the same sequence as A014690. %K A095116 nonn %O A095116 1,1 %A A095116 _Dean Hickerson_, following a suggestion of _Leroy Quet_, May 28 2004