The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059417 Start with 1; square; add 2; subtract 1; repeat. 1
1, 1, 3, 2, 4, 6, 5, 25, 27, 26, 676, 678, 677, 458329, 458331, 458330, 210066388900, 210066388902, 210066388901, 44127887745906175987801, 44127887745906175987803, 44127887745906175987802 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(22) has 46 digits.
REFERENCES
Seen on a quiz.
LINKS
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
Cf. A004019.
Sequence in context: A126290 A277377 A227741 * A078824 A014685 A239516
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 08:10 EDT 2024. Contains 372579 sequences. (Running on oeis4.)