login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175104 a(1)=1. For n >= 2, a(n) = 2*a(n-1) + (number of composites among first n-1 terms of the sequence). 1
1, 2, 4, 9, 20, 43, 89, 181, 365, 734, 1473, 2952, 5911, 11830, 23669, 47347, 94704, 189419, 378850, 757713, 1515440, 3030895, 6061806, 12123629, 24247276, 48494571, 96989162, 193978345, 387956712, 775913447, 1551826917, 3103653858 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
A175104 := proc(n) option remember; if n = 1 then 1; else a := 2*procname(n-1) ; for i from 1 to n-1 do prev := procname(i) ; if prev > 2 and not isprime(prev) then a := a+1 ; end if; end do ; a ; end if; end proc: seq(A175104(n), n=1..70) ; # R. J. Mathar, Feb 16 2010
MATHEMATICA
nxt[{a_, c_}]:=Module[{t=2a+c}, {t, c+If[CompositeQ[t], 1, 0]}]; Transpose[ NestList[ nxt, {1, 0}, 40]][[1]] (* Harvey P. Dale, Mar 07 2015 *)
CROSSREFS
Sequence in context: A018102 A018103 A350092 * A123720 A179744 A266930
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 09 2010
EXTENSIONS
More terms from R. J. Mathar, Feb 16 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)