login
A variant of Van Eck's sequence where we only consider powers of 3: for n >= 0, if a(n) = a(n-3^e) for some e, take the least such e and set a(n+1) = 3^e; otherwise a(n+1) = 0. Start with a(1) = 0.
1

%I #6 Apr 15 2022 11:22:17

%S 0,0,1,0,3,0,0,1,0,3,0,9,0,9,0,9,0,0,1,0,3,0,9,9,1,0,9,3,0,3,9,0,3,3,

%T 1,27,0,0,1,0,3,0,27,0,27,9,0,3,27,0,3,3,1,0,0,1,3,9,27,0,0,1,9,0,3,0,

%U 0,1,0,3,0,27,27,1,0,9,0,27,0,0,1,0,3,0

%N A variant of Van Eck's sequence where we only consider powers of 3: for n >= 0, if a(n) = a(n-3^e) for some e, take the least such e and set a(n+1) = 3^e; otherwise a(n+1) = 0. Start with a(1) = 0.

%C Will every power of 3 appear in the sequence?

%e a(1) = 0 by definition.

%e a(2) = 0 as there is only one occurrence of a(1) = 0 so far.

%e a(3) = 3^0 = 1 as a(2) = a(2-3^0).

%e a(4) = 0 as there is only one occurrence of a(3) = 1 so far.

%e a(5) = 3^1 = 3 as a(4) = a(4-3^1).

%e a(6) = 0 as there is only one occurrence of a(5) = 3 so far.

%e a(7) = 0 as a(6) <> a(6-3^e) for any admissible e.

%e a(8) = 3^0 = 1 as a(7) = a(7-3^0).

%e a(9) = 0 as a(8) <> a(8-3^e) for any admissible e.

%o (PARI) { for (n=1, #a=vector(84), for (e=0, oo, m = n-1-d=3^e; if (m<1, break, a[n-1]==a[m], a[n]=d; break)); print1 (a[n]", ")) }

%Y Cf. A181391, A353322 (variant for powers of 2).

%K nonn

%O 1,5

%A _Rémy Sigrist_, Apr 12 2022