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 A010684 #81 Mar 11 2025 14:02:05 %S A010684 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, %T A010684 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, %U A010684 1,3,1,3,1,3,1,3,1,3,1,3,1 %N A010684 Period 2: repeat (1,3); offset 0. %C A010684 Hankel transform is [1,-8,0,0,0,0,0,0,0,0,...]. - _Philippe Deléham_, Mar 29 2007 %C A010684 Binomial transform gives [1,4,8,16,32,64,...] (A151821(n+1)). - _Philippe Deléham_, Sep 17 2009 %C A010684 Continued fraction expansion of (3+sqrt(21))/6. - _Klaus Brockhaus_, May 04 2010 %C A010684 Positive sum of the coordinates from the image of the point (1,-2) after n 90-degree rotations about the origin. - _Wesley Ivan Hurt_, Jul 06 2013 %C A010684 This sequence can be generated by an infinite number of formulas having the form a^(b*n) mod c where a is congruent to 3 mod 4 and b is any odd number. If a is congruent to 3 mod 4 then c can be 4; if a is also congruent to 3 mod 8 then c can be 8. For example: a(n)= 15^(3*n) mod 4, a(n) = 19^(5*n) mod 4, a(n) = 19^(5*n) mod 8. - _Gary Detlefs_, May 19 2014 %C A010684 This sequence is also the unsigned periodic Schick sequence for p = 5. See the Schick reference, p. 158, for p = 5.- _Wolfdieter Lang_, Apr 03 2020 %C A010684 Digits following the decimal point when 1/3 is converted to base 5. - _Jamie Robert Creasey_, Oct 15 2021 %C A010684 Decimal expansion of 13/99. - _Stefano Spezia_, Feb 09 2025 %D A010684 Carl Schick, Trigonometrie und unterhaltsame Zahlentheorie, Bokos Druck, Zürich, 2003 (ISBN 3-9522917-0-6). Tables 3.1 to 3.10, for odd p = 3..113 (with gaps), pp. 158-166. %H A010684 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1). %F A010684 From _Paul Barry_, Apr 29 2003: (Start) %F A010684 a(n) = 2-(-1)^n. %F A010684 G.f.: (1+3x)/((1-x)(1+x)). %F A010684 E.g.f.: 2*exp(x) - exp(-x). (End) %F A010684 a(n) = 2*A153643(n) - A153643(n+1). - _Paul Curtz_, Dec 30 2008 %F A010684 a(n) = 3^(n mod 2). - _Jaume Oliver Lafont_, Mar 27 2009 %F A010684 a(n) = 7^n mod 4. - _Vincenzo Librandi_, Feb 07 2011 %F A010684 a(n) = 1 + 2*(n mod 2). - _Wesley Ivan Hurt_, Jul 06 2013 %F A010684 a(n) = A000034(n) + A000035(n). - _James Spahlinger_, Feb 14 2016 %e A010684 0.131313131313131313131313131313131313131313131... %p A010684 [seq (modp((2*n+1),4),n=0..80)]; # _Zerinvary Lajos_, Nov 30 2006 %t A010684 Table[2-(-1)^n, {n, 0, 100}] (* _Wesley Ivan Hurt_, Mar 24 2014 *) %t A010684 PadRight[{},120,{1,3}] (* _Harvey P. Dale_, Mar 11 2025 *) %o A010684 (Sage) [power_mod(3, n, 8)for n in range(0, 81)] # _Zerinvary Lajos_, Nov 24 2009 %o A010684 (PARI) a(n)=1+n%2*2 \\ _Charles R Greathouse IV_, Dec 28 2011 %o A010684 (Python) %o A010684 def A010684(n): return 3 if n&1 else 1 # _Chai Wah Wu_, Jan 17 2023 %Y A010684 Cf. A112030, A112033, A176014 (decimal expansion of (3+sqrt(21))/6). %K A010684 nonn,cons,easy %O A010684 0,2 %A A010684 _N. J. A. Sloane_