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 A066451 #13 Aug 22 2025 13:32:24 %S A066451 1,1,2,1,2,1,3,1,2,1,2,2,3,1,2,1,3,1,2,1,3,2,3,1,2,1,3,1,2,1,3,2,3,1, %T A066451 2,1,3,2,2,1,2,2,4,1,2,1,3,1,2,1,2,2,3,1,3,1,5,1,2,1,2,2,3,1,2,1,3,1, %U A066451 2,1,2,3,4,1,2,1,3,1,2,2,2,2,4,1,2,1,3,1,3,1,3,2,3,1,2,1,3,1,2,1,2,2,3,1,2 %N A066451 a(n) is the number of integers k > 0 such that (n*k+1)/(k^2+1) is an integer. %e A066451 a(57)=5 because (57*k+1)/(k^2+1) is an integer for k = 1,2,5,7,57. %t A066451 a[n_]:=Sum[Boole[Denominator[(n*k+1)/(k^2+1)]==1],{k,n}]; Array[a,105] (* _Stefano Spezia_, Aug 22 2025 *) %o A066451 (PARI) a(n) = sum(k=1, n, denominator((n*k+1)/(k^2+1)) == 1); \\ _Michel Marcus_, Feb 17 2021 %K A066451 nonn %O A066451 1,3 %A A066451 _Benoit Cloitre_, Dec 29 2001