OFFSET
1,2
COMMENTS
In base 2 this gives the "Evil Numbers" (cf. A001969). One may conjecture that in base b the asymptotic slope will be b and asymptotic density 1/b for each result (mod b). Cases b=31 or b=61 gave considerable number of primes on the sequence.
Proof of this conjecture: in general, the sequence d with terms d(n) = sum of digits of n written in base b (mod b) is a fixed point of the generalized Thue-Morse morphism 0->01..b-1, 1->12..0, etc. See A053839 for the case b=4. It follows directly from this that all symbols have asymptotic density 1/b, and therefore that the positional sequences all have asymptotic slope b. - Michel Dekking, Apr 18 2019
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
83 is a term since 83 = (1,0,0,0,2)_3 and 1 + 0 + 0 + 0 + 2 = 3 == 0 (mod 3).
MATHEMATICA
Ev = Function[{b, x}, vx = IntegerDigits[x, b]; Mod[Apply[Plus, vx], b]]; Seq = Function[{b, n}, Flatten[Position[Table[Ev[b, k], {k, 0, n}], 0]] - 1]; sb = Seq[3, 1000]
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Carlos Alves, Jan 21 2003
EXTENSIONS
a(1) = 0 inserted and offset corrected by Amiram Eldar, Jan 05 2020
STATUS
approved