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.

A068073 Period 4 sequence [ 1, 2, 3, 2, ...].

This page as a plain text file.
%I A068073 #47 Dec 14 2023 05:12:35
%S A068073 1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,
%T A068073 3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,
%U A068073 1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1,2,3,2,1
%N A068073 Period 4 sequence [ 1, 2, 3, 2, ...].
%C A068073 Continued fraction expansion of (2+sqrt(14))/4. - _Klaus Brockhaus_, May 01 2010
%C A068073 The sequence is like a sawtooth wave of period 4. - _Michael Somos_, Feb 13 2011
%H A068073 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).
%F A068073 G.f.: (1 + 2*x + 3*x^2 + 2*x^3) / (1 - x^4).
%F A068073 Conjecture: a(n) = Sum_{k=0..n} e^(i*Pi*(A000120(A001045(n)) - A001045(A000120(n)))), i=sqrt(-1). - _Paul Barry_, Jan 14 2005
%F A068073 From _Paul Barry_, Jan 14 2005: (Start)
%F A068073 G.f.: (1 + x + 2x^2)/(1 - x + x^2 - x^3);
%F A068073 a(n) = 2 - cos(Pi*n/2). (End)
%F A068073 Moebius transform is length 4 sequence [2, 1, 0, -2]. - _Michael Somos_, Feb 13 2011
%F A068073 a(n) = 2 - A056594(n). - _Bruno Berselli_, Mar 10 2011
%F A068073 a(n) = a(-n) = a(n+4) for all n in Z. - _Michael Somos_, Apr 17 2015
%F A068073 2 * a(n) = A164356(n) unless n=0. - _Michael Somos_, Apr 17 2015
%F A068073 G.f.: 1 / (1 - 2*x / (1 + x / (2 - 5*x / (1 + 16*x / (5 - x))))). - _Michael Somos_, Jan 20 2017
%F A068073 G.f.: 2 / (1 - x) - 1 / (1 + x^2). - _Michael Somos_, Jan 07 2019
%F A068073 a(n) = abs(((n+2) mod 4)-2) + 1. - _Daniel Jiménez_, Jan 14 2023
%e A068073 G.f. = 1 + 2*x + 3*x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 2*x^7 + x^8 + 2*x^9 + ...
%t A068073 CoefficientList[ Series[(1 + 2x + 3x^2 + 2x^3)/(1 - x^4), {x, 0, 85}], x]
%t A068073 a[ n_] := {2, 3, 2, 1}[[Mod[n, 4, 1]]]; (* _Michael Somos_, Apr 17 2015 *)
%t A068073 PadRight[{},120,{1,2,3,2}] (* _Harvey P. Dale_, Jun 13 2020 *)
%o A068073 (PARI) {a(n) = [1, 2, 3, 2] [n%4 + 1]}; /* _Michael Somos_, Feb 13 2011 */
%o A068073 (PARI) {a(n) = n%4 + 1 - 2 * (n%4 == 3)}; /* _Michael Somos_, Feb 13 2011 */
%o A068073 (PARI) {a(n) = 2 + kronecker( -4, n-1)}; /* _Michael Somos_, Feb 13 2011 */
%Y A068073 Cf. A000034, A000120, A001045, A028356, A164356.
%Y A068073 Cf. A177033 (decimal expansion of (2+sqrt(14))/4). - _Klaus Brockhaus_, May 01 2010
%K A068073 easy,nonn
%O A068073 0,2
%A A068073 _Robert G. Wilson v_, Mar 01 2002