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.

A117862 Number of palindromes (in base 3) below 3^n.

This page as a plain text file.
%I A117862 #24 Oct 19 2021 10:46:09
%S A117862 0,2,4,10,16,34,52,106,160,322,484,970,1456,2914,4372,8746,13120,
%T A117862 26242,39364,78730,118096,236194,354292,708586,1062880,2125762,
%U A117862 3188644,6377290,9565936,19131874,28697812,57395626,86093440,172186882,258280324,516560650,774840976
%N A117862 Number of palindromes (in base 3) below 3^n.
%H A117862 G. C. Greubel, <a href="/A117862/b117862.txt">Table of n, a(n) for n = 0..1000</a>
%H A117862 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3).
%F A117862 a(n) = 4*3^((n-1)/2)-2 (n odd), 2*3^(n/2)-2 (n even).
%F A117862 G.f.: 2*x*(x+1) / ((x-1)*(3*x^2-1)). - _Colin Barker_, Feb 15 2013
%t A117862 Table[If[OddQ[n], 4*3^((n - 1)/2) - 2, 2*3^(n/2) - 2], {n,25}] (* or *) LinearRecurrence[{1,3,-3},{2, 4, 10},25] (* _G. C. Greubel_, Oct 27 2016 *)
%o A117862 (PARI) apply( {A117862(n)=3^(n\2)<<(1+n%2)-2}, [0..44]) \\ _M. F. Hasler_, Jul 28 2021
%Y A117862 Cf. A050250.
%K A117862 nonn,base,easy
%O A117862 0,2
%A A117862 _Martin Renner_, May 02 2006
%E A117862 More terms from _Colin Barker_, Feb 15 2013
%E A117862 Extended to offset 0 by _M. F. Hasler_, Jul 28 2021