login
A373185
G.f. A(x) satisfies A(x) = 1/(1 - x)^2 - 1 + A(x^4).
3
2, 3, 4, 7, 6, 7, 8, 12, 10, 11, 12, 17, 14, 15, 16, 24, 18, 19, 20, 27, 22, 23, 24, 32, 26, 27, 28, 37, 30, 31, 32, 45, 34, 35, 36, 47, 38, 39, 40, 52, 42, 43, 44, 57, 46, 47, 48, 66, 50, 51, 52, 67, 54, 55, 56, 72, 58, 59, 60, 77, 62, 63, 64, 89, 66, 67, 68, 87, 70, 71, 72, 92, 74, 75, 76, 97, 78, 79, 80, 108, 82, 83, 84, 107
OFFSET
1,1
LINKS
FORMULA
a(4*n+1) = 4*n+2, a(4*n+2) = 4*n+3, a(4*n+3) = 4*n+4 and a(4*n+4) = 4*n+5 + a(n+1) for n >= 0.
G.f.: A(x) = Sum_{k>=0} (1/(1 - x^(4^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(4, 90)
CROSSREFS
Sequence in context: A265364 A265363 A319651 * A340632 A074846 A120225
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 27 2024
STATUS
approved