A259566 Numbers following gaps in the sequence of base-3 numbers that don't contain 0.
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
Examples
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, ...
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.
Crossrefs
Programs
-
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
Formula
a(n) = A032924(2n - 1).
Comments