OFFSET
0,3
COMMENTS
a(22) has 46 digits.
REFERENCES
Seen on a quiz.
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..36
FORMULA
a(1+3k) = A004019(k+1), a(2+3k) = A004019(k+1)+2, a(3+3k) = A004019(k+1)+1, k>=0. - Yuriy Sibirmovsky, Sep 04 2016
MATHEMATICA
Flatten@ NestList[# + {0, 2, 1} &[Last[#]^2] &, {1}, 7] (* Michael De Vlieger, Sep 06 2016 *)
PROG
(PARI) { for (n = 0, 36, if (n==0, a=1, if (n%3 == 1, a*=a, if (n%3==2, a+=2, if (n%3==0, a-=1)))); write("b059417.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 26 2009
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Scharff (jonscharff(AT)home.com), Jan 30 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001
STATUS
approved