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 A062234 #60 Nov 03 2024 03:58:46 %S A062234 1,1,3,3,9,9,15,15,17,27,25,33,39,39,41,47,57,55,63,69,67,75,77,81,93, %T A062234 99,99,105,105,99,123,125,135,129,147,145,151,159,161,167,177,171,189, %U A062234 189,195,187,199,219,225,225,227,237,231,245,251,257,267,265,273,279 %N A062234 From Bertrand's postulate: a(n) = 2*prime(n) - prime(n+1). %C A062234 The theorem that a(n) > 0 for all n is known as "Bertrand's Postulate", and was proved by Tchebycheff in 1852. %C A062234 The analog for Ramanujan primes is Paksoy's theorem that 2*R(n) - R(n+1) > 0 for n > 1. See A233822. - _Jonathan Sondow_, Dec 16 2013 %D A062234 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939. %H A062234 Antti Karttunen, <a href="/A062234/b062234.txt">Table of n, a(n) for n = 1..10001</a> (first 1000 terms from Harry J. Smith) %F A062234 a(n) = A000040(n) - A001223(n). - _Zak Seidov_, Sep 07 2012 %F A062234 a(n) = 2*A000040(n) - A000040(n+1). - _Zak Seidov_, May 12 2020 %F A062234 a(n) = A098764(n) - A000040(n). - _Anthony S. Wright_, Feb 19 2024 %p A062234 a:= n-> (p-> 2*p(n)-p(n+1))(ithprime): %p A062234 seq(a(n), n=1..60); # _Alois P. Heinz_, Feb 09 2022 %t A062234 Table[2*Prime[n]-Prime[n+1],{n,60}] (* _James C. McMahon_, Apr 27 2024 *) %t A062234 2#[[1]]-#[[2]]&/@Partition[Prime[Range[70]],2,1] (* _Harvey P. Dale_, Jul 29 2024 *) %t A062234 ListConvolve[{-1, 2}, Prime[Range[100]]] (* _Paolo Xausa_, Nov 02 2024 *) %o A062234 (PARI) a(n) = 2*prime(n) - prime(n + 1); \\ _Harry J. Smith_, Aug 03 2009 %o A062234 (Haskell) %o A062234 a062234 n = a062234_list !! (n-1) %o A062234 a062234_list = zipWith (-) (map (* 2) a000040_list) (tail a000040_list) %o A062234 -- _Reinhard Zumkeller_, May 31 2015 %Y A062234 Cf. A000040, A001223, A215808 (prime terms), A233822. %Y A062234 Cf. A098764, A100484, A258383 (run lengths), A258432, A258469, A257762, A258449, A257892, A257951. %Y A062234 When negated, forms the left edge of irregular triangle A252750, and also the leftmost column of square array A372562. %K A062234 easy,nonn %O A062234 1,3 %A A062234 _Reinhard Zumkeller_, Jun 29 2001 %E A062234 Edited by _N. J. A. Sloane_, Feb 24 2023