%I #10 Dec 25 2014 03:58:28
%S 1,1,2,1,1,1,4,2,1,1,1,1,2,1,1,1,2,3,1,1,3,1,1,1,1,1,1,1,1,2,2,2,1,1,
%T 1,1,1,6,1,1,4,1,3,1,1,2,7,1,1,2,1,1,1,1,2,1,9,1,1,1,1,1,1,1,1,1,1,4,
%U 1,6,1,3,4,1,2,2,1,1,1,1,1,1,4,1,1,1,1
%N Number of times the greatest prime factor of n^2 + 1 is a factor in all numbers <= n.
%C The greatest prime factor is counted with multiplicity (see the example).
%C a(n)=1 iff n^2 + 1 is prime.
%H Michel Lagneau, <a href="/A252890/b252890.txt">Table of n, a(n) for n = 1..10000</a>
%e a(7)=4 because 7^2 + 1 = 50 and 5 is 4 times a factor:
%e 2^2+1 = 5;
%e 3^2+1 = 10 = 2*5;
%e 7^2+1 = 50 = 2*5*5 (two times).
%p with(numtheory): with(padic,ordp):
%p f:= proc(n) local p ,q, n0;
%p q:=factorset(n^2+1);n0:=nops(q);p:= q[n0];
%p add(ordp(k^2+1, p), k=1..n);
%p end proc:
%p seq(f(n), n=1.. 100);
%p # Using code from Robert Israel adapted for this sequence. See A078897.
%Y Cf. A089120, A014442, A078897.
%K nonn
%O 1,3
%A _Michel Lagneau_, Dec 24 2014