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!)
A064814 Greatest common divisor of n and the n-th composite number. 12

%I #14 Jun 19 2018 05:12:11

%S 1,2,1,1,5,6,7,1,1,2,1,3,1,2,5,2,1,2,1,4,3,2,1,12,1,13,1,14,1,15,1,16,

%T 1,2,1,4,1,1,1,1,1,6,1,1,1,1,1,4,1,10,3,2,1,2,11,2,1,1,1,12,1,2,3,8,5,

%U 1,1,1,1,5,1,2,1,2,3,4,7,2,1,10,3,2,1,1,1,1,1,1,1,1,1,1,31,1,1,32,1,2

%N Greatest common divisor of n and the n-th composite number.

%C a(12) = gcd(12, A002808(12)) = gcd(12, 21) = gcd(2*2*3, 3*7) = 3.

%H R. Zumkeller, <a href="/A064814/b064814.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = gcd(n, A002808(n)).

%t Composite[n_Integer] := FixedPoint[n + PrimePi[#] + 1 &, n + PrimePi[n] + 1]; Table[GCD[n, Composite[n]], {n, 100}] (* _T. D. Noe_, Feb 22 2012 *)

%t Module[{nn=150,comps},comps=Complement[Range[2,nn],Prime[Range[ PrimePi[ nn]]]];GCD@@@Thread[{comps,Range[Length[comps]]}]] (* _Harvey P. Dale_, Apr 23 2014 *)

%o (PARI) nextComp(n)= { if (!isprime(n), return(n)); return(n + 1) } { c=3; for (n=1, 1000, c=nextComp(c + 1); write("b064814.txt", n, " ", gcd(n, c)) ) } \\ _Harry J. Smith_, Sep 27 2009

%Y Cf. A002808, A071224.

%K nice,nonn

%O 1,2

%A _Reinhard Zumkeller_, Oct 22 2001

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)