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.

A357745 Numbers on the 8 main spokes of a square spiral with 1 in the center.

This page as a plain text file.
%I A357745 #48 Jul 27 2025 10:33:00
%S A357745 1,2,3,4,5,6,7,8,9,11,13,15,17,19,21,23,25,28,31,34,37,40,43,46,49,53,
%T A357745 57,61,65,69,73,77,81,86,91,96,101,106,111,116,121,127,133,139,145,
%U A357745 151,157,163,169,176,183,190,197,204,211,218,225,233,241,249,257,265,273
%N A357745 Numbers on the 8 main spokes of a square spiral with 1 in the center.
%C A357745 The 8 main spokes are (with 1 in the center, 2 to the east, 3 to the northeast): east: A054552; northeast: A054554; north: A054556; northwest: A053755; west: A054567; southwest: A054569; south: A033951; southeast: A016754.
%C A357745 Alternatively the 8 main spokes are pairwise part of the 4 main axes: horizontal: A317186; vertical: A267682; diagonal: A002061; antidiagonal: A080335.
%C A357745 And lastly the 4 main axes are giving two main crosses: Horizontal-vertical cross: A039823; Diagonal-antidiagonal cross: A200975.
%H A357745 Karl-Heinz Hofmann, <a href="/A357745/b357745.txt">Table of n, a(n) for n = 1..10000</a>
%H A357745 Karl-Heinz Hofmann, <a href="/A357745/a357745.pdf">Visualization of the first few terms</a>
%H A357745 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,0,0,0,0,0,1,-2,1).
%F A357745 G.f.: x*(1-x^8+x^9)/((1-x)^3*(1+x)*(1+x^2)*(1+x^4)). - _Joerg Arndt_, Dec 29 2022
%F A357745 a(n) = floor((n+3)^2 / 16) + (1 if n != 1 mod 8). - _Kevin Ryde_, Dec 30 2022
%e A357745 See visualization in links.
%t A357745 Rest@ CoefficientList[Series[x (1 - x^8 + x^9)/((1 - x)^3*(1 + x) (1 + x^2) (1 + x^4)), {x, 0, 63}], x] (* _Michael De Vlieger_, Dec 29 2022 *)
%t A357745 a[n_] := BitShiftRight[(n + 3)^2, 4] + Boole[BitAnd[n, 7] != 1]; Array[a, 65] (* _Amiram Eldar_, Dec 30 2022, after the PARI code *)
%t A357745 LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1},{1,2,3,4,5,6,7,8,9,11},70] (* _Harvey P. Dale_, Jul 13 2025 *)
%o A357745 (Python)
%o A357745 def A357745(n): return ((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4
%o A357745 (PARI) a(n) = sqr(n+3)>>4 + (bitand(n,7)!=1); \\ _Kevin Ryde_, Dec 30 2022
%Y A357745 Cf. A054552, A054554, A054556, A053755, A054567, A054569, A033951, A016754.
%Y A357745 Cf. A317186, A267682, A002061, A080335, A039823, A200975.
%K A357745 nonn,easy
%O A357745 1,2
%A A357745 _Karl-Heinz Hofmann_, Dec 22 2022