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 A152823 #10 Sep 12 2019 02:59:52 %S A152823 1,1,2,1,2,1,5,5,2,1,2,5,10,1,2,1,10,13,2,1,17,5,10,1,2,1,10,5,2,17, %T A152823 26,25,10,13,2,1,10,17,2,1,29,5,37,13,2,29,34,5,2,41,2,5,10,1,34,1,50, %U A152823 5,2,13,2,5,10,17,2,1,10,37,2,29,2,61,65,1,58,53,10,5,2,37,34,25,65,1,2,13 %N A152823 Largest divisor < n of n^2 + 1, a(1) = 1. %C A152823 If a(2k) = 3, then 4k^2 + 1 = 3p with p prime. For odd n > 1, a(n) >= 2, with equality if (n^2+1)/2 is prime. Conversely, A147809(n) = 1 iff n^2 + 1 is a semiprime, which for odd n > 1 implies a(n) = 2. %C A152823 a(1) = 1 by convention, which is compatible with the FORMULA (a(n) = 1 iff n^2 + 1 is prime) and also with a(n) = the floor(d/2)-th divisor of n^2+1, when d is its total number of divisors, cf. PROGRAM. - _M. F. Hasler_, Sep 11 2019 %H A152823 Amiram Eldar, <a href="/A152823/b152823.txt">Table of n, a(n) for n = 1..10000</a> %F A152823 a(n) = 1 iff n^2 + 1 is prime (iff A147809(n)=0), which can only happen for n = 1 or even n. %t A152823 a[1] = 1; a[n_] := Max[Select[Divisors[n^2 + 1], # < n &]]; Array[a, 100] (* _Amiram Eldar_, Sep 12 2019 *) %o A152823 (PARI) A152823(n)={ n=divisors(n^2+1); n[ #n\2] } %K A152823 nonn %O A152823 1,3 %A A152823 _M. F. Hasler_, Dec 15 2008