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) ; # 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
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 09 2010
EXTENSIONS
More terms from R. J. Mathar, Feb 16 2010
STATUS
approved