login

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”).

a(1)=1, a(n)=2*a(n-1)+1 if that number is not squarefree, a(n)=a(n-1)+1 otherwise.
1

%I #8 Apr 26 2017 22:26:38

%S 1,2,3,4,9,10,11,12,25,26,27,28,29,30,31,63,64,65,66,67,135,136,137,

%T 275,276,277,278,279,280,281,282,283,567,568,569,570,571,1143,1144,

%U 1145,1146,1147,2295,2296,2297,2298,2299,4599,4600,4601,4602,4603,9207,9208

%N a(1)=1, a(n)=2*a(n-1)+1 if that number is not squarefree, a(n)=a(n-1)+1 otherwise.

%H Ivan Neretin, <a href="/A081870/b081870.txt">Table of n, a(n) for n = 1..750</a>

%F a(n)=r(n)*2^b(n) where b(n) is an integer sequence and r(n) converges to 1.124922752241150441104513529....

%t NestList[If[SquareFreeQ[2 # + 1], # + 1, 2 # + 1] &, 1, 53] (* _Ivan Neretin_, Apr 26 2017 *)

%K nonn

%O 1,2

%A _Benoit Cloitre_, Apr 12 2003