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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A102877 a(0) = 1, a(1) = 1; for n>0, a(2*n) = 3*a(2n-1), a(2*n+1) = 3*a(2*n) - 2*a(n-1). 2
1, 1, 3, 7, 21, 61, 183, 543, 1629, 4873, 14619, 43815, 131445, 394213, 1182639, 3547551, 10642653, 31926873, 95780619, 287338599, 862015797, 2586037645, 7758112935, 23274309567, 69822928701, 209468698473, 628406095419 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

The sequence of first differences of these numbers (2, 4, 14, 40 ...), divided by 2, is (1, 2, 7, 20, ...) - see A111017. This is close to the original sequence.

..... 1, 1, 3, 7, 21, 61, 183, 543, 1629, 4873, 14619

........ 1, 2, 7, 20, 61, 180, 543, 1622, 4873, 14598

....... 2=3-1, 20=21-1, 180=183-3, 1622=1629-7, 14598=14619-21.

LINKS

Robert Israel, Table of n, a(n) for n = 0..2095

FORMULA

G.f. g(z) satisfies g(z) = 1 - 2*z + 3*z*g(z) - 2*z^3*g(z^2). - Robert Israel, Jun 29 2020

MAPLE

f:= proc(n) option remember; if n::even then 3*procname(n-1) else 3*procname(n-1)-2*procname((n-3)/2) fi end proc:

f(0):= 1: f(1):= 1:

map(f, [$0..50]); # Robert Israel, Jun 29 2020

MATHEMATICA

a[0]:=1; a[1]:=1; a[n_]:=If[EvenQ[n], 3*a[n-1], 3*a[n-1]-2*a[(n-3)/2]]; Table[a[i], {i, 0, 50}] (* Stefan Steinerberger, May 22 2007 *)

PROG

(PARI) {m=26; v=vector(m+1); v[1]=1; v[2]=1; for(n=2, m, k=3*v[n]; if(n%2==1, k=k-2*v[(n-1)/2]); v[n+1]=k); print(v)} /* Klaus Brockhaus, May 20 2007 */

CROSSREFS

This sequence is connected with A129770 and A129772.

Sequence in context: A091486 A056779 A183113 * A122983 A005355 A182399

Adjacent sequences:  A102874 A102875 A102876 * A102878 A102879 A102880

KEYWORD

nonn

AUTHOR

Paul Curtz, May 16 2007

EXTENSIONS

More terms from Klaus Brockhaus and Stefan Steinerberger, May 20 2007

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 15 23:51 EDT 2021. Contains 343018 sequences. (Running on oeis4.)