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 A219695 #107 Mar 20 2025 02:12:18 %S A219695 0,1,2,3,0,5,6,1,8,9,2,11,0,3,14,15,4,1,18,5,20,21,2,23,0,7,26,3,8,29, %T A219695 30,1,4,33,10,35,36,5,2,39,0,41,6,13,44,3,14,7,48,1,50,51,4,53,54,17, %U A219695 56,9,2,5,0,19,10,63,20,65,6,3,68,69,22,1,12,7,74,75,4,13,78,25,8,81,2,83,0,5,86,9,28,89 %N A219695 For odd numbers 2n - 1, half the difference between the largest divisor not exceeding the square root, and the least divisor not less than the square root. %C A219695 We consider 2n-1 which has only odd divisors, so any difference among them is always even. %C A219695 a(n) = 0 if and only if 2n - 1 is a square. %C A219695 From _Charles Kusniec_, Oct 31 2024: (Start) %C A219695 a(n) = 1 iff 2n is a square. %C A219695 a(n) = 2 iff 2n-1 = (2k-1)^2 - 4. %C A219695 a(n) = 3 iff 2n-1 = (2k)^2 - 9. %C A219695 Since 2n-1 is odd, 2n-1 = d*D can be written 2n-1 = (x-y)*(x+y) = x^2 - y^2 with integers x and y, from which a(n) is the smallest possible y, which also means smallest possible x and that being x = A377499(n). %C A219695 Record values occur when 2n-1 is an odd prime (n in A006254), and then a(n) = n-1 (and A377499(n) = n). (End) %C A219695 From _Rémi Guillaume_, Mar 12 2025: (Start) %C A219695 a(n) is half the difference between the "median" divisors of 2n-1. %C A219695 a(n) and A377499(n) have opposite parities. %C A219695 a(n) and n have opposite parities. (End) %H A219695 Seiichi Manyama, <a href="/A219695/b219695.txt">Table of n, a(n) for n = 1..10000</a> %F A219695 a(n) = (A056737(2n-1))/2 = (A033677(2n-1) - A033676(2n-1))/2. %F A219695 a(n) = sqrt(A377499(n)^2 - (2n-1)). - _Charles Kusniec_, Oct 31 2024 %e A219695 For n = 2, consider divisors of 2n - 1 = 3 which are {1, 3}. The least one greater than or equal to sqrt(3) is 3, the largest one less than or equal to sqrt(3) is 1; whence a(2) = (3 - 1)/2 = 1. %e A219695 For n = 14, consider divisors of 2n - 1 = 27 which are {1, 3, 9, 27}. The least one greater than or equal to sqrt(27) is 9, the largest one less than or equal to sqrt(27) is 3; whence a(14) = (9 - 3)/2 = 3. %e A219695 For n = 1, 5, 13, 25, ..., the number 2n - 1 equals the square 1, 9, 25, 49, ...; so the two beforementioned "median" divisors coincide with the square root, and a(n) = 0/2 = 0. %t A219695 Table[(Divisors[n][[(Length[Divisors[n]] - Boole[IntegerQ[Sqrt[n]]])/2 + 1]] - Divisors[n][[(Length[Divisors[n]] + Boole[IntegerQ[Sqrt[n]]])/2]])/2, {n, 1, 199, 2}] (* _Alonso del Arte_, Nov 25 2012, corrected March 21 2024, with help from _Giorgos Kalogeropoulos_ *) %t A219695 A219695[n_] := (d = Divisors[2n - 1]; l = Floor[Length@d/2 + 1]; (d[[l]] - d[[-l]])/2); Array[A219695, 100] (* _Giorgos Kalogeropoulos_, Mar 15 2024 *) %o A219695 (PARI) %o A219695 A056737(n)={n=divisors(n); n[(2+#n)\2]-n[(1+#n)\2]} %o A219695 A219695(n)=A056737(2*n-1)/2 \\ _M. F. Hasler_, Nov 25 2012 %Y A219695 Cf. A033676, A033677, A056737, A001844, A016754, A377499. %Y A219695 Cf. A006254 (indices of record highs). %K A219695 nonn %O A219695 1,3 %A A219695 _M. F. Hasler_, Nov 25 2012