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 A182751 #35 Jan 10 2025 04:30:36 %S A182751 1,3,6,9,18,27,54,81,162,243,486,729,1458,2187,4374,6561,13122,19683, %T A182751 39366,59049,118098,177147,354294,531441,1062882,1594323,3188646, %U A182751 4782969,9565938,14348907,28697814,43046721,86093442,129140163,258280326,387420489 %N A182751 a(1)=1, a(2)=3, a(3)=6; a(n) = 3*a(n-2) for n > 3. %C A182751 For n >= 3: a(n) = the smallest number > a(n-1) such that ((a(n-2) + a(n-1))*(a(n-2) + a(n))*(a(n-1) + a(n)))/(a(n-2)*a(n-1)*a(n)) is an integer (= 10 for n >= 4). %C A182751 Number of necklaces with n-1 beads and 3 colors that are the same when turned over and hence have reflection symmetry. Example: For n=4 there are 9 necklaces with the colors A, B and C: AAA, AAB, AAC, ABB, ACC, BBB, BBC, BCC, CCC. The only necklaces without reflection symmetry are ABC and ACB. - _Herbert Kociemba_, Nov 24 2016 %H A182751 Harvey P. Dale, <a href="/A182751/b182751.txt">Table of n, a(n) for n = 1..1000</a> %H A182751 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,3). %F A182751 a(n) = A038754(n) for n >= 2. %F A182751 a(2*k) = (3/2)*a(2*k-1) for k >= 2, a(2*k+1) = 2*a(2*k). %F A182751 G.f.: x*(1 + 3*x + 3*x^2)/(1 - 3*x^2). - _Herbert Kociemba_, Nov 24 2016 %e A182751 For n = 5; a(3) = 6, a(4) = 9, a(5) = 18 before ((6+9)*(6+18)*(9+18)) / (6*9*18) = 10. %t A182751 Join[{1},RecurrenceTable[{a[2]==3,a[3]==6,a[n]==3a[n-2]},a[n],{n,50}]] (* or *) Transpose[NestList[{#[[2]],#[[3]],3#[[2]]}&,{1,3,6},49]][[1]] (* _Harvey P. Dale_, Oct 19 2011 *) %t A182751 Rest@ CoefficientList[Series[x (1 + 3 x + 3 x^2)/(1 - 3 x^2), {x, 0, 34}], x] (* _Michael De Vlieger_, Nov 24 2016 *) %t A182751 Join[{1}, LinearRecurrence[{0, 3}, {3, 6}, 30]] (* _Vincenzo Librandi_, Nov 25 2016 *) %o A182751 (PARI) x='x+O('x^30); Vec(x*(1+3*x+3*x^2)/(1-3*x^2)) \\ _G. C. Greubel_, Jan 11 2018 %o A182751 (Magma) I:=[3,6]; [1] cat [n le 2 select I[n] else 3*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Jan 11 2018 %Y A182751 Essentially the same as A038754 (cf. formula). %Y A182751 Cf. A182752 - A182757. %K A182751 nonn,easy,less %O A182751 1,2 %A A182751 _Jaroslav Krizek_, Nov 27 2010