The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A170826 a(n) = gcd(n^2, n!). 5

%I

%S 1,2,3,8,5,36,7,64,81,100,11,144,13,196,225,256,17,324,19,400,441,484,

%T 23,576,625,676,729,784,29,900,31,1024,1089,1156,1225,1296,37,1444,

%U 1521,1600,41,1764,43,1936,2025,2116,47,2304,2401,2500,2601,2704,53,2916

%N a(n) = gcd(n^2, n!).

%F If n is prime then a(n) = n; otherwise, if n <> 4 then a(n) = n^2. - _Zak Seidov_, Dec 28 2009

%F a(n) = n!/A092043(n). - _Johannes W. Meijer_, Jun 04 2016

%p GCDWITHFACTORIAL:=proc(a) local b,i,k:

%p if whattype(a) <> list then RETURN([]); fi:

%p b:=[]:

%p for i to nops(a) do b:=[op(b), gcd(a[i],i!)]: od;

%p RETURN(b);

%p end:

%p A170826 := proc(n): gcd(n^2, n!) end: seq(A170826(n), n=1..54); # _Johannes W. Meijer_, Jun 04 2016

%t Table[GCD[n^2, n!], {n, 54}] (* _Michael De Vlieger_, Jun 05 2016 *)

%o (PARI) a(n)=if(isprime(n),n,if(n==4,8,n^2)) \\ _Charles R Greathouse IV_, Feb 01 2013

%Y Cf. A092043.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Dec 27 2009

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.

Last modified July 29 10:16 EDT 2021. Contains 346344 sequences. (Running on oeis4.)