login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338829 a(n) is the greatest number not yet in the sequence with the same number of digits and the same sum of digits as n. 3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 91, 11, 21, 31, 41, 51, 61, 71, 81, 82, 92, 12, 22, 32, 42, 52, 62, 72, 73, 83, 93, 13, 23, 33, 43, 53, 63, 64, 74, 84, 94, 14, 24, 34, 44, 54, 55, 65, 75, 85, 95, 15, 25, 35, 45, 46, 56, 66, 76 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
We have a fixed point with m digits and sum of digits k whenever A289410(m, k) is odd.
LINKS
Rémy Sigrist, Colored scatterplot of the first 10000 terms (where the color is function of the sum of digits of n)
FORMULA
A055642(a(n)) = A055642(n).
A007953(a(n)) = A007953(n).
EXAMPLE
For n = 23:
- the numbers with 2 digits and sum of digits 5 are: 14, 23, 32, 41 and 50,
- so a(14) = 50,
a(23) = 41,
a(32) = 32,
a(41) = 23,
a(50) = 14.
MATHEMATICA
Block[{a = {}, f, k}, f[x_] := Total@ IntegerDigits@ x; Do[k = f[i]; AppendTo[a, SelectFirst[Range[10^# - 1, 10^(# - 1), -1] &@ Floor[1 + Log10[i]], And[f[#] == k, FreeQ[a, #]] &]], {i, 67}]; a] (* Michael De Vlieger, Nov 13 2020 *)
PROG
(PARI) See Links section.
CROSSREFS
Cf. A055642, A289410, A331274 (binary analog), A333659, A338834 (factorial base analog), A338835 (primorial base analog).
Sequence in context: A140665 A069024 A175396 * A107085 A212499 A244890
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 11 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 00:00 EDT 2024. Contains 371696 sequences. (Running on oeis4.)