OFFSET
1,1
COMMENTS
a(n) == 2 (mod 3) for all n.
MATHEMATICA
Map[#[[1]] &, Select[Map[{#, Map[#[[1]] &, Split[IntegerDigits[#, 3]]] == {1, 0, 2}} &,
Range[2, 4000, 3]], #[[2]] &]] (* this sequence *)
ToExpression[Map[IntegerString[#, 3] &, %]] (* A371055 *)
(* Peter J. C. Moses, Mar 06 2024 *)
PROG
(Python)
from itertools import count, islice
def A371054_gen(): # generator of terms
return (3**(l-a)*(3**a-1>>1)+3**b-1 for l in count(3) for a in range(1, l-1) for b in range(1, l-a))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, Mar 19 2024
STATUS
approved