OFFSET
1,1
COMMENTS
Equivalently, k such that k^2 + 1 is composite (cf. A134407) and has a prime factor > k, or: such that k < gpf(k^2 + 1) < k^2, where gpf = A006530 = greatest prime factor.
The sequence starts similar to A134427 (numbers such that k^2 + 1 is composite and squarefree), but for example 21 is in that but not in this sequence, since 21^2 + 1 = 2*13*17.
This sequence could be relevant for searching a number k such that gcd(k^2+1, k!+1) > 1: any such common divisor must be a prime between k and k^2. It is known that there is no small example, but probably there are, maybe around k ~ 10^17, cf. StackExchange link.
LINKS
User "abacaba", Re: Do we have Sum gcd(1+n!, 1+n^2)/n! = e?, math.StackExchange, Nov. 26, 2022
EXAMPLE
1^2 + 1 = 2, 2^2 + 1 = 5 and 4^2 + 1 = 17 are prime and therefore 1, 2 and 4 are not in this sequence.
3^2 + 1 = 10 = 2*5 and 5 > 3, therefore 3 is in this sequence.
5^2 + 1 = 26 = 2*13 and 13 > 5, therefore 5 is in this sequence.
8^2 + 1 = 65 = 5*13 and 13 > 8, therefore 8 is in this sequence.
MATHEMATICA
q[k_]:=AnyTrue[First/@FactorInteger[k^2+1], #>=k&&#<=k^2&]; Select[Range[105], q] (* James C. McMahon, Apr 20 2026 *)
PROG
(PARI) select( {is_A394626(n)=n<(n=factor(n^2+1)[, 1])[#n]&&#n>1}, [1..105]) \\ M. F. Hasler, Apr 09 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Apr 09 2026
STATUS
approved
