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!)
A338831 a(n) is the greatest number not yet in the sequence with the same number of digits and the same smallest digit as n. 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 90, 91, 81, 71, 61, 51, 41, 31, 21, 19, 80, 18, 92, 82, 72, 62, 52, 42, 32, 29, 70, 17, 28, 93, 83, 73, 63, 53, 43, 39, 60, 16, 27, 38, 94, 84, 74, 64, 54, 49, 50, 15, 26, 37, 48, 95, 85, 75, 65, 59, 40, 14, 25, 36, 47, 58, 96, 86 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
LINKS
Rémy Sigrist, Colored scatterplot of the first 10000 terms (where the color is function of the smallest digit of n)
FORMULA
A055642(a(n)) = A055642(n).
A054054(a(n)) = A054054(n).
EXAMPLE
For n = 77:
- the numbers with 2 digits and smallest digit 7 are: 77, 78, 79, 87 and 97,
- so a(77) = 97,
a(78) = 87,
a(79) = 79,
a(87) = 78,
a(97) = 77.
MATHEMATICA
Block[{a = {}, f, k}, f[x_] := Min@ 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
Sequence in context: A273478 A278944 A303171 * A024664 A078188 A240511
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 March 28 08:22 EDT 2024. Contains 371236 sequences. (Running on oeis4.)