Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A078680
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A078680 Start with n; repeatedly double and subtract 1 until reach a prime. Sequence gives number of steps to reach a prime or 0 if no prime is ever reached. +0
1
1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 4, 3, 1, 6, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 8, 3, 1, 2, 1, 1, 2, 5, 1, 4, 1, 3, 2, 1, 2, 8, 583, 1, 2, 1, 1, 6, 1, 1, 4, 1, 2, 2, 5, 2, 4, 7, 1, 2, 1, 5, 2, 1, 1, 2, 3, 3, 2, 1, 1, 4, 3, 1, 2, 3, 1, 10, 1, 2, 4, 1, 2, 2, 1, 1, 8, 7, 2, 582, 1, 1, 2, 1, 1, 2, 3, 2 (list; graph; listen)
OFFSET

2,4

PROGRAM

(PARI) a(n)=if(n<0, 0, s=n; c=1; while(isprime(2*s-1)==0, s=2*s-1; c++); c)

CROSSREFS

Cf. A050412.

Sequence in context: A076845 A016014 A067760 this_sequence A050412 A025898 A025849

Adjacent sequences: A078677 A078678 A078679 this_sequence A078681 A078682 A078683

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Dec 17 2002

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 July 26 23:19 EDT 2008. Contains 142293 sequences.


AT&T Labs Research