OFFSET
0,2
COMMENTS
The sequence is constructed by starting with 3*m copies of 3*(m+1), followed by 3*m+1, 3*m+2, 3*m+3, as m varies from 0, 1, 2, ... It is straightforward to check that this construction satisfies the recurrence relation.
The construction shows that the sequence is well defined, every positive integer is in the sequence, and every integer not a proper multiple of 3 appears only once. If t is a multiple of 3, then t appears t-2 times.
In general, the meta recurrence a(n) = a(n-a(n-k))+k with initial conditions a(i) = i+1 for i = 0,...,k-1 has a simple solution and can be constructed starting with k*m copies of k*(m+1), followed by k*m+1, k*m+2, ..., k*(m+1), as m varies from 0, 1, 2, ... This sequence is well defined, every positive integer is in the sequence, and every integer not a proper multiple of k appears once. If t is a multiple of k, then t appears t-k+1 times.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000
MATHEMATICA
PROG
(Python)
A274213_list = [1, 2, 3]
for n in range(3, 10001):
(Magma) I:=[1, 2, 3]; [n le 3 select I[n] else Self(n-Self(n-3))+3 : n in [1..80]]; // Vincenzo Librandi, Jun 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Jun 13 2016
STATUS
approved