Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118255
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A118255
%S A118255 1,2,4,9,18,37,74,149,299,599,1198,2397,4794,9589,19179,38359,76718,153437,
%T A118255 306874,613749,1227499,2454999,4909998,9819997,19639995,39279991,78559983,
%U A118255 157119967,314239934,628479869,1256959738,2513919477,5027838955,10055677911
%N A118255 a(1)=1 as 1 is not prime, then a(n)=2*a(n-1) if n is prime, a(n)=2*a(n-1)+1 
               if n not prime.
%C A118255 In base 2 a(n)=concatenation for i=1 to n of A005171(i).
%e A118255 a(2)=2*1=2 as 2 is prime
%e A118255 a(3)=2*2=4 as 3 is prime
%e A118255 a(4)=2*4+1=9 as 4 composite
%e A118255 a(5)=2*9=18 as 5 is prime
%p A118255 f:=proc(n) option remember; if n=1 then RETURN(1); fi; if isprime(n) 
               then 2*f(n-1) else 2*f(n-1)+1; fi; end; [N. J. A. Sloane]
%Y A118255 Cf. A005171 A118256 A118257.
%Y A118255 Sequence in context: A056185 A152537 A081253 this_sequence A019299 A052932 
               A018097
%Y A118255 Adjacent sequences: A118252 A118253 A118254 this_sequence A118256 A118257 
               A118258
%K A118255 nonn
%O A118255 1,2
%A A118255 Pierre CAMI (pierrecami(AT)tele2.fr), Apr 19 2006
%E A118255 Corrected by Omar E. Pol, Nov 08, 2007. Corrections verified by N. J. 
               A. Sloane (njas(AT)research.att.com), Nov 17 2007.

    
page 1

Search completed in 0.001 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 4 15:11 EST 2009. Contains 170347 sequences.


AT&T Labs Research