login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118310 a(n) = GCD(n,m(n)), where m(n) is the n-th nonprime positive integer (1 or composite). 1
1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 9, 1, 10, 1, 11, 1, 1, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 5, 3, 1, 2, 1, 8, 1, 2, 1, 2, 9, 2, 1, 6, 1, 1, 1, 4, 1, 3, 1, 7, 3, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 4, 3, 2, 1, 24, 1, 1, 25, 2, 1, 3, 1, 4, 1, 1, 1, 6, 5, 2, 3, 2, 1, 30, 1, 2, 3, 2, 5, 6, 1, 1, 1, 4, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

For n >= 1, a(n+1) = GCD(n+1,c(n)), where c(n) = the n-th composite.

First occurrence of k: 1, 2, 3, 4, 35, 48, 56, 40, 18, 20, 22, 120, 130, 140, 375, ..., . - Robert G. Wilson v

LINKS

Table of n, a(n) for n=1..103.

MATHEMATICA

NonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; f[n_] := GCD[n, NonPrime@n]; Array[f, 103] (* Robert G. Wilson v *)

PROG

(PARI) A002808(maxn)= { local(a); a=[4]; for(n=5, maxn, if( !isprime(n), a=concat(a, n); ); ); return(a); } A118310(maxn)= { local(nonppo, a, newa, nonppol); a=[; ]; nonppo=concat(1, A002808(maxn)); nonppol=matsize(nonppo); for(n=1, nonppol[2], newa= gcd(n, nonppo[n]); a=concat(a, newa); ); return(a); } print(A118310(180)); \\ R. J. Mathar

CROSSREFS

Cf. A064814.

Sequence in context: A104412 A195451 A298160 * A073057 A084310 A214063

Adjacent sequences:  A118307 A118308 A118309 * A118311 A118312 A118313

KEYWORD

nonn

AUTHOR

Leroy Quet, May 14 2006

EXTENSIONS

More terms from Robert G. Wilson v and R. J. Mathar, May 16 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 15:59 EDT 2019. Contains 325185 sequences. (Running on oeis4.)