login
A259566
Numbers following gaps in the sequence of base-3 numbers that don't contain 0.
1
1, 4, 7, 13, 16, 22, 25, 40, 43, 49, 52, 67, 70, 76, 79, 121, 124, 130, 133, 148, 151, 157, 160, 202, 205, 211, 214, 229, 232, 238, 241, 364, 367, 373, 376, 391, 394, 400, 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
OFFSET
1,2
COMMENTS
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)).
LINKS
Robert Baillie, Sums of Reciprocals of Integers Missing a Given Digit, American Mathematical Monthly (Washington, DC: Mathematical Association of America) 86 (5): 372-374, May 1979, doi:10.2307/2321096. ISSN 0002-9890. JSTOR 2321096.
FORMULA
a(n) = A032924(2n - 1).
EXAMPLE
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, ...
PROG
(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
(Python)
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
CROSSREFS
Cf. A032924.
Subset of A016777 (congruent to 1 mod 3).
Each term is one more than each number that follows a gap in A081605.
Sequence in context: A310805 A310806 A125758 * A151788 A310807 A310808
KEYWORD
nonn,base,less
AUTHOR
Sean Oneil, Jun 30 2015
STATUS
approved