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!)
A113521 a(n) = largest nonprime nonnegative integer < c(n) which is coprime to c(n), where c(n) is the n-th composite positive integer. 1
1, 1, 1, 8, 9, 1, 9, 14, 15, 1, 9, 20, 21, 1, 24, 25, 26, 27, 1, 27, 32, 33, 34, 35, 35, 38, 39, 25, 39, 44, 45, 35, 48, 49, 50, 51, 49, 54, 55, 56, 57, 49, 57, 62, 63, 64, 65, 65, 68, 69, 65, 69, 74, 75, 76, 77, 77, 80, 81, 65, 84, 85, 86, 87, 77, 90, 91, 92, 93, 94, 95, 95, 98 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n)=A002808(n)-1 if A002808(n)-1 is not prime. - Robert Israel, Dec 02 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 255 terms from Lior Manor)
EXAMPLE
a(7) = 9 because 9 is the largest nonprime integer < 14 (the 7th composite) (since the other nonprime integers > 9 and < 14 {10 and 12} aren't coprime with 14).
MAPLE
N:=300:
NP:= remove(isprime, [$1..N]):
for i from 2 to nops(NP) do
x:= NP[i];
for k from i-1 by -1 do
if igcd(NP[k], x) = 1 then A[i-1]:=NP[k]; break fi
od
od:
seq(A[i], i=1..nops(NP)-1); # Robert Israel, Dec 02 2019
MATHEMATICA
lnni[n_]:=Max[Select[Range[n-1], CompositeQ[#]&&CoprimeQ[#, n]&]]; lnni/@ Select[Range[200], CompositeQ]/.(-\[Infinity]->1) (* Harvey P. Dale, Jan 19 2019 *)
CROSSREFS
Cf. A002808.
Sequence in context: A302765 A053463 A073636 * A297537 A030167 A010767
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 12 2006
EXTENSIONS
More terms from Lior Manor, Nov 21 2007
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)