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

A081870
a(1)=1, a(n)=2*a(n-1)+1 if that number is not squarefree, a(n)=a(n-1)+1 otherwise.
1
1, 2, 3, 4, 9, 10, 11, 12, 25, 26, 27, 28, 29, 30, 31, 63, 64, 65, 66, 67, 135, 136, 137, 275, 276, 277, 278, 279, 280, 281, 282, 283, 567, 568, 569, 570, 571, 1143, 1144, 1145, 1146, 1147, 2295, 2296, 2297, 2298, 2299, 4599, 4600, 4601, 4602, 4603, 9207, 9208
OFFSET
1,2
LINKS
FORMULA
a(n)=r(n)*2^b(n) where b(n) is an integer sequence and r(n) converges to 1.124922752241150441104513529....
MATHEMATICA
NestList[If[SquareFreeQ[2 # + 1], # + 1, 2 # + 1] &, 1, 53] (* Ivan Neretin, Apr 26 2017 *)
CROSSREFS
Sequence in context: A265746 A047454 A373788 * A165315 A284681 A309346
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 12 2003
STATUS
approved