login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

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

Harvey P. Dale, Table of n, a(n) for n = 1..1000

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) ; [From 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: A101338 A018102 A018103 * A123720 A179744 A266930

Adjacent sequences:  A175101 A175102 A175103 * A175105 A175106 A175107

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 16 09:34 EST 2018. Contains 318160 sequences. (Running on oeis4.)