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.

A089128 a(n) = gcd(6,n).

This page as a plain text file.
%I A089128 #42 Dec 14 2023 05:15:48
%S A089128 6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,
%T A089128 2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,
%U A089128 2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2,1,6,1,2,3,2
%N A089128 a(n) = gcd(6,n).
%C A089128 Also greatest common divisor of n^2-6 and n^2+6.
%C A089128 The second term of sequences of this type for n=0,1,2... form the sequence 1,2,1,2,1,... in decimal 0.1212121212... = 4/33.
%C A089128 Multiplicative with a(p^e) = GCD(p^e, 6). - _David W. Wilson_, Jun 12 2005
%C A089128 From _Jaroslav Krizek_, May 27 2010: (Start)
%C A089128 a(n) = denominators of averages of squares of the first n positive integers for n >= 1.
%C A089128 a(n) is periodic sequence with period (6, 1, 2, 3, 2, 1).
%C A089128 See A175485 - numerators of averages of squares of the first n positive integers.
%C A089128 a(n) = A175485(n) * n / A000330(n).
%C A089128 For n = 337 holds: a(n) = 1 and simultaneously A175485(n) is square ( = 38025 = 195^2), i.e., the number k = 195 is quadratic mean (root mean square) of the first 337 positive integers. There are other such numbers - see A084231 and A084232.
%C A089128 Sqrt(A175485(n) / a(n)) for n >= 1 is the harmonic mean of the first n positive integers. (End)
%H A089128 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1)
%F A089128 a(n) = 1 + [2|n] + 2*[3|n] + 2*[6|n] = (15 + 5*(-1)^n + 4*cos(n*Pi/3) + 12*cos(n*2*Pi/3))/6, where [x|y] is 1 if x divides y, 0 otherwise. - _Mitch Harris_ Jun 15 2005
%F A089128 From _R. J. Mathar_, Apr 04 2011: (Start)
%F A089128 Dirichlet g.f.: zeta(s)*(1+1/2^s+2/3^s+2/6^s).
%F A089128 G.f.: (-6 - x - 2*x^2 - 3*x^3 - 2*x^4 - x^5) / ((x-1)*(1+x)*(1 + x + x^2)*(x^2 - x + 1)). (End)
%F A089128 a(n) = ((n-1) mod 2 + 1)*( 2*floor(((n-1) mod 3)/2) + 1). - _Gary Detlefs_, Dec 28 2011
%t A089128 GCD[Range[0,110],6] (* or *) PadRight[{},110,{6,1,2,3,2,1}] (* _Harvey P. Dale_, Dec 26 2018 *)
%o A089128 (PARI) g(n) = for(x=0,n,print1(gcd(x^2-6,x^2+6)","))
%o A089128 (Haskell)
%o A089128 a089128 = gcd 6  -- _Reinhard Zumkeller_, Apr 06 2015
%K A089128 easy,nonn,mult
%O A089128 0,1
%A A089128 _Cino Hilliard_, Dec 05 2003
%E A089128 Name changed, using _David W. Wilson_'s formula, by _Franklin T. Adams-Watters_, May 16 2018