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 #36 Oct 13 2023 14:20:17
%S 1,4,7,13,16,22,25,40,43,49,52,67,70,76,79,121,124,130,133,148,151,
%T 157,160,202,205,211,214,229,232,238,241,364,367,373,376,391,394,400,
%U 403,445,448,454,457,472,475,481,484,607,610,616,619,634,637,643,646,688,691,697,700,715,718,724,727,1093,1096,1102,1105,1120
%N Numbers following gaps in the sequence of base-3 numbers that don't contain 0.
%C Partial sums for the convergent modified harmonic series in base 3 excluding 0 = Sum of 1/a(n) + 1/(a(n) + 1) = Sum of (2*a(n) + 1)/(a(n)*(a(n) + 1)).
%H Robert Baillie, <a href="http://dx.doi.org/10.2307/2321096">Sums of Reciprocals of Integers Missing a Given Digit</a>, American Mathematical Monthly (Washington, DC: Mathematical Association of America) 86 (5): 372-374, May 1979, doi:10.2307/2321096. ISSN 0002-9890. JSTOR 2321096.
%F a(n) = A032924(2n - 1).
%e Pattern of numbers of skipped terms (numbers in base 3 with at least one zero) is 1 (3 = 10_3), 1 (6 = 20_3), 3+1 (9 = 100_3, 10 = 101_3, 11 = 102_3, 12 = 110_3), 1, 3+1, 1, 9+3+1, 1, 3+1, 1, 9+3+1, 1, 3+1, 1, 27+9+3+1, ...
%o (PARI) lista(nn)=prec0 = 1; for(n=1, nn, if (vecmin(digits(n, 3)), if (prec0, print1(n,, ", ")); prec0 = 0, prec0 = 1);); \\ _Michel Marcus_, Aug 03 2015
%o (Python)
%o def A259566(n): return int(bin(m:=n)[3:],3)*3 + (3**m.bit_length()-1>>1) if n>1 else 1 # _Chai Wah Wu_, Oct 13 2023
%Y Cf. A032924.
%Y Subset of A016777 (congruent to 1 mod 3).
%Y Each term is one more than each number that follows a gap in A081605.
%K nonn,base,less
%O 1,2
%A _Sean Oneil_, Jun 30 2015