login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010883 Simple periodic sequence: repeat 1,2,3,4. 9
1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Partial sums are given by A130482(n) + n + 1. - Hieronymus Fischer, Jun 08 2007
1234/9999 = 0.123412341234... - Eric Desbiaux, Nov 03 2008
LINKS
FORMULA
a(n) = 1 + (n mod 4). - Paolo P. Lava, Nov 21 2006
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010873(n) + 1.
Also a(n) = (1/2)*(5 - (-1)^n - 2*(-1)^((2n - 1 + (-1)^n)/4))).
G.f.: g(x) = (4*x^3 + 3*x^2 + 2*x + 1)/(1 - x^4) = (4*x^5 - 5*x^4 + 1)/((1 - x^4)*(1-x)^2). (End)
a(n) = 5/2 - cos(Pi*n/2) - sin(Pi*n/2) - (-1)^n/2. - R. J. Mathar, Oct 08 2011
MATHEMATICA
PadRight[{}, 120, {1, 2, 3, 4}] (* Harvey P. Dale, Aug 02 2016 *)
PROG
(PARI) a(n)=(n-1)%4+1 \\ Charles R Greathouse IV, Jun 11 2015
(Python)
def A010883(n): return 1 + (n & 3) # Chai Wah Wu, May 25 2022
CROSSREFS
Cf. A177037 (decimal expansion of (9+2*sqrt(39))/15). - Klaus Brockhaus, May 01 2010
Sequence in context: A171171 A159957 A053840 * A011542 A260688 A053344
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)