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.

A157829 Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime.

This page as a plain text file.
%I A157829 #17 Jan 05 2025 09:41:33
%S A157829 2,5,7,11,13,16,22,29,43,56,67,83,85,107,317,325,517,1660,2010,2368,
%T A157829 4483,4697,14524
%N A157829 Numbers k such that k! - (k-1)! + (k-2)! + 1 is prime.
%e A157829 a(11) = 11! - 10! + 9! + 1 = 36650881 (prime).
%e A157829 a(16) = 16! - 15! + 14! + 1 = 19702293811201 (prime).
%p A157829 a := proc (n) if isprime(factorial(n-2)*((n-1)^2+1)+1) = true then n else end if end proc: seq(a(n), n = 2 .. 700); # _Emeric Deutsch_, Mar 18 2009
%o A157829 (PARI) is(n)=ispseudoprime(1+(n^2-2*n+2)*(n-2)!) \\ _Charles R Greathouse IV_, Dec 27 2013
%o A157829 (PFGW) ABC2 $a!-($a-1)!+($a-2)!+1
%o A157829 a: from 2 to 10000
%o A157829 _Charles R Greathouse IV_, Dec 27 2013
%K A157829 nonn,more
%O A157829 1,1
%A A157829 _Kyle D. Balliet_, Mar 07 2009
%E A157829 More terms from _Emeric Deutsch_, Mar 18 2009
%E A157829 a(18)-a(22) from _Charles R Greathouse IV_, Dec 27 2013
%E A157829 a(23) from _Michael S. Branicky_, Jan 04 2025