The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A158570 A007814((2n-1)!!+1) 1

%I

%S 1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,

%T 4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,

%U 1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1,2,4,1,1,2,5,1,1

%N A007814((2n-1)!!+1)

%C It is a periodic sequence of period 8.

%C Also the decimal expansion of the constant 124112510/99999999. [From _R. J. Mathar_, Apr 02 2009]

%C Terms of the simple continued fraction of 399/[5*sqrt(5595)-99]. [From _Paolo P. Lava_, Aug 05 2009]

%F a(n)=1, if n==0,1,4,5 mod 8; a(n)=2, if n==2,6 mod 8; a(n)=4, if n==3 mod 8; a(n)=5, if n==7 mod 8.

%F G.f.: -x*(1+2*x+4*x^2+x^3+x^4+2*x^5+5*x^6+x^7)/((x-1)*(1+x)*(x^2+1)*(x^4+1)) [From _R. J. Mathar_, Apr 02 2009]

%F a(n)=(1/224)*{17*(n mod 8)+129*[(n+1) mod 8]-67*[(n+2) mod 8]-11*[(n+3) mod 8]+17*[(n+4) mod 8]+101*[(n+5) mod 8]-39*[(n+6) mod 8]-11*[(n+7) mod 8]}, with n>=0 [From _Paolo P. Lava_, Mar 30 2009]

%t Table[Which[Mod[n,8]==7,5,Mod[n,8]==3,4,MemberQ[{2,6},Mod[n,8]],2,True,1],{n,120}] (* or *) PadRight[{},120,{1,2,4,1,1,2,5,1}] (* _Harvey P. Dale_, May 05 2020 *)

%Y A007814, A001147

%K nonn

%O 1,2

%A _Vladimir Shevelev_, Mar 21 2009

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

Last modified June 13 05:31 EDT 2021. Contains 344981 sequences. (Running on oeis4.)