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.
%I A265098 #15 Apr 20 2017 15:11:54 %S A265098 1,2,3,4,5,28,32 %N A265098 Integers n such that A138523(n) is 1 or a prime. %C A265098 Inspired by the following triangle for the initial terms: %C A265098 1! = 1. %C A265098 1! + 3! = 7. %C A265098 1! + 3! + 5! = 127. %C A265098 1! + 3! + 5! + 7! = 5167. %C A265098 1! + 3! + 5! + 7! + 9! = 368047. %C A265098 This sequence is finite since 107 divides A138523(n) for all n >= 53. - _Amiram Eldar_, Apr 20 2017 %e A265098 a(4) = 4 because 1! + 3! + 5! + 7! = 5167 is prime. %t A265098 Select[Range@ 1000, Or[# == 1, PrimeQ@ #] &@ Sum[(2 k - 1)!, {k, #}] &] (* _Michael De Vlieger_, Dec 01 2015 *) %o A265098 (PARI) lista(nn) = { print1(1, ", "); s = 0; for(k=1, nn, s += (2*k-1)!; if(ispseudoprime(s), print1(k, ", ")); ); } %Y A265098 Cf. A008578, A138523. %K A265098 nonn,fini,full %O A265098 1,2 %A A265098 _Altug Alkan_, Dec 01 2015