login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249356 8*A200975(n)-7 where A200975 are the numbers on the diagonals in Ulam's spiral. 4
1, 17, 33, 49, 65, 97, 129, 161, 193, 241, 289, 337, 385, 449, 513, 577, 641, 721, 801, 881, 961, 1057, 1153, 1249, 1345, 1457, 1569, 1681, 1793, 1921, 2049, 2177, 2305, 2449, 2593, 2737, 2881, 3041, 3201, 3361, 3521, 3697, 3873, 4049, 4225, 4417, 4609, 4801 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

All elements are odd.

The pair (a(n), a(n+1)) is separated by A002265(n-1) elements in A158057.

LINKS

Todd Silvestri, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).

FORMULA

a(n) = 2*n*(n+2)+(-1)^n-4*sin((Pi*n)/2).

G.f.: - x*(x^5-x^4+15*x+1)/((x-1)^3*(x^3+x^2+x+1)).

a(n) = 2*a(n-1) - a(n-2) + 16 if n == 2 mod 4, a(n) = 2*a(n-1) - a(n-2) otherwise. - Robert Israel, Nov 04 2014

a(n) = 2*n*(n+2) - (1-(-1)^n)*(1-2*i^(n+1)) + 1, where i=sqrt(-1). - Bruno Berselli, Nov 18 2014

MAPLE

seq(2*n*(n+2)+(-1)^n-4*sin((Pi*n)/2), n=1..100); # Robert Israel, Nov 04 2014

MATHEMATICA

a[n_Integer/; n>0]:=2 n (n+2)+(-1)^n-4 Mod[n^2 (3 n+2), 4, -1]

CoefficientList[Series[-(x^5 - x^4 + 15 x + 1) / ((x - 1)^3 (x^3 + x^2 + x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 16 2014 *)

Table[2 n (n + 2) - (1 - (-1)^n) (1 - 2 I^(n + 1)) + 1, {n, 1, 50}] (* Bruno Berselli, Nov 18 2014 *)

PROG

(PARI) a(n) = 2*n*(n+2)+(-1)^n-4*round(sin((Pi*n)/2)) \\ Charles R Greathouse IV, Nov 17 2014

CROSSREFS

Sequence in context: A044062 A044443 A158057 * A286679 A116523 A168579

Adjacent sequences:  A249353 A249354 A249355 * A249357 A249358 A249359

KEYWORD

nonn,easy

AUTHOR

Todd Silvestri, Oct 27 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 22 16:17 EDT 2019. Contains 326178 sequences. (Running on oeis4.)