login
A373184
G.f. A(x) satisfies A(x) = 1/(1 - x)^2 - 1 + A(x^3).
3
2, 3, 6, 5, 6, 10, 8, 9, 16, 11, 12, 18, 14, 15, 22, 17, 18, 29, 20, 21, 30, 23, 24, 34, 26, 27, 44, 29, 30, 42, 32, 33, 46, 35, 36, 55, 38, 39, 54, 41, 42, 58, 44, 45, 68, 47, 48, 66, 50, 51, 70, 53, 54, 84, 56, 57, 78, 59, 60, 82, 62, 63, 94, 65, 66, 90, 68, 69, 94, 71, 72, 107, 74, 75, 102, 77, 78, 106, 80, 81
OFFSET
1,1
LINKS
FORMULA
a(3*n+1) = 3*n+2, a(3*n+2) = 3*n+3 and a(3*n+3) = 3*n+4 + a(n+1) for n >= 0.
G.f.: A(x) = Sum_{k>=0} (1/(1 - x^(3^k))^2 - 1).
PROG
(Ruby)
def A(k, n)
ary = [0]
(1..n).each{|i|
j = i + 1
j += ary[i / k] if i % k == 0
ary << j
}
ary[1..-1]
end
p A(3, 80)
CROSSREFS
Cf. A327625.
Sequence in context: A076734 A242314 A242311 * A097723 A187831 A087786
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 27 2024
STATUS
approved