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!)
A065679 If n is even, a(n) = n^2 else a(n) = n. 3
0, 1, 4, 3, 16, 5, 36, 7, 64, 9, 100, 11, 144, 13, 196, 15, 256, 17, 324, 19, 400, 21, 484, 23, 576, 25, 676, 27, 784, 29, 900, 31, 1024, 33, 1156, 35, 1296, 37, 1444, 39, 1600, 41, 1764, 43, 1936, 45, 2116, 47, 2304, 49, 2500, 51, 2704, 53, 2916, 55, 3136, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = n^( (n+1) (mod 2) + 1 ).
O.g.f.: x*(1+x^2)*(1+4*x-x^2)/(1-x^2)^3. - Len Smiley, Dec 05 2001
a(n) = A000217(n)+(-1)^n*A000217(n-1) with A000217(-1)=0. [Bruno Berselli, Jun 06 2013]
MATHEMATICA
Table[ n^ (Mod[n + 1, 2] + 1), {n, 0, 60} ]
PROG
(PARI) { for (n=0, 1000, if (n%2, a=n, a=n^2); write("b065679.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 26 2009
(Magma) /* By the third formula: */ A000217:=func<i | i*(i+1)/2>; [A000217(n)+(-1)^n*A000217(n-1): n in [0..60]]; // Bruno Berselli, Jun 06 2013
CROSSREFS
Cf. A000217, A065599, A016742 (bisection), A005408 (bisection).
Cf. A225144 [Bruno Berselli, Jun 06 2013]
Sequence in context: A269781 A322144 A272580 * A223925 A062776 A269512
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Dec 03 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 April 19 04:12 EDT 2024. Contains 371782 sequences. (Running on oeis4.)