cp's OEIS Frontend

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.

A065876 a(n) is the smallest m > n such that n^2 + 1 divides m^2 + 1.

This page as a plain text file.
%I A065876 #26 Dec 11 2024 11:34:14
%S A065876 1,3,3,7,13,21,31,43,18,73,91,111,17,47,183,211,241,133,57,343,381,47,
%T A065876 172,83,553,601,651,173,342,813,242,265,132,403,411,1191,1261,237,327,
%U A065876 1483,1561,1641,748,857,850,1981,684,463,413,2353,255,2551,593,1177,2863,123,3081,307,1288,3423
%N A065876 a(n) is the smallest m > n such that n^2 + 1 divides m^2 + 1.
%C A065876 a(n) exists because n^2 + 1 divides (n^2 - n + 1)^2 + 1. The set of n such a(n) = n^2 - n + 1 is S = (2, 3, 4, 5, 6, 7, 9, 11, 14, 15, ...).
%C A065876 a(n) = n^2 - n + 1 whenever n^2 + 1 is prime or twice a prime. Up to n=1000, the only other n for which a(n) = n^2 - n + 1 are 7, 41 and 239. Is it a coincidence that these are NSW primes (A088165)? - _Franklin T. Adams-Watters_, Oct 17 2006
%C A065876 It appears that the density of even numbers in this sequence approaches a limit near 1/4. It appears that the density of even values for indices where a(n) != n^2 - n + 1 is approaching a number near 1/4 and based on the previous comment the density of n for which a(n) = n^2 - n + 1 is almost certainly 0. - _Franklin T. Adams-Watters_, Oct 17 2006
%H A065876 Franklin T. Adams-Watters, <a href="/A065876/b065876.txt">Table of n, a(n) for n = 0..1000</a>
%t A065876 Do[k = 1; While[m = (k^2 + 1)/(n^2 + 1); m < 2 || !IntegerQ[m], k++ ]; Print[k], {n, 1, 40 } ]
%o A065876 (PARI) a(n) = { my(m=n+1); while ((m^2 + 1)%(n^2 + 1) != 0, m++); m } \\ _Harry J. Smith_, Nov 03 2009
%Y A065876 Cf. A002731, A005574, A071557, A088165.
%K A065876 nonn
%O A065876 0,2
%A A065876 _Benoit Cloitre_, Dec 07 2001
%E A065876 More terms from _Robert G. Wilson v_, Dec 11 2001
%E A065876 Further terms from _Franklin T. Adams-Watters_, Oct 17 2006