cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A170826 a(n) = gcd(n^2, n!).

This page as a plain text file.
%I A170826 #20 Nov 10 2023 18:23:32
%S A170826 1,2,3,8,5,36,7,64,81,100,11,144,13,196,225,256,17,324,19,400,441,484,
%T A170826 23,576,625,676,729,784,29,900,31,1024,1089,1156,1225,1296,37,1444,
%U A170826 1521,1600,41,1764,43,1936,2025,2116,47,2304,2401,2500,2601,2704,53,2916
%N A170826 a(n) = gcd(n^2, n!).
%F A170826 If n is prime then a(n) = n; otherwise, if n <> 4 then a(n) = n^2. - _Zak Seidov_, Dec 28 2009
%F A170826 a(n) = n!/A092043(n). - _Johannes W. Meijer_, Jun 04 2016
%F A170826 a(n) = n^2 / n^c(n), where c = A010051 for n >= 5. - _Wesley Ivan Hurt_, Nov 10 2023
%p A170826 GCDWITHFACTORIAL:=proc(a) local b,i,k:
%p A170826 if whattype(a) <> list then RETURN([]); fi:
%p A170826 b:=[]:
%p A170826 for i to nops(a) do b:=[op(b), gcd(a[i],i!)]: od;
%p A170826 RETURN(b);
%p A170826 end:
%p A170826 A170826 := proc(n): gcd(n^2, n!) end: seq(A170826(n), n=1..54); # _Johannes W. Meijer_, Jun 04 2016
%t A170826 Table[GCD[n^2, n!], {n, 54}] (* _Michael De Vlieger_, Jun 05 2016 *)
%o A170826 (PARI) a(n)=if(isprime(n),n,if(n==4,8,n^2)) \\ _Charles R Greathouse IV_, Feb 01 2013
%Y A170826 Cf. A010051, A092043.
%K A170826 nonn,easy
%O A170826 1,2
%A A170826 _N. J. A. Sloane_, Dec 27 2009