cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A137930 The sum of the principal diagonals of an n X n spiral.

This page as a plain text file.
%I A137930 #13 Jun 26 2019 03:04:58
%S A137930 0,1,10,25,56,101,170,261,384,537,730,961,1240,1565,1946,2381,2880,
%T A137930 3441,4074,4777,5560,6421,7370,8405,9536,10761,12090,13521,15064,
%U A137930 16717,18490,20381,22400,24545,26826,29241,31800,34501,37354,40357,43520,46841,50330
%N A137930 The sum of the principal diagonals of an n X n spiral.
%C A137930 n X n spirals of the form:
%C A137930 (Examples of n = 3, 4)
%C A137930 7...8...9
%C A137930 6...1...2
%C A137930 5...4...3
%C A137930 and
%C A137930 7...8...9...10
%C A137930 6...1...2...11
%C A137930 5...4...3...12
%C A137930 16..15..14..13
%H A137930 Robert Israel, <a href="/A137930/b137930.txt">Table of n, a(n) for n = 0..10000</a>
%F A137930 a(n) = mod(n^(n+1),n+1) + floor(n/2)^2*(6-4(-1)^n) + [16*floor(n/2)^3 + floor(n/2)*(14-12(-1)^n)]/3
%F A137930 Interweave A114254 and A137931.
%F A137930 Empirical G.f.: x*(1+7*x-3*x^2+3*x^3)/((1-x)^4*(1+x)). [_Colin Barker_, Jan 12 2012]
%F A137930 From _Robert Israel_, Jun 25 2019: (Start)
%F A137930 Empirical G.f. confirmed using G.f.'s of A114254 and A137931.
%F A137930 a(n) = 2*n^3/3 + n^2/2 + 4*n/3 + 3*((-1)^n -1)/4. (End)
%e A137930 a(1) = mod(1^(1+1),1+1) + floor(1/2)^2*(6-4(-1)^1) + [16*floor(1/2)^3 + floor(1/2)*(14-12(-1)^1)]/3 = 1
%e A137930 a(2) = mod(2^(2+1),2+1) + floor(2/2)^2*(6-4(-1)^2) + [16*floor(2/2)^3 + floor(2/2)*(14-12(-1)^2)]/3 = 10
%p A137930 f:= n -> 2*n^3/3 + n^2/2 + 4*n/3 + 3*((-1)^n -1)/4:
%p A137930 map(f, [$0..100]); # _Robert Israel_, Jun 25 2019
%Y A137930 Cf. A114254, A137931.
%K A137930 nonn
%O A137930 0,3
%A A137930 _William A. Tedeschi_, Feb 29 2008