%I #10 Mar 26 2024 05:54:11
%S 3,11,17,23,29,37,41,43,53,67,73,79,97,101,107,109,127,131,139,149,
%T 151,157,163,173,191,199,211,229,239,251,257,263,271,281,283,293,307,
%U 311,313,331,337,347,349,359,373,379,383,389,397,409,421,433,443,449
%N Primes p which divide Sum_{i=1..m} i! for some m (see A125138).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Smarandache-WagstaffFunction.html">Smarandache-Wagstaff Function.</a>
%p isA056983 := proc(p)
%p local idxp ;
%p if not isprime(p) then
%p return false ;
%p end if;
%p idxp := numtheory[pi](p) ;
%p if A125138(idxp) > 0 then
%p true ;
%p else
%p false ;
%p end if;
%p end proc:
%p A056983 := proc(n)
%p option remember ;
%p local p;
%p if n = 1 then
%p 3;
%p else
%p p := procname(n-1) ;
%p while true do
%p p := nextprime(p) ;
%p if isA056983(p) then
%p return p;
%p end if;
%p end do:
%p end if;
%p end proc:
%p seq(A056983(n),n=1..70) ; # _R. J. Mathar_, Mar 26 2024
%Y Cf. A007489, A056984, A056985, A125138.
%K nonn
%O 1,1
%A _Eric W. Weisstein_
|