login
a(1)=2; for n>1, a(n)=2*a(n-1)-1 if that number is composite, a(n)=a(n-1)+1 otherwise.
0

%I #6 Mar 30 2012 18:39:17

%S 2,3,4,5,9,10,11,21,22,23,45,46,91,92,183,365,729,1457,2913,5825,

%T 11649,11650,23299,46597,93193,186385,186386,372771,745541,1491081,

%U 2982161,5964321,5964322,11928643,23857285,47714569,95429137,95429138,190858275

%N a(1)=2; for n>1, a(n)=2*a(n-1)-1 if that number is composite, a(n)=a(n-1)+1 otherwise.

%F a(n)=s(n)*2^c(n) where c(n) is an integer sequence and s(n) converges to 1.422004961641565758470595....

%K nonn

%O 1,1

%A _Benoit Cloitre_, Apr 12 2003