|
| |
| |
|
|
|
0, 3, 14, 33, 60, 95, 138, 189, 248, 315, 390, 473, 564, 663, 770, 885, 1008, 1139, 1278, 1425, 1580, 1743, 1914, 2093, 2280, 2475, 2678, 2889, 3108, 3335, 3570, 3813, 4064, 4323, 4590, 4865, 5148, 5439, 5738, 6045, 6360, 6683, 7014, 7353, 7700, 8055, 8418
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,2
|
|
|
COMMENTS
| Write 0,1,2,... in clockwise spiral; sequence gives numbers on negative x axis.
This sequence is the number of expressions x generated for a given modulus n in finite arithmetic. For example, n=1 (modulus 1) generates 3 expressions: 0+0=0(mod 1), 0-0=0(mod 1), 0*0=0(mod 1). By subtracting n from 4n^2, we eliminate the counting of those expressions that would include division by zero, which would be, of course, undefined. - David Quentin Dauthier (d_dauthier(AT)yahoo.com), Nov 04 2007
Contribution from Emeric Deutsch, Sep 21 2010: (Start)
a(n) is also the Wiener index of the windmill graph D(3,n). The windmill graph D(m,n) is the graph obtained by taking n copies of the complete graph K_m with a vertex in common (i.e. a bouquet of n pieces of K_m graphs). The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph. Example: a(2)=14; indeed if the triangles are OAB and OCD, then, denoting distance by d, we have d(O,A)=d(O,B)=d(A,B)= d(O,C)=d(O,D)= d(C,D)=1 and d(A,C)=d(A,D)=d(B,C)=d(B,D)=2. The Wiener index of D(m,n) is (1/2)n(m-1)[(m-1)(2n-1)+1]. For the Wiener indices of D(4,n), D(5,n), and D(6,n) see A152743, A028994, and A180577, respectively.
(End)
Even hexagonal numbers divided by 2. - Omar E. Pol, Aug 18 2011
|
|
|
REFERENCES
| S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
Weisstein, Eric W. "Windmill Graph." http://mathworld.wolfram.com/WindmillGraph.html. [From Emeric Deutsch (deutsch(AT)duke.poly.edu), Sep 21 2010]
|
|
|
LINKS
| Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for sequences related to linear recurrences with constant coefficients, signature (3,-3,1).
Emilio Apricena, A version of the Ulam spiral
|
|
|
FORMULA
| G.f.: x*(3+5*x)/(1-x)^3. - Michael Somos, Mar 03 2003
a(n)=A014635/2 - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jan 16 2007
a(n)= A000326(n)+A005476(n), a(n)=A049452(n)-A001105(n). - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jun 12 2007
a(n) = a(n-1)+8*n-5 (with a(0)=0). [From Vincenzo Librandi, Nov 17 2010]
a(0)=0, a(1)=3, a(2)=14, a(n)=3*a(n-1)-3*a(n-2)+a(n-3) [From Harvey P. Dale, Oct 10 2011]
|
|
|
EXAMPLE
| 16 17 18 19 ...
15 4 5 6 ...
14 3 0 7 ...
13 2 1 8 ...
|
|
|
MAPLE
| [seq(binomial(4*n, 2)/2, n=0..45)]; - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Jan 16 2007
|
|
|
MATHEMATICA
| Table[n*(4*n - 1), {n, 0, 100}] (* From Vladimir Joseph Stephan Orlovsky, Jul 06 2011 *)
LinearRecurrence[{3, -3, 1}, {0, 3, 14}, 50] (* From Harvey P. Dale, Oct 10 2011 *)
|
|
|
PROG
| (PARI) a(n)=4*n^2-n.
(MAGMA) I:=[0, 3, 14]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jan 29 2012
|
|
|
CROSSREFS
| Sequences from spirals: A001107, A002939, A007742, A033951-A033954, A033989-A033991, A002943, A033996, A033988.
Cf. A016742.
a(n)=A007742(-n)=A074378(2n-1)=A014848(2n).
Cf. A014635.
Cf. A033991, A152743, A028994 [From Emeric Deutsch, Sep 21 2010]
Sequence in context: A032525 A197946 A130697 * A155154 A081269 A140064
Adjacent sequences: A033988 A033989 A033990 * A033992 A033993 A033994
|
|
|
KEYWORD
| nonn,easy,nice
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| Two remarks combined into one by Emeric Deutsch (deutsch(AT)duke.poly.edu), Oct 03 2010
|
| |
|
|