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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248825 n^2 + 1 - (-1)^n. 1
0, 3, 4, 11, 16, 27, 36, 51, 64, 83, 100, 123, 144, 171, 196, 227, 256, 291, 324, 363, 400, 443, 484, 531, 576, 627, 676, 731, 784, 843, 900, 963, 1024, 1091, 1156, 1227, 1296, 1371, 1444, 1523, 1600, 1683, 1764, 1851, 1936, 2027, 2116 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Also, A016742 and A164897 interleaved.

See the spiral in Example field of A054552: after 0, the sequence is given by the terms of the semidiagonals 4, 16, 36, 64, 100, ... and 3, 11, 27, 51, 83, ... sorted into ascending order.

Primes of the sequence are in A056899.

LINKS

Table of n, a(n) for n=0..46.

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

FORMULA

a(n) = a(-n) = 2*a(n-1) - 2*(n-3) + a(n-4).

a(n) = n^2 + A010673(n) = (n+1)^2 - A168277(n+1).

a(n+1) = A248800(n) + A042963(n+1) = a(n) + A166519(n).

a(n+2) = a(n) + 4*n.

a(n+5) = a(n-5) + A008602(n).

G.f.: x*(3 - 2*x + 3*x^2)/((1 + x)*(1 - x)^3). [Bruno Berselli, Oct 15 2014]

MATHEMATICA

Table[n^2 + 1 - (-1)^n, {n, 0, 60}] (* Vincenzo Librandi, Oct 16 2014 *)

PROG

(PARI) vector(100, n, (n-1)^2+1+(-1)^n) \\ Derek Orr, Oct 15 2014

(MAGMA) [n^2+1-(-1)^n: n in [0..60]]; // Vincenzo Librandi, Oct 16 2014

(Sage) [n^2+1-(-1)^n for n in (0..60)] # Bruno Berselli, Oct 16 2014

CROSSREFS

Cf. A000290, A008586, A008602, A010673, A016742, A042963, A056899, A164897, A166519, A168277, A248800.

Sequence in context: A041527 A290493 A266384 * A001641 A007382 A127804

Adjacent sequences:  A248822 A248823 A248824 * A248826 A248827 A248828

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Oct 15 2014

EXTENSIONS

Edited by Bruno Berselli, Oct 16 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 March 26 10:18 EDT 2019. Contains 321491 sequences. (Running on oeis4.)