OFFSET
1,1
COMMENTS
a(n) = 0 or 1. Proof:
If n^2+1 is composite, it is always possible to write n^2+1 = x*y where x and y are two integers. Suppose a(n)=2 with x>n and y>n (if x<n or y<n, then x or y is divisor of (n-x)^2+1 or (n-y)^2+1). So, x*y > n^2+1, a contradiction.
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
with(numtheory): nn:=600:lst:={0}:for n from 1 to 100 do:x:=factorset(n^2+1):lst1:=lst intersect x:n0:=nops(x minus lst1): printf(`%d, `, n0):lst:=lst union x:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 20 2014
STATUS
approved