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.

A069705 a(n) = 2^n mod 7.

Original entry on oeis.org

1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4, 1, 2, 4
Offset: 0

Views

Author

Jon Perry, Jan 14 2003

Keywords

Comments

Periodic sequence with period [1,2,4]. - Philippe Deléham, Sep 25 2006
From Klaus Brockhaus, May 23 2010: (Start)
Continued fraction expansion of (11 + sqrt(229))/18.
Decimal expansion of 124/999. (End)

Examples

			a(4)=16 mod 7=2, a(5)=32 mod 7=4, a(6)=64 mod 7=1.
		

Crossrefs

Cf. A178233 (decimal expansion of (11+sqrt(229))/18).

Programs

Formula

n=0 mod 3 -> a(n)=1 n=1 mod 3 -> a(n)=2 n=2 mod 3 -> a(n)=4.
a(n) = 2^(n mod 3). - Paul Barry, Oct 06 2003
a(n) = cubefree part of 2^n = A000079(A050985(n)). - Artur Jasinski, Oct 15 2008
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-3).
G.f.: (1+2*x+4*x^2)/((1-x) * (1+x+x^2)). (End)
a(n) = (7+5*cos(2*(n+1)*Pi/3)-sqrt(3)*sin(2*(n+1)*Pi/3))/3. - Wesley Ivan Hurt, Oct 01 2017
From Nicolas Bělohoubek, Nov 11 2021: (Start)
a(n) = 8/(a(n-2)*a(n-1)).
a(n) = 7 - a(n-2) - a(n-1). See also A052901 or A144437. (End)
a(n) = n + 1 + floor((n+1)/3) - 4*floor(n/3). - Ridouane Oudra, Sep 25 2024
E.g.f.: (7*exp(x) - 2*exp(-x/2)*(2*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Sep 27 2024