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 A216784 #24 Jul 24 2025 18:11:08 %S A216784 1,1,2,1,1,1,2,1,1,1,1,1,3,1,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,1,2,1,2,0, %T A216784 1,1,2,2,1,1,1,1,3,0,1,0,3,1,1,0,1,1,2,1,2,1,2,1,1,0,1,1,2,1,1,1,2,2, %U A216784 1,0,1,2,2,1,1,0,2,1,1,1,2,1,2,1,1,0,2 %N A216784 a(n) is the number of distinct prime divisors of n^2 + 1 of the form m^2 + 1. %C A216784 a(m) = 0 for m = A217276(n). %H A216784 Amiram Eldar, <a href="/A216784/b216784.txt">Table of n, a(n) for n = 1..10000</a> %e A216784 a(13) = 3 because 13^2+1 = 170 = 2*5*17 with 3 divisors of the form m^2+1 such that 2 = 1^2+1, 5=2^2+1 and 17 = 4^2+1. %e A216784 a(34) = 0 because 34^2+1 = 1157 = 13*89 and the prime divisors 13, 89 are not of the form m^2+1. %p A216784 with(numtheory):for n from 1 to 100 do:x:=n^2+1:y:=factorset(x):n1:=nops(y):i:=0:for k from 1 to n1 do:z:=sqrt(y[k]-1):if z=floor(z) then i:=i+1:else fi:od: printf(`%d, `,i):od: %p A216784 # second Maple program: %p A216784 a:= n-> nops(select(x-> issqr(x-1), ifactors(n^2+1)[2][..., 1])): %p A216784 seq(a(n), n=1..87); # _Alois P. Heinz_, Jul 24 2025 %t A216784 a[n_] := Length @ Select[FactorInteger[n^2 + 1][[;;,1]], IntegerQ @ Sqrt[# - 1] &]; Array[a, 100] (* _Amiram Eldar_, Sep 11 2019 *) %Y A216784 Cf. A217276, A181436, A180252. %K A216784 nonn %O A216784 1,3 %A A216784 _Michel Lagneau_, Oct 15 2012