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 A252477 #18 Aug 24 2025 16:58:22 %S A252477 3,1,2,1,3,1,4,2,1,5,1,3,6,3,2,2,7,2,4,8,2,4,3,2,4,10,5,10,5,1,5,3,11, %T A252477 2,12,4,4,6,4,4,13,2,13,6,14,2,2,7,15,7,5,15,3,5,5,5,16,5,8,16,3,2,8, %U A252477 17,8,2,6,3,18,9,6,4,6,6,9,6,4,9,5,4,20,4,20,6,10,7,5,10,21,10,3,5 %N A252477 Integer part of 1/(sqrt(prime(n+1))-sqrt(prime(n))). %C A252477 Andrica's conjecture states that sqrt(prime(n+1))-sqrt(prime(n)) < 1 for all n. Since equality cannot happen, this is equivalent to say that all terms of is sequence are >= 1. %C A252477 Sequence A074976 is based on the same idea (rounding to the nearest integer instead). %C A252477 It is a remarkable coincidence(?) that very often, especially around "peaks", a symmetric pattern "x, y, x" occurs: 2, 7, 2,... 10, 5, 10,... 13, 2, 13,... 20, 4, 20, ..., 11, 5, 11, ... %C A252477 Equal to the integer part of (A000006(n+1)+A000006(n))/(prime(n+1)-prime(n)) for most indices; exceptions are 1, 129, 1667, 2004, 2088, 2334, 3377, 3585, 3695, 3834, 4978, 7057, 7950, 8103, 9525, 9805,... %H A252477 M. F. Hasler, <a href="/A252477/b252477.txt">Table of n, a(n) for n = 1..10000</a> %H A252477 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AndricasConjecture.html">Andrica's conjecture</a> %F A252477 a(n) = A079636(n) - 1. - _Alois P. Heinz_, Aug 23 2025 %e A252477 a(1) = floor(1/(sqrt(3) - sqrt(2))) = floor(1/(1.73-1.41)) = floor(1/0.32) = floor(3.15) = 3. %e A252477 a(2) = floor(1/(sqrt(5) - sqrt(3))) = floor(1/(2.236-1.732)) = floor(1/0.504) = floor(1.98) = 1. %p A252477 a:= n-> ((w, v)-> floor(1/(w-v)))(map(sqrt@ithprime, [n+1, n])[]): %p A252477 seq(a(n), n=1..92); # _Alois P. Heinz_, Aug 23 2025 %t A252477 Floor[1/Subtract @@@ Reverse[Partition[Sqrt[Prime[Range[100]]], 2, 1], 2]] (* _Paolo Xausa_, Aug 24 2025 *) %o A252477 (PARI) a(n)=1\(sqrt(prime(n+1))-sqrt(prime(n))) \\ _M. F. Hasler_, Dec 31 2014 %o A252477 (Haskell) %o A252477 a252477 n = a252477_list !! (n-1) %o A252477 a252477_list = map (floor . recip) $ zipWith (-) (tail rs) rs %o A252477 where rs = map (sqrt . fromIntegral) a000040_list %o A252477 -- _Reinhard Zumkeller_, Jan 04 2015 %Y A252477 Cf. A000040, A074976, A079636. %K A252477 nonn,changed %O A252477 1,1 %A A252477 _M. F. Hasler_, Dec 31 2014