The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107680 Repeating k-th ternary repunit (A003462) 2^k times, k >= 0. 4
0, 1, 1, 4, 4, 4, 4, 13, 13, 13, 13, 13, 13, 13, 13, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
a(n) is the greatest ternary repunit that is not greater than the n-th number with no 2 in ternary representation.
LINKS
FORMULA
A032924(n) = a(n) + A107681(n);
A081604(A107681(n)) <= A081604(a(n)) = A081604(A032924(n)) = A000523(n+1).
a(n) = A003462(A000523(n+1)).
EXAMPLE
k=1: A003462(1) = (3^1-1)/2 = 1, therefore a(1) = a(2^1) = 1;
k=2: A003462(2) = (3^2-1)/2 = 4, therefore a(2+1) = a(2+2) =
a(2+3) = a(2+2^2) = 4.
MATHEMATICA
With[{nn=5}, Flatten[Table[#[[1]], {#[[2]]}]&/@Thread[{Table[FromDigits[ PadRight[{}, n, 1], 3], {n, nn}], 2^Range[nn]}]]] (* Harvey P. Dale, Jan 04 2013 *)
PROG
(PARI) apply( {A107680(n)=3^exponent(n+1)\2}, [0..66]) \\ M. F. Hasler, Jun 22 2020
CROSSREFS
Cf. A007089, A003462 (repunits in base 3), A000523 (number of digits in binary representation of n).
Sequence in context: A035621 A046109 A294246 * A358509 A285052 A369719
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 20 2005
EXTENSIONS
Corrected by T. D. Noe, Oct 25 2006
Extended to a(0) = 0 by M. F. Hasler, Jun 23 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 13:25 EDT 2024. Contains 372694 sequences. (Running on oeis4.)