Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118136
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A118136 2 + ( 2*n! mod n+1). +0
1
2, 2, 3, 2, 5, 2, 7, 2, 2, 2, 11, 2, 13, 2, 2, 2, 17, 2, 19, 2, 2, 2, 23, 2, 2, 2, 2, 2, 29, 2, 31, 2, 2, 2, 2, 2, 37, 2, 2, 2, 41, 2, 43, 2, 2, 2, 47, 2, 2, 2, 2, 2, 53, 2, 2, 2, 2, 2, 59, 2, 61, 2, 2, 2, 2, 2, 67, 2, 2, 2, 71, 2, 73, 2, 2, 2, 2, 2, 79, 2, 2, 2, 83, 2, 2, 2, 2, 2, 89, 2, 2, 2, 2, 2, 2, 2 (list; graph; listen)
OFFSET

0,1

COMMENT

Prime generating formula based on Wilson's theorem.

Flatten[Table[If[h[n] - 2 == 0, {}, h[n]], {n, 0, 100}]] gives the primes without 2.

LINKS

Answers.com, Formula for primes

MAPLE

f:=n->(2*n! mod (n+1))+2; [seq(f(n), n=0..100)];

MATHEMATICA

h[n_] := 2 + Mod[2*n!, n + 1] Table[h[n], {n, 0, 100}]

CROSSREFS

Cf. A000040.

Sequence in context: A062830 A115119 A066656 this_sequence A076396 A076397 A076403

Adjacent sequences: A118133 A118134 A118135 this_sequence A118137 A118138 A118139

KEYWORD

nonn

AUTHOR

Roger L. Bagula (rlbagulatftn(AT)yahoo.com), May 13 2006

EXTENSIONS

Edited by njas, Jun 12 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research