A367733 Numbers k such that the sum of digits of k is equal to the sum of digits of k+9.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 101
Offset: 1
Examples
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.
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
Crossrefs
Cf. A007953.
Programs
-
Mathematica
Select[Range[100], Equal @@ Plus @@@ IntegerDigits[{#, # + 9}] &] (* Amiram Eldar, Nov 28 2023 *)
-
PARI
is(n) = sumdigits(n) == sumdigits(n+9) \\ David A. Corneth, Nov 28 2023
-
Python
def A367733(n): return n + (n-1)//9 + ((n-1)//81)*10
Formula
a(n) = n + floor((n-1)/9) + floor((n-1)/81)*10.
Comments