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.
%I A093178 #80 Dec 06 2024 07:02:29 %S A093178 1,1,1,3,1,5,1,7,1,9,1,11,1,13,1,15,1,17,1,19,1,21,1,23,1,25,1,27,1, %T A093178 29,1,31,1,33,1,35,1,37,1,39,1,41,1,43,1,45,1,47,1,49,1,51,1,53,1,55, %U A093178 1,57,1,59,1,61,1,63,1,65,1,67,1,69,1,71,1,73,1,75,1,77,1,79,1,81,1,83,1,85 %N A093178 If n is even then 1, otherwise n. %C A093178 Continued fraction expansion for tan(1). %C A093178 1 followed by run lengths of A062557 = 2n-1 1's followed by a 2. - _Jeremy Gardiner_, Aug 12 2012 %C A093178 Greatest common divisor of n and (n+1) mod 2. - _Bruno Berselli_, Mar 07 2017 %H A093178 Harry J. Smith, <a href="/A093178/b093178.txt">Table of n, a(n) for n = 0..20000</a> %H A093178 D. H. Lehmer, <a href="/A016825/a016825.pdf">Continued fractions containing arithmetic progressions</a>, Scripta Mathematica, 29 (1973): 17-24. [Annotated copy of offprint] %H A093178 Simon Plouffe, <a href="https://vixra.org/pdf/1409.0099v1.pdf">A Search for a mathematical expression for mass ratios using a large database</a>. page 3. %H A093178 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a> %H A093178 <a href="/index/Con#confC">Index entries for continued fractions for constants</a> %H A093178 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a> %H A093178 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A093178 G.f.: (1+x-x^2+x^3)/(1-x^2)^2. %F A093178 a(n) = (-1)^n * a(-n) for all n in Z. %F A093178 a(n) = (1/2) * [ 1 + n + (1-n)*(-1)^n ]. - _Ralf Stephan_, Dec 02 2004 %F A093178 a(n) = n^n mod (n+1) for n > 0. - _Amarnath Murthy_, Apr 18 2004 %F A093178 Satisfies a(0) = 1, a(n+1) = a(n) + n if a(n) < n else a(n+1) = a(n)/n. - _Amarnath Murthy_, Oct 29 2002 %F A093178 a(n) = ((n+1)+(1-n)(-1)^n)/2 and have e.g.f. (1+x)cosh(x). - _Paul Barry_, Apr 09 2003 %F A093178 a(n) = binomial(n, 2*floor(n/2)). - _Paul Barry_, Dec 28 2006 %F A093178 Starting (1, 1, 3, 1, 5, 1, 7, ...) = A133080^(-1) * [1,2,3,...]. - _Gary W. Adamson_, Sep 08 2007 %F A093178 a(n) = denom(b(n+2)/b(n+1)) with b(n) = product((2*n-3-2*k), k=0..floor(n/2-1)). - _Johannes W. Meijer_, Jun 18 2009 %F A093178 a(n) = 2*floor(n/2) - n*(n-1 mod 2) + 1. - _Wesley Ivan Hurt_, Oct 19 2013 %F A093178 a(n) = n^(n mod 2). - _Wesley Ivan Hurt_, Apr 16 2014 %e A093178 1.557407724654902230506974807... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...)))) %e A093178 G.f. = 1 + x + x^2 + 3*x^3 + x^4 + 5*x^5 + x^6 + 7*x^7 + x^8 + 9*x^9 + x^10 + ... %p A093178 A093178:=n->(n+1+(1-n)*(-1)^n)/2; seq(A093178(k), k=0..100); # _Wesley Ivan Hurt_, Oct 19 2013 %t A093178 Join[{1},Riffle[Range[1,85,2],1]] (* or *) Array[If[EvenQ[#],1,#]&,87,0] (* _Harvey P. Dale_, Nov 23 2011 *) %o A093178 (PARI) {a(n) = if( n%2, n, 1)}; %Y A093178 Equals |A009001(n)|. %Y A093178 Cf. A133080, A049471 (decimal expansion), A009001, A161738, A062557, A124625. %K A093178 nonn,easy %O A093178 0,4 %A A093178 _Michael Somos_, Mar 27 2004