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.

A047239 Numbers that are congruent to {1, 2} (mod 6).

This page as a plain text file.
%I A047239 #47 Feb 12 2022 23:47:13
%S A047239 1,2,7,8,13,14,19,20,25,26,31,32,37,38,43,44,49,50,55,56,61,62,67,68,
%T A047239 73,74,79,80,85,86,91,92,97,98,103,104,109,110,115,116,121,122,127,
%U A047239 128,133,134,139,140,145,146,151
%N A047239 Numbers that are congruent to {1, 2} (mod 6).
%C A047239 If a(n) is the n-th Towers of Hanoi move, the smallest disc (#1) is on peg C. If n == (3,4) (mod 6), disc #1 is on peg B; and if n == (0,5) (mod 6) disc #1 is on peg A. Disc #1 moves every 1,3,5,7,...-th move in a rotational cycle CBACBACBA such that it's on peg C the first TOH move and stays there for the 2nd move (in which case disc #2 moves). Therefore disc #1 is on peg C in moves (1, 2, 7, 8, 13, ...). - _Gary W. Adamson_, Jun 22 2012
%C A047239 Conjecture: a(n) is the least positive integer > a(n-1) that is not equal to a(i) + a(j) + a(k) for any i <= j <= k <= n. - _Clark Kimberling_, Oct 09 2019
%H A047239 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A047239 a(n) = 3*(n-1) - (-1)^n. - _Rolf Pleisch_, Aug 04 2009
%F A047239 a(n) = 6*n - a(n-1) - 9 (with a(1)=1). - _Vincenzo Librandi_, Aug 05 2010
%F A047239 G.f. x*(1+x+4*x^2) / ( (1+x)*(x-1)^2 ). - _R. J. Mathar_, Oct 08 2011
%F A047239 a(n) = a(n-1) + a(n-2) - a(n-3) with a(1)=1, a(2)=2, a(3)=7. - _Harvey P. Dale_, Nov 23 2011
%F A047239 E.g.f.: 4 + 3*exp(x)*(x - 1) - exp(-x). - _Stefano Spezia_, Oct 09 2019
%F A047239 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/18 + log(2)/3. - _Amiram Eldar_, Dec 13 2021
%t A047239 Select[Range[200],MemberQ[{1,2},Mod[#,6]]&] (* or *) LinearRecurrence[ {1,1,-1},{1,2,7},80] (* _Harvey P. Dale_, Nov 23 2011 *)
%Y A047239 Cf. A047264.
%K A047239 nonn
%O A047239 1,2
%A A047239 _N. J. A. Sloane_