The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A048328 Numbers that are repdigits in base 3. 7
 0, 1, 2, 4, 8, 13, 26, 40, 80, 121, 242, 364, 728, 1093, 2186, 3280, 6560, 9841, 19682, 29524, 59048, 88573, 177146, 265720, 531440, 797161, 1594322, 2391484, 4782968, 7174453, 14348906, 21523360, 43046720, 64570081, 129140162, 193710244 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Case for base 2 see A000225: 2^n - 1. If the sequence b(n) represents the number of paths of length n, n >= 1, starting at node 1 and ending at nodes 1, 2, 3 and 4 on the path graph P_5 then a(n-1) = b(n) - 1. - Johannes W. Meijer, May 29 2010 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 Eric Weisstein's World of Mathematics, Repdigit Index entries for linear recurrences with constant coefficients, signature (0,4,0,-3). FORMULA G.f.: (2*x^2+x)/(1-4*x^2+3*x^4). - Alois P. Heinz, Sep 23 2012 MAPLE nmax := 35; a(0) := 0: for n from 1 to nmax do a(2*n) := a(2*n-2) + 2*3^(n-1); od: a(1) := 1: for n from 1 to nmax do a(2*n+1) := 1*a(2*n-1) + 3^n; od: seq(a(n), n=0..nmax); # End program 1 with(GraphTheory): G := PathGraph(5): A:= AdjacencyMatrix(G): nmax := nmax; for n from 1 to nmax+1 do B(n) := A^n; b(n) := add(B(n)[1, k], k=1..4); a1(n-1) := b(n)-1; od: seq(a1(n), n=0..nmax); # End program 2 # From Johannes W. Meijer, May 29 2010, revised Sep 23 2012 # third Maple program a:= n->(<<0|1>, <-3|4>>^iquo(n, 2, 'r').`if`(r=0, <<0, 2>>, <<1, 4>>))[1, 1]: seq (a(n), n=0..60);  # Alois P. Heinz, Sep 23 2012 MATHEMATICA Rest[FromDigits[#, 3]&/@Flatten[Table[{PadRight[{1}, n, 1], PadRight[{2}, n, 2]}, {n, 0, 20}], 1]] (* Harvey P. Dale, Feb 03 2011 *) PROG (PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -3, 0, 4, 0]^n*[0; 1; 2; 4])[1, 1] \\ Charles R Greathouse IV, Oct 07 2015 CROSSREFS Bisections: A024023 and A003462. Cf. A010785, A033016, A028987, A028988, A038754, A068911, A124302. Sequence in context: A043799 A043807 A043816 * A094767 A263292 A026643 Adjacent sequences:  A048325 A048326 A048327 * A048329 A048330 A048331 KEYWORD nonn,base,easy AUTHOR Patrick De Geest, Feb 15 1999 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 13 02:09 EDT 2020. Contains 336441 sequences. (Running on oeis4.)