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.

A343560 a(n) = (n-1)*(4*n+1).

This page as a plain text file.
%I A343560 #29 Aug 27 2025 16:24:36
%S A343560 0,9,26,51,84,125,174,231,296,369,450,539,636,741,854,975,1104,1241,
%T A343560 1386,1539,1700,1869,2046,2231,2424,2625,2834,3051,3276,3509,3750,
%U A343560 3999,4256,4521,4794,5075,5364,5661,5966,6279,6600,6929,7266,7611,7964,8325
%N A343560 a(n) = (n-1)*(4*n+1).
%C A343560 A polynomial curve. However, write 0, 1, 2, ... in a square spiral, with 0 at the origin and 1 immediately below it; sequence gives numbers parallel to the negative y-axis (see Example section). This sequence only encounters composite numbers as it expands to infinity.
%H A343560 Paolo Xausa, <a href="/A343560/b343560.txt">Table of n, a(n) for n = 1..10000</a>
%H A343560 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F A343560 a(n) = A164754(n+1) + 1 = A001107(n+1), for n >= 2.
%F A343560 G.f.: x^2*(-9+x)/(x-1)^3 . - _R. J. Mathar_, Sep 15 2021
%F A343560 Sum_{n>=2} 1/a(n) = 24/25 -3*log(2)/5 -Pi/10. - _R. J. Mathar_, May 30 2022
%e A343560   On a square lattice, place the nonnegative integers at lattice points forming a spiral as follows: place "0" at the origin; then move one step downward (i.e., in the negative y direction) and place "1" at the lattice point reached; then turn 90 degrees in either direction and place a "2" at the next lattice point; then make another 90-degree turn in the same direction and place a "3" at the lattice point; etc. The terms of the sequence, not including "0", will lie parallel to the negative y-axis, located within the fourth quadrant, as seen in the example below:
%e A343560   99  64--65--66--67--68--69--70--71--72
%e A343560    |   |                               |
%e A343560   98  63  36--37--38--39--40--41--42  73
%e A343560    |   |   |                       |   |
%e A343560   97  62  35  16--17--18--19--20  43  74
%e A343560    |   |   |   |               |   |   |
%e A343560   96  61  34  15   4---5---6  21  44  75
%e A343560    |   |   |   |   |       |   |   |   |
%e A343560   95  60  33  14   3  *0*  7  22  45  76
%e A343560    |   |   |   |   |   |   |   |   |   |
%e A343560   94  59  32  13   2---1   8  23  46  77
%e A343560    |   |   |   |           |   |   |   |
%e A343560   93  58  31  12--11--10--*9* 24  47  78
%e A343560    |   |   |                   |   |   |
%e A343560   92  57  30--29--28--27-*26*-25  48  79
%e A343560    |   |                           |   |
%e A343560   91  56--55--54--53--52-*51*-50--49  80
%e A343560    |                                   |
%e A343560   90--89--88--87--86--85-*84*-83--82--81
%p A343560 A343560 := n -> 4*n^2 - 3*n - 1;
%p A343560 seq(A343560(n), n = 1 .. 50);
%t A343560 A343560[n_] := (4*n + 1)*(n - 1); Array[A343560, 100] (* or *)
%t A343560 LinearRecurrence[{3, -3, 1}, {0, 9, 26}, 100] (* _Paolo Xausa_, Aug 27 2025 *)
%o A343560 (C) int a(int n) { return 4*n*n-3*n-1; }
%Y A343560 Cf. A164754, A001107, A180863.
%K A343560 nonn,easy,changed
%O A343560 1,2
%A A343560 _Zachary Dove_, Apr 19 2021