Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A100802
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A100802 a(n) = least k >= 0 such that (n+k)/2 is prime. +0
2
4, 3, 2, 1, 0, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5 (list; graph; listen)
OFFSET

0,1

COMMENT

If a(n) = k is nonzero then a(n+1) = k-1. a(2p) = 0 for p prime.

MATHEMATICA

a = {}; Do[k = 0; While[ ! PrimeQ[(n + k)/2], k++ ]; AppendTo[a, k]; , {n, 0, 120}]; a (Chandler)

CROSSREFS

Cf. A100803.

Sequence in context: A143543 A067017 A067018 this_sequence A022960 A023446 A066440

Adjacent sequences: A100799 A100800 A100801 this_sequence A100803 A100804 A100805

KEYWORD

nonn,easy

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Dec 18 2004

EXTENSIONS

Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Jan 19 2005

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 7 23:50 EST 2009. Contains 170430 sequences.


AT&T Labs Research