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.
%I A039305 #30 Mar 27 2024 15:41:44 %S A039305 1,3,12,87,684,5463,43692,349527,2796204,22369623,178956972, %T A039305 1431655767,11453246124,91625968983,733007751852,5864062014807, %U A039305 46912496118444,375299968947543,3002399751580332,24019198012642647,192153584101141164 %N A039305 Number of distinct quadratic residues mod 8^n. %C A039305 Number of distinct n-digit suffixes of base 8 squares. %H A039305 Vincenzo Librandi, <a href="/A039305/b039305.txt">Table of n, a(n) for n = 0..1000</a> %H A039305 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (8,1,-8). %F A039305 a(n) = floor((8^n+10)/6). %F A039305 G.f.: (1-5*x-13*x^2-4*x^3)/((1-x)*(1+x)*(1-8*x)). - _Colin Barker_, Mar 14 2012 %F A039305 a(n) = 8*a(n-1) + a(n-2) - 8*a(n-3) for n>0, a(0)=1. - _Vincenzo Librandi_, Apr 22 2012 %t A039305 CoefficientList[Series[(1-5*x-13*x^2-4*x^3)/((1-x)*(1+x)*(1-8*x)),{x,0,30}],x] (* _Vincenzo Librandi_, Apr 22 2012 *) %t A039305 Join[{1},LinearRecurrence[{8,1,-8},{3,12,87},30]] (* _Harvey P. Dale_, Feb 10 2015 *) %o A039305 (Magma) I:=[1, 3, 12, 87]; [n le 4 select I[n] else 8*Self(n-1)+Self(n-2)-8*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Apr 22 2012 %Y A039305 Cf. A001018. %K A039305 nonn,easy %O A039305 0,2 %A A039305 _David W. Wilson_