Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A119556
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A119556 Primes in the sequence a(n+1)=a(n)+[(-1)^(n+1)]*n!, with a(0)=0. +0
1
5, 101, 4421, 1226280710981, 115578717622022981, 32656499591185747972776747396512425885838364422981, 13637238560507943224811827029784398731973085968949065951959304510863783836442298\ 1 (list; graph; listen)
OFFSET

0,1

FORMULA

a(n+1)=a(n)+[(-1)^(n+1)]*n!, with a(0)=0

EXAMPLE

a(0)=0

a(1)=0 + [(-1)^2]*1! = 0 + 1 = 1

a(2)=1 + [(-1)^3]*2! = 1 - 2 = -1

a(3)=-1 +[(-1)^4]*3! = -1 + 6 = 5 that is prime

MAPLE

P:=proc(n) local i, j; j:=0; for i from 1 by 1 to n do j:=j+((-1)^(i+1))*i!; if isprime(j) then print(i); fi; od; end: P(100);

CROSSREFS

Sequence in context: A041187 A074790 A009757 this_sequence A009765 A113073 A057207

Adjacent sequences: A119553 A119554 A119555 this_sequence A119557 A119558 A119559

KEYWORD

easy,nonn

AUTHOR

Paolo P. Lava & Giorgio Balzarotti (ppl(AT)spl.at), May 30 2006

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 December 10 12:37 EST 2009. Contains 170569 sequences.


AT&T Labs Research