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.

A269485 Least k > 0 such that n! + k^2 is prime.

This page as a plain text file.
%I A269485 #36 Mar 02 2016 10:17:54
%S A269485 1,1,1,1,7,11,7,13,17,31,13,1,47,17,19,19,23,73,43,29,47,31,43,29,31,
%T A269485 37,167,1,29,43,79,229,89,71,137,37,53,1,79,131,137,1,71,83,89,89,53,
%U A269485 97,53,101,59,173,79,71,353,191,103,523,229,191,103,401,67,257
%N A269485 Least k > 0 such that n! + k^2 is prime.
%C A269485 a(n) = A033932(n) = 1 for n in A002981.
%H A269485 Jean-Marc Rebert, <a href="/A269485/b269485.txt">Table of n, a(n) for n = 0..500</a>
%e A269485 a(4) = 7, because 4! + 7^2 = 73 is prime and for 0 < i < 7, 4! + i^2 is not prime.
%t A269485 Table[SelectFirst[Range@ 10000, PrimeQ[n! + #^2] &], {n, 120}]
%t A269485 (* Version 10, or *)
%t A269485 Table[k = 1; While[! PrimeQ[n! + k^2], k++]; k, {n, 120}] (* _Michael De Vlieger_, Feb 28 2016 *)
%o A269485 (PARI) a(n) = {my(k=1); while (!isprime(n! + k^2), k++); k;} \\ _Michel Marcus_, Feb 29 2016
%Y A269485 Cf. A002981, A033932, A038202.
%K A269485 nonn
%O A269485 0,5
%A A269485 _Jean-Marc Rebert_, Feb 28 2016