login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271427 a(n) = 7^n - a(n-1) for n>0, a(0)=0. 1
0, 7, 42, 301, 2100, 14707, 102942, 720601, 5044200, 35309407, 247165842, 1730160901, 12111126300, 84777884107, 593445188742, 4154116321201, 29078814248400, 203551699738807, 1424861898171642, 9974033287201501, 69818233010410500, 488727631072873507, 3421093417510114542 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

In general, the ordinary generating function for the recurrence b(n) = k^n - b(n-1), where n>0 and b(0)=0, is k*x/((1 + x)*(1 - k*x)). This recurrence gives the closed form b(n) = k*(k^n - (-1)^n))/(k + 1).

LINKS

Table of n, a(n) for n=0..22.

Index entries for linear recurrences with constant coefficients, signature (6,7).

FORMULA

O.g.f.: 7*x/(1 - 6*x - 7*x^2).

E.g.f.: (7/8)*(exp(7*x) - exp(-x)).

a(n) = 6*a(n-1) + 7*a(n-2).

a(n) = 7*(7^n - (-1)^n)/8.

a(n) = 7*A015552(n).

Sum_{n>0} 1/(a(n) + a(n-1)) = 1/6 = A020793.

Lim_(n->infinity} a(n-1)/a(n) = 1/7 = A020806.

EXAMPLE

a(2) = 7^2 - a(2-1) = 49 - 7 = 42.

a(4) = 7^4 - a(4-1) = 2401 - 301 = 2100.

MATHEMATICA

LinearRecurrence[{6, 7}, {0, 7}, 30]

Table[7 (7^n - (-1)^n)/8, {n, 0, 30}]

PROG

(PARI) vector(50, n, n--; 7*(7^n-(-1)^n)/8) \\ Altug Alkan, Apr 13 2016

(Python) for n in xrange(0, 10**2):print((int)((7*(7**n-(-1)**n))/8))

# Soumil Mandal, Apr 14 2016

CROSSREFS

Cf. A000420, A015552.

Cf. similar sequences with the recurrence b(n) = k^n - b(n-1): A125122 (k=1), A078008 (k=2), A054878 (k=3), A109499 (k=4), A109500 (k=5), A109501 (k=6), this sequence (k=7), A093134 (k=8), A001099 (k=n).

Sequence in context: A221794 A187246 A278152 * A073506 A025593 A218124

Adjacent sequences:  A271424 A271425 A271426 * A271428 A271429 A271430

KEYWORD

nonn,easy

AUTHOR

Ilya Gutkovskiy, Apr 13 2016

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 18 05:48 EST 2018. Contains 299298 sequences. (Running on oeis4.)