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 A375464 #22 Oct 16 2024 21:21:46 %S A375464 1,2,3,3,4,5,4,6,6,5,9,8,5,10,10,8,10,8,10,15,13,6,12,17,7,16,15,11, %T A375464 17,15,14,17,14,13,27,22,6,19,22,20,23,17,13,27,21,15,23,24,16,23,30, %U A375464 21,21,27,26,37,17,7,37,29,22,29,32,24,34,34,15,39,34,19,35 %N A375464 a(n) is the number of nonnegative numbers k < n such that the equation (n-k)*x - k = y^2 is solvable. %C A375464 a(n) is the number of positive numbers j <= n such that -n is a quadratic residue mod j. - _Robert Israel_, Oct 16 2024 %H A375464 Robert Israel, <a href="/A375464/b375464.txt">Table of n, a(n) for n = 1..10000</a> %e A375464 a(1) = 1 because (1-0)*x - 0 = y^2 is solvable where x: 0, 1, 4, 9, .. A000290; %e A375464 a(2) = 2 because (2-0)*x - 0 = y^2 is solvable where x: 0, 2, 8, 18, .. A001105, %e A375464 (2-1)*x - 1 = y^2 is solvable where x: 1, 2, 5, 10, .. A002522; %e A375464 a(3) = 3 because (3-0)*x - 0 = y^2 is solvable where x: 0, 3, 12, 27, .. A033428, %e A375464 (3-1)*x - 1 = y^2 is solvable where x: 1, 5, 13, 25, .. A001844, %e A375464 (3-2)*x - 2 = y^2 is solvable where x: 2, 3, 6, 11, .. A059100; %e A375464 a(4) = 3 because (4-0)*x - 0 = y^2 is solvable where x: 0, 1, 4, 9, .. A000290, %e A375464 (4-1)*x - 1 = y^2 is unsolvable, %e A375464 (4-2)*x - 2 = y^2 is solvable where x: 1, 3, 9, 19, .. A058331; %e A375464 (4-3)*x - 3 = y^2 is solvable where x: 2, 3, 6, 11, .. A117950. %p A375464 f:= proc(n) local j; add(numtheory:-quadres(-n, j)+1, j=1..n)/2 end proc: %p A375464 map(f, [$1..100]); # _Robert Israel_, Oct 16 2024 %o A375464 (PARI) is(k, n) = for (i=0, n-1, if (issquare((n-i)*k - i), return(1))); %o A375464 a(n) = sum(k=0, n-1, is(k, n)); \\ _Michel Marcus_, Aug 17 2024 %Y A375464 Cf. A000290, A001105, A002522, A033428, A001844, A059100, A058331, A117950, A375347. %K A375464 nonn %O A375464 1,2 %A A375464 _Juri-Stepan Gerasimov_, Aug 16 2024