OFFSET
0,1
COMMENTS
A001844(N) = N^2 + (N+1)^2 = 4*A000217(N) + 1 is divisible by 13 if and only if N=a(n), n>=0. For the proof it suffices to show that only N=2 and N=10 from {0,1,..,12} satisfy A001844(N)== 0 (mod 13). Note that only primes of the form p= 4*k+1 (A002144) can be divisors of A001844 (see a Wolfdieter Lang comment there giving the reference).
Partial sums of the sequence [2,5,8,5,8,5,8,5,8,...] (see the o.g.f., and subtract 2 to see the 5,8 periodicity).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
Bisection: a(2*n) = 13*n + 2, a(2*n+1) = 13*n + 10, n>=0.
O.g.f.: (2 + 8*x + 3*x^2)/((1-x)*(1-x^2)).
E.g.f.: ((26*x + 11)*exp(x) - 3*exp(-x))/4. - David Lovler, Aug 09 2022
EXAMPLE
MAPLE
MATHEMATICA
Table[1/4*(26*n-3*(-1)^n+11), {n, 0, 60}] (* Vincenzo Librandi, May 24 2012 *)
PROG
(Magma) [1/4*(26*n-3*(-1)^n+11): n in [0..60]]; // Vincenzo Librandi, May 24 2012
(PARI) a(n) = (26*n - 3*(-1)^n + 11)/4 \\ David Lovler, Aug 09 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, May 09 2012
STATUS
approved