login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A229220
a(n) = a(n-1)^2 + (-1)^n with a(1)=1.
0
1, 2, 3, 10, 99, 9802, 96079203, 9231213249115210, 85215298050640192157847853344099, 7261647021859442133580964784539140878185975659356185857298121802
OFFSET
1,2
COMMENTS
From the 4th element, the sum of the digits (modulo 9) of each term gives the sequence A000035.
FORMULA
a(n) ~ c^(2^n), where c = 1.15442119601942274770665172928641533277.... - Vaclav Kotesovec, Oct 09 2013
MAPLE
a := proc (n) if n = 1 then 1 else a(n-1)^2+(-1)^n end if end proc:
seq(a(i), i = 1 .. 10);
MATHEMATICA
RecurrenceTable[{a[n] == a[n-1]^2 + (-1)^n, a[1]==1}, a, {n, 1, 10}] (* Vaclav Kotesovec, Oct 09 2013 *)
PROG
(PARI) a(n)=if(n==1, 1, a(n-1)^2+(-1)^n) \\ Charles R Greathouse IV, Sep 16 2013
CROSSREFS
Cf. A000035.
Sequence in context: A184249 A270356 A333332 * A155148 A076927 A064647
KEYWORD
nonn
AUTHOR
Luca Finazzi, Sep 16 2013
STATUS
approved