1,2

{+-a(n)} gives all nonzero cubes modulo all powers of 3, that is, cubes over 3-adic integers. So this sequence is closed under multiplication.

Jianing Song, Table of n, a(n) for n = 1..9231 (all terms <= 40000)

a(n) = 13*n/3 + O(log(n)).

(PARI) isA319293(n)= n\27^valuation(n, 27)%9==1||n\27^valuation(n, 27)%9==8

A056020 is a proper subsequence.

Perfect powers over 3-adic integers:

Squares: positive: A055047; negative: A055048 (negated);

Cubes: this sequence.

Sequence in context: A155966 A228072 A038209 * A061908 A056020 A049510

Adjacent sequences: A319290 A319291 A319292 * A319294 A319295 A319296

nonn

Jianing Song, Sep 16 2018

approved