OFFSET
1,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
MATHEMATICA
PROG
(PARI)
A358511(i)=my(a=List(), pos=-1, r); for(j=0, i-1, r=j<<2; listput(a, [pos+=2, pos+=r+1]); pos++; listput(a, vector(r+2, x, x+pos)); pos+=r+2); concat(Vec(a)); \\ i-th iteration adds 4*i terms
A358511[10]
(Python)
def A358511(i): # i-th iteration adds 4*i terms
a, pos = [], 0
for j in range(0, i):
a.extend([pos := pos + 1, pos := pos + (j<<2) + 1])
a.extend(range(pos := pos + 2, pos := pos + (j<<2) + 2))
return a
print(A358511(10))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo Xausa, Nov 20 2022
STATUS
approved