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 A249132 #30 Nov 16 2014 12:02:22 %S A249132 1,0,2,0,0,5,13,0,0,17,0,31,73,0,0,23,0,11,0,0,173,0,0,233,463,293,0, %T A249132 0,251,919,0,0,37,0,193,0,443,0,0,599,0,19,0,467,211,0,0,0,0,107,89,0, %U A249132 659,0,241,0,2503,0,337,53,0,3671,0,0 %N A249132 Smallest noncomposite k such that prime(n) is the largest prime factor of k^2+1, or 0 if no such k exists. %C A249132 a(A080148(m)) = 0. - _Joerg Arndt_, Oct 22 2014 %H A249132 Robert Israel, <a href="/A249132/b249132.txt">Table of n, a(n) for n = 1..10000</a> %e A249132 a(1)=1 is in this sequence because 1 is in A008578 and the largest prime factor of 1^2+1 = 2 is prime(1). %p A249132 A249132:= proc(n) local p,i,k,a,b; %p A249132 p:= ithprime(n); %p A249132 if p mod 4 = 3 then return 0 fi; %p A249132 a:= numtheory:-msqrt(-1,p); %p A249132 if a < p/2 then b:= p-a %p A249132 else b:= a; a:= p-a %p A249132 fi; %p A249132 for i from 0 do %p A249132 for k in [a+i*p,b+i*p] do %p A249132 if isprime(k) and p = max(numtheory:-factorset(k^2+1)) then %p A249132 return(k) %p A249132 fi %p A249132 od %p A249132 od %p A249132 end proc: %p A249132 1,seq(A249132(n),n=2..100); # _Robert Israel_, Nov 10 2014 %t A249132 a249132[n_Integer] := Module[{t = Table[0, {n}], k, s, p}, Do[If[Mod[Prime[k], 4] == 3, t[[k]] = -1], {k, n}]; k = 0; While[Times @@ t == 0, k++; s = FactorInteger[k^2 + 1][[-1, 1]]; p = PrimePi[s]; If[p <= n && t[[p]] == 0 && ! CompositeQ[k], t[[p]] = k]]; t /. -1 -> 0]; a249132[120] (* _Michael De Vlieger_, Nov 11 2014, adapted from A223702 *) %Y A249132 Cf. A080148, A185389, A223702, A223705. %K A249132 nonn %O A249132 1,3 %A A249132 _Juri-Stepan Gerasimov_, Oct 22 2014