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 A242012 #21 Sep 10 2017 04:03:20 %S A242012 1,1,2,1,1,1,3,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 A242012 1,1,1,4,1,1,3,1,3,1,1,2,5,1,1,2,1,1,1,1,2,1,4,1,1,1,1,1,1,1,1,1,1,4, %U A242012 1,4,1,3,3,1,2,2,1,1,1,1,1,1,3,1,1,1,1 %N A242012 a(n) is the number of positive integers k <= n for which gpf(k^2 + 1) = gpf(n^2 + 1), where gpf is the greatest prime divisor. %C A242012 a(n) = 1 if n is a term in A005574 (numbers n such that n^2 + 1 is prime). %C A242012 a(n) = 1 if gpf(k^2 + 1) <> gpf(n^2 + 1) for every positive integer k < n. %H A242012 Michel Lagneau, <a href="/A242012/b242012.txt">Table of n, a(n) for n = 1..10000</a> %e A242012 a(3) = 2 because the greatest prime divisor of 3^2 + 1 is 5 and n=3 is the 2nd positive value of n at which gpf(n^2 + 1) = 5; the 1st is n=2: gpf(2^2 + 1) = 5. %e A242012 a(313) = 7 because the greatest prime divisor of 313^2 + 1 is 101, and n=313 is the 7th positive value of n at which this occurs: %e A242012 10^2 + 1 = 101; %e A242012 91^2 + 1 = 2 * 41 * 101; %e A242012 111^2 + 1 = 2 * 61 * 101; %e A242012 192^2 + 1 = 5 * 73 * 101; %e A242012 212^2 + 1 = 5 * 89 * 101; %e A242012 293^2 + 1 = 2 * 5^2 * 17 * 101; %e A242012 313^2 + 1 = 2 * 5 * 97 * 101. %p A242012 with(numtheory):nn:=200:T:=array(1..nn):k:=0: %p A242012 for m from 1 to nn do: %p A242012 x:=factorset(m^2+1):n1:=nops(x):p:=x[n1]:k:=k+1:T[k]:=p: %p A242012 od: %p A242012 for n from 1 to 150 do: %p A242012 q:=T[n]:ii:=0: %p A242012 for i from 1 to n do: %p A242012 if T[i]=q then ii:=ii+1: %p A242012 else %p A242012 fi: %p A242012 od: %p A242012 printf(`%d, `,ii): %p A242012 od: %p A242012 # Simpler version: %p A242012 N:= 1000: # to get a(n) for n <= N %p A242012 T:= Array(1..N): %p A242012 for n from 1 to N do %p A242012 T[n]:= max(numtheory:-factorset(n^2+1)); %p A242012 A[n]:= numboccur(T,T[n]); %p A242012 od: %p A242012 seq(A[n],n=1..N); # _Robert Israel_, Aug 12 2014 %o A242012 (PARI) a(n) = my(gn = vecmax(factor(n^2+1)[,1])); sum(k=1, n, vecmax(factor(k^2+1)[,1]) == gn); \\ _Michel Marcus_, Sep 10 2017 %Y A242012 Cf. A002496, A005574, A014442. %K A242012 nonn %O A242012 1,3 %A A242012 _Michel Lagneau_, Aug 11 2014 %E A242012 Edited by _Jon E. Schoenfield_, Sep 10 2017