#include <stdio.h>
//a{n}=2a_{n-1}+3, a{0}=-2(再帰無し版)
int main(void) {
int n,an;
n = 4;
an=-2;
for(int i=0;i<4;i++){
an=2*an+3;
}
printf("数列anの%d番目の値は%d\n", n
, an
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8vYXtufT0yYV97bi0xfSszLCBhezB9PS0yKOWGjeW4sOeEoeOBl+eJiCkKaW50IG1haW4odm9pZCkgewogICAgaW50IG4sYW47CiAgICBuID0gNDsKCWFuPS0yOwoJZm9yKGludCBpPTA7aTw0O2krKyl7CgkJYW49MiphbiszOwoJfQoKICAgIHByaW50Zigi5pWw5YiXYW7jga4lZOeVquebruOBruWApOOBryVkXG4iLCBuLCBhbik7CglyZXR1cm4gMDsKfQo=