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.

A265098 Integers n such that A138523(n) is 1 or a prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 28, 32
Offset: 1

Views

Author

Altug Alkan, Dec 01 2015

Keywords

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

Examples

			a(4) = 4 because 1! + 3! + 5! + 7! = 5167 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 1000, Or[# == 1, PrimeQ@ #] &@ Sum[(2 k - 1)!, {k, #}] &] (* Michael De Vlieger, Dec 01 2015 *)
  • PARI
    lista(nn) = { print1(1, ", "); s = 0; for(k=1, nn, s += (2*k-1)!; if(ispseudoprime(s), print1(k, ", ")); ); }