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.

A339928 Numbers k such that the removal of all terminating even digits from k! leaves a prime.

This page as a plain text file.
%I A339928 #25 Jul 06 2024 01:31:05
%S A339928 6,7,9,10,43,138,1068
%N A339928 Numbers k such that the removal of all terminating even digits from k! leaves a prime.
%C A339928 a(8) > 1500.
%C A339928 If only the terminating zeros are removed, 2 is the only number whose factorial becomes prime.
%C A339928 If one also removes 5s at the end, 7 is no longer in the sequence and no numbers below 1500 are added to the sequence.
%C A339928 a(8) > 20000. - _Michael S. Branicky_, Jul 05 2024
%e A339928 43! = 60415263063373835637355132068513997507264512000000000. After removing all even digits at the end, we are left with 6041526306337383563735513206851399750726451, which is prime. So 43 is a term of this sequence.
%e A339928 27! = 10888869450418352160768000000. After removing all even digits at the end, we are left with 108888694504183521607, which is not prime. So 27 is not a term of this sequence.
%o A339928 (PARI) for(n=1,1500,k=n!;while(!(k%2),k\=10;if(k==0,break));if(isprime(k),print1(n,", ")))
%o A339928 (Python)
%o A339928 from sympy import factorial, isprime
%o A339928 def ok(n):
%o A339928     fn = factorial(n)
%o A339928     while fn > 0 and fn%2 == 0: fn //= 10
%o A339928     return fn > 0 and isprime(fn)
%o A339928 print(list(filter(ok, range(200)))) # _Michael S. Branicky_, Jun 07 2021
%Y A339928 Cf. A000142.
%K A339928 nonn,base,more
%O A339928 1,1
%A A339928 _Derek Orr_, Dec 23 2020