OFFSET
0,2
COMMENTS
A bisection of A016742. Sequence arises from reading the line from 0, in the direction 0, 16, ... in the square spiral whose vertices are the squares A000290. - Omar E. Pol, May 24 2008
Also, sequence found by reading the line from 0, in the direction 0, 16, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Sep 10 2011
From Daniel Mondot, Dec 21 2025: (Start)
Sums of 2 adjacent even triangular numbers. For zero, we need to extend the triangular numbers backwards.
Solutions to the following sock problem: How many total socks do I have if:
- I have a certain number of 2 kinds of pairs of socks.
- If I pick 2 socks at random, and have exactly 50% chance to get a matching pair.
The number of socks of each kind would be the 2 adjacent even triangular numbers. (End)
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 0..10000 (first 200 terms from Ivan Panchenko).
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 16*n^2 = 16*A000290(n). - Omar E. Pol, Dec 11 2008
a(n) = a(n-1) + 16*(2*n-1) (with a(0)=0). - Vincenzo Librandi, Nov 20 2010
From Amiram Eldar, Jan 25 2021: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/96.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/192.
Product_{n>=1} (1 + 1/a(n)) = sinh(Pi/4)/(Pi/4).
Product_{n>=1} (1 - 1/a(n)) = sin(Pi/4)/(Pi/4) = 2*sqrt(2)/Pi (A112628). (End)
From Elmo R. Oliveira, Nov 30 2024: (Start)
G.f.: 16*x*(1 + x)/(1-x)^3.
E.g.f.: 16*x*(1 + x)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
MATHEMATICA
(4*Range[0, 50])^2 (* Paolo Xausa, Dec 12 2025 *)
PROG
(PARI) a(n) = (4*n)^2; \\ Michel Marcus, Mar 04 2014
(Python)
def A016802(n): return (4*n)**2 # Karl-Heinz Hofmann, Sep 11 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
