login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A265098
Integers n such that A138523(n) is 1 or a prime.
0
1, 2, 3, 4, 5, 28, 32
OFFSET
1,2
COMMENTS
Inspired by the following triangle for the initial terms:
1! = 1.
1! + 3! = 7.
1! + 3! + 5! = 127.
1! + 3! + 5! + 7! = 5167.
1! + 3! + 5! + 7! + 9! = 368047.
This sequence is finite since 107 divides A138523(n) for all n >= 53. - Amiram Eldar, Apr 20 2017
EXAMPLE
a(4) = 4 because 1! + 3! + 5! + 7! = 5167 is prime.
MATHEMATICA
Select[Range@ 1000, Or[# == 1, PrimeQ@ #] &@ Sum[(2 k - 1)!, {k, #}] &] (* Michael De Vlieger, Dec 01 2015 *)
PROG
(PARI) lista(nn) = { print1(1, ", "); s = 0; for(k=1, nn, s += (2*k-1)!; if(ispseudoprime(s), print1(k, ", ")); ); }
CROSSREFS
Sequence in context: A084853 A115337 A114333 * A076209 A037399 A220891
KEYWORD
nonn,fini,full
AUTHOR
Altug Alkan, Dec 01 2015
STATUS
approved