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.

A276508 a(n) = (2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6.

This page as a plain text file.
%I A276508 #13 Feb 16 2025 08:33:36
%S A276508 0,2,9,42,208,1041,5208,26042,130209,651042,3255208,16276041,81380208,
%T A276508 406901042,2034505209,10172526042,50862630208,254313151041,
%U A276508 1271565755208,6357828776042,31789143880209,158945719401042,794728597005208,3973642985026041,19868214925130208,99341074625651042
%N A276508 a(n) = (2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6.
%C A276508 Number of 1’s in substitution system {1 -> 12321, 2 -> 23132, 3 -> 31213} at step n from initial string "3" (see example). Number of 2’s: A000351(n) - A010892(n+1) - 2*a(n). Number of 3’s: A010892(n+1) + a(n).
%C A276508 Excluding zero, convolution of A000351 and A174737.
%H A276508 Ilya Gutkovskiy, <a href="/A276508/a276508.pdf">Illustration (substitution system {1 -> 12321, 2 -> 23132, 3 -> 31213})</a>
%H A276508 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SubstitutionSystem.html">Substitution System</a>
%H A276508 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-6,5)
%F A276508 O.g.f.: x*(2 - 3*x)/((1 - 5 x)*(1 - x + x^2)).
%F A276508 E.g.f.: (exp(9*x/2) - 2*sin(Pi/6-sqrt(3)*x/2))*exp(x/2)/3.
%F A276508 a(n) = 6*a(n-1) - 6*a(n-2) + 5*a(n-3).
%F A276508 a(n) = (5^n + sqrt(3)*sin(Pi*n/3) - cos(Pi*n/3))/3.
%F A276508 a(n) = (A020729(n) + A057079(n-1))/3.
%e A276508 Evolution from initial string "3": 3 -> 31213 -> 3121312321231321232131213 -> ...
%e A276508 Therefore, number of 1’s at step n:
%e A276508 a(0) = 0;
%e A276508 a(1) = 2;
%e A276508 a(2) = 9, etc.
%p A276508 A276508:=n->(2*5^n + 3*(-1)^(floor((n-1)/3)) + (-1)^n)/6: seq(A276508(n), n=0..30); # _Wesley Ivan Hurt_, Sep 07 2016
%t A276508 Table[(2 5^n + 3 (-1)^Floor[(n - 1)/3] + (-1)^n)/6, {n, 0, 25}]
%t A276508 LinearRecurrence[{6, -6, 5}, {0, 2, 9}, 26]
%o A276508 (PARI) concat(0, Vec(x*(2-3*x)/((1-5*x)*(1-x+x^2)) + O(x^99))) \\ _Altug Alkan_, Sep 06 2016
%Y A276508 Cf. A000351, A010892, A020729, A057079, A174737.
%K A276508 nonn,easy
%O A276508 0,2
%A A276508 _Ilya Gutkovskiy_, Sep 06 2016