cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A280724 Expansion of 1/(1 - x) + (1/(1 - x)^2)*Sum_{k>=0} x^(3^k).

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 11, 13, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233, 237, 241, 245
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 07 2017

Keywords

Comments

Sums of lengths of ternary numbers (A007089).

Examples

			-----------------------
n  base 3 length  a(n)
-----------------------
0 |  0   |  1   |  1
1 |  1   |  1   |  2
2 |  2   |  1   |  3
3 |  10  |  2   |  5
4 |  11  |  2   |  7
5 |  12  |  2   |  9
6 |  20  |  2   |  11
7 |  21  |  2   |  13
8 |  22  |  2   |  15
9 |  100 |  3   |  18
-----------------------
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(1 - x) + (1/(1 - x)^2) Sum[x^3^k, {k, 0, 15}], {x, 0, 70}], x]
    Table[1 + Sum[Floor[Log[3, k]] + 1, {k, 1, n}], {n, 0, 70}]

Formula

G.f.: 1/(1 - x) + (1/(1 - x)^2)*Sum_{k>=0} x^(3^k).
a(n) = 1 + Sum_{k=1..n} floor(log_3(k)) + 1.