Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Jan 19 2016 17:26:56
%S 0,1,2,3,5,5,10,7,17,24,41,11,52,13,65,78,143,17,160,19,179,198,377,
%T 23,400,423,823,1246,2069,29,2098,31,2129,2160,4289,6449,10738,37,
%U 10775,10812,21587,41,21628,43,21671,21714,43385,47,43432,43479,86911,130390,217301,53,217354,217407,434761
%N If n is 0, 1, or prime, a(n) = n; else a(n) = a(n-1) + a(n-2).
%F See the name.
%e a(9) = a(8) + a(7)
%e = a(7) + a(6) + 7
%e = a(5) + a(4) + 14
%e = a(3) + a(2) + 19
%e = 24
%t a[0] = 0; a[1] = 1; a[n_] := a[n] = If[PrimeQ@ n, n, a[n - 1] + a[n - 2]]; Table[a@ n, {n, 0, 56}] (* _Michael De Vlieger_, Dec 15 2015 *)
%K nonn,easy
%O 0,3
%A _Nicholas Drozd_, Dec 15 2015
%E More terms from _Michael De Vlieger_, Dec 15 2015