OFFSET
1,2
COMMENTS
Numbers k which end in the digits ...xy with x!=9 and y!=0.
Differs from A052382, as there are terms with 0 here, the first being a(82)=101. First differs from A067251 at a(82)=101, A067251(82)=91. Similarly to A067251, A209931 includes 91-99 as terms whereas they are not in this sequence. A043095(1)=0 and A023804(1)=0 whereas 0 is not a term in this sequence (there are additional differences, such as the term that comes after 89 in A023804 and A043095 being 99).
This sequence is defined as follows: |digsum(k + seed) - digsum(k)| = r where digsum is the digital sum (A007953), with seed = 9 and r = 0.
The way this sequence looks has to do with using base 10: if you choose 8 as a seed and 1 as the sought difference (r), or 7 as a seed and 2 as the sought difference, you will get similar long, full sequences. However if you choose 8 as a seed and 0 as the sought difference, you'll get no terms.
FORMULA
a(n) = n + floor((n-1)/9) + floor((n-1)/81)*10.
EXAMPLE
For k=3, 3 + 9 = 12. Sum of 1 + 2 = 3. Since the sum of the digits in 3 and the sum of the digits in 12 are the same, 3 is a term of the sequence.
MATHEMATICA
Select[Range[100], Equal @@ Plus @@@ IntegerDigits[{#, # + 9}] &] (* Amiram Eldar, Nov 28 2023 *)
PROG
(Python)
def A367733(n): return n + (n-1)//9 + ((n-1)//81)*10
(PARI) is(n) = sumdigits(n) == sumdigits(n+9) \\ David A. Corneth, Nov 28 2023
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Julia Zimmerman, Nov 28 2023
STATUS
approved