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!)
A109942 Largest k-digit number coprime to n, where k is the number of digits in n. 1
9, 9, 8, 9, 9, 7, 9, 9, 8, 99, 98, 97, 99, 99, 98, 99, 99, 97, 99, 99, 97, 97, 99, 97, 99, 99, 98, 99, 99, 97, 99, 99, 98, 99, 99, 97, 99, 99, 98, 99, 99, 97, 99, 97, 98, 99, 99, 97, 99, 99, 98, 99, 99, 97, 98, 99, 98, 99, 99, 97, 99, 99, 97, 99, 99, 97, 99, 99, 98, 99, 99, 97 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) >= n+1 unless n is in A002283, in which case a(n)=n-1. - Robert Israel, Jan 30 2017
MAPLE
f:= proc(n) local k;
for k from 10^(1+ilog10(n))-1 by -1 do
if igcd(n, k) = 1 then return k fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Jan 30 2017
CROSSREFS
Sequence in context: A050812 A139345 A231470 * A339745 A346929 A346927
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Jul 19 2005
EXTENSIONS
More terms from David Wasserman, Jul 19 2005
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 August 8 15:25 EDT 2024. Contains 375022 sequences. (Running on oeis4.)