login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125138 Smarandache-Wagstaff function: a(n) = smallest m such that prime(n) divides Sum_{i=1..m} i!, or -1 if no such m exists. 4
-1, 2, -1, -1, 4, -1, 5, -1, 12, 19, -1, 24, 32, 19, -1, 20, -1, -1, 20, -1, 7, 57, -1, -1, 6, 83, -1, 15, 33, -1, 38, 9, -1, 23, 70, 71, 57, 17, -1, 26, -1, -1, 28, -1, -1, 56, 67, -1, -1, 73, -1, 75, -1, 114, 177, 76, -1, 137, -1, 76, 29, 172, 132, 87, 265, -1, 52, 142, 9, 76, -1, 311, -1, 209, 37, 149, 115, 227, -1, 370, -1, 333, -1 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

One need only check values of m < prime(n).

This takes values -1 at A056985 and values given in A056984 at the primes listed in A056983.

REFERENCES

F. Smarandache, Definitions solved and unsolved problems, conjectures and theorems in number theory and geometry, edited by M. Perez, Xiquan Publishing House, 2000.

LINKS

F. Smarandache, Definitions, Solved and Unsolved Problems, Conjectures, ...

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

MAPLE

A007489 := proc(n) add(factorial(k), k=1..n) ; end: A125138 := proc(n) local p, m ; p := ithprime(n) ; for m from 1 to p do if A007489(m) mod p = 0 then RETURN(m) ; fi ; od ; RETURN(-1) ; end: for n from 1 to 120 do printf("%d, ", A125138(n)) ; od ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Mar 14 2007

CROSSREFS

Cf. A007489, A056983, A056984, A056985.

Sequence in context: A144389 A136321 A112987 * A021477 A124939 A099020

Adjacent sequences:  A125135 A125136 A125137 * A125139 A125140 A125141

KEYWORD

sign

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Jan 21 2007

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Mar 14 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 21:51 EST 2012. Contains 205978 sequences.