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 A182522 #101 Jun 04 2025 16:24:32 %S A182522 1,1,2,3,6,9,18,27,54,81,162,243,486,729,1458,2187,4374,6561,13122, %T A182522 19683,39366,59049,118098,177147,354294,531441,1062882,1594323, %U A182522 3188646,4782969,9565938,14348907,28697814,43046721,86093442,129140163,258280326,387420489 %N A182522 a(0) = 1; thereafter a(2*n + 1) = 3^n, a(2*n + 2) = 2 * 3^n. %C A182522 Row sums of triangle in A123149. - _Philippe Deléham_, May 04 2012 %C A182522 This is simply the classic sequence A038754 prefixed by a 1. - _N. J. A. Sloane_, Nov 23 2017 %C A182522 Binomial transform is A057960. %C A182522 Range of row n of the circular Pascal array of order 6. - _Shaun V. Ault_, May 30 2014 %C A182522 a(n) is also the number of achiral color patterns in a row or cycle of length n using three or fewer colors. Two color patterns are the same if we permute the colors, so ABCAB=BACBA. For a cycle, we can rotate the colors, so ABCAB=CABAB. A row is achiral if it is the same as some color permutation of its reverse. Thus the reversal of ABCAB is BACBA, which is equivalent to ABCAB when we permute A and B. A cycle is achiral if it is the same as some rotation of some color permutation of its reverse. Thus CABAB reversed is BABAC. We can permute A and B to get ABABC and then rotate to get CABAB, so CABAB is achiral. It is interesting that the number of achiral color patterns is the same for rows and cycles. - _Robert A. Russell_, Mar 10 2018 %C A182522 Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 0. - _Sean A. Irvine_, Jun 03 2025 %H A182522 G. C. Greubel, <a href="/A182522/b182522.txt">Table of n, a(n) for n = 0..1000</a> %H A182522 Shaun V. Ault and Charles Kicey, <a href="http://arxiv.org/abs/1407.2197">Counting paths in corridors using circular Pascal arrays</a>, arXiv:1407.2197 [math.CO], 2014. %H A182522 Shaun V. Ault and Charles Kicey, <a href="http://dx.doi.org/10.1016/j.disc.2014.05.020">Counting paths in corridors using circular Pascal arrays</a>, Discrete Mathematics, Volume 332, October 2014, Pages 45-54. %H A182522 Daniel Birmajer, Juan B. Gil, Jordan O. Tirrell, and Michael D. Weiner, <a href="https://arxiv.org/abs/2306.03155">Pattern-avoiding stabilized-interval-free permutations</a>, arXiv:2306.03155 [math.CO], 2023. %H A182522 Johann Cigler, <a href="http://arxiv.org/abs/1501.04750">Some remarks and conjectures related to lattice paths in strips along the x-axis</a>, arXiv:1501.04750 [math.CO], 2015-2016. %H A182522 Johann Cigler, <a href="https://arxiv.org/abs/2212.02118">Recurrences for certain sequences of binomial sums in terms of (generalized) Fibonacci and Lucas polynomials</a>, arXiv:2212.02118 [math.NT], 2022. %H A182522 Sean A. Irvine, <a href="https://oeis.org/wiki/User:Sean_A._Irvine/Walks_on_Graphs#5_vertices">Walks on Graphs</a>. %H A182522 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,3). %F A182522 G.f.: (1 + x - x^2) / (1 - 3*x^2). %F A182522 Expansion of 1 / (1 - x / (1 - x / (1 + x / (1 + x)))) in powers of x. %F A182522 a(n+1) = A038754(n). %F A182522 a(n) = Sum_{k=0..n} A123149(n,k). - _Philippe Deléham_, May 04 2012 %F A182522 a(n) = (3-(1+(-1)^n)*(3-2*sqrt(3))/2)*sqrt(3)^(n-3) for n>0, a(0)=1. - _Bruno Berselli_, Mar 19 2013 %F A182522 a(0) = 1, a(1) = 1, a(n) = a(n-1) + a(n-2) if n is odd, and a(n) = a(n-1) + a(n-2) + a(n-3) if n is even. - _Jon Perry_, Mar 19 2013 %F A182522 For odd n = 2m-1, a(2m-1) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A140735; for even n = 2m, a(2m) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A293181. - _Robert A. Russell_, Mar 10 2018 %F A182522 From _Robert A. Russell_, Oct 21 2018: (Start) %F A182522 a(2m) = S2(m+3,3) - 4*S2(m+2,3) + 5*S2(m+1,3) - 2*S2(m,3). %F A182522 a(2m-1) = S2(m+2,3) - 3*S2(m+1,3) + 2*S2(m,3), where S2(n,k) is the Stirling subset number A008277. %F A182522 a(n) = 2*A001998(n-1) - A124302(n) = A124302(n) - 2*A107767(n-1) = A001998(n-1) - A107767(n-1). %F A182522 a(n) = 2*A056353(n) - A002076(n) = A002076(n) - 2*A320743(n) = A056353(n) - A320743(n). %F A182522 a(n) = A057427(n) + A052551(n-2) + A304973(n). (End) %e A182522 G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 9*x^5 + 18*x^6 + 27*x^7 + 54*x^8 + ... %e A182522 From _Robert A. Russell_, Mar 10 2018: (Start) %e A182522 For a(4) = 6, the achiral color patterns for rows are AAAA, AABB, ABAB, ABBA, ABBC, and ABCA. Note that for cycles AABB=ABBA and ABBC=ABCA. The achiral patterns for cycles are AAAA, AAAB, AABB, ABAB, ABAC, and ABBC. Note that AAAB and ABAC are not achiral rows. %e A182522 For a(5) = 9, the achiral color patterns (for both rows and cycles) are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, and ABCBA. (End) %t A182522 Join[{1}, RecurrenceTable[{a[1]==1, a[2]==2, a[n]==3 a[n-2]}, a, {n, 40}]] (* _Bruno Berselli_, Mar 19 2013 *) %t A182522 CoefficientList[Series[(1+x-x^2)/(1-3*x^2), {x,0,50}], x] (* _G. C. Greubel_, Apr 14 2017 *) %t A182522 Table[If[EvenQ[n], StirlingS2[(n+6)/2,3] - 4 StirlingS2[(n+4)/2,3] + 5 StirlingS2[(n+2)/2,3] - 2 StirlingS2[n/2,3], StirlingS2[(n+5)/2,3] - 3 StirlingS2[(n+3)/2,3] + 2 StirlingS2[(n+1)/2,3]], {n,0,40}] (* _Robert A. Russell_, Oct 21 2018 *) %t A182522 Join[{1},Table[If[EvenQ[n], 2 3^((n-2)/2), 3^((n-1)/2)],{n,40}]] (* _Robert A. Russell_, Oct 28 2018 *) %o A182522 (PARI) {a(n) = if( n<1, n==0, n--; (n%2 + 1) * 3^(n \ 2))} %o A182522 (Magma) I:=[1,1,2]; [n le 3 select I[n] else 3*Self(n-2): n in [1..40]]; // _Bruno Berselli_, Mar 19 2013 %o A182522 (Maxima) makelist(if n=0 then 1 else (1+mod(n-1,2))*3^floor((n-1)/2), n, 0, 40); /* _Bruno Berselli_, Mar 19 2013 */ %o A182522 (PARI) my(x='x+O('x^50)); Vec((1+x-x^2)/(1-3*x^2)) \\ _G. C. Greubel_, Apr 14 2017 %o A182522 (SageMath) %o A182522 def A182522(n): return (3 -(3-2*sqrt(3))*((n+1)%2))*3^((n-3)/2) + int(n==0)/3 %o A182522 [A182522(n) for n in range(41)] # _G. C. Greubel_, Jul 17 2023 %Y A182522 Cf. A038754 (essentially the same sequence). %Y A182522 Cf. A008277, A052551, A057427, A057960. %Y A182522 Cf. A123149, A140735, A293181, A304973. %Y A182522 Also row sums of triangle in A169623. %Y A182522 Column 3 of A305749. %Y A182522 Cf. A124302 (oriented), A001998 (unoriented), A107767 (chiral), for rows, varying offsets. %Y A182522 Cf. A002076 (oriented), A056353 (unoriented), A320743 (chiral), for cycles. %K A182522 nonn,easy %O A182522 0,3 %A A182522 _Michael Somos_, May 03 2012 %E A182522 Edited by _Bruno Berselli_, Mar 19 2013 %E A182522 Definition simplified by _N. J. A. Sloane_, Nov 23 2017