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.

A039304 Number of distinct quadratic residues mod 7^n.

This page as a plain text file.
%I A039304 #28 Sep 08 2022 08:44:53
%S A039304 1,4,22,151,1051,7354,51472,360301,2522101,17654704,123582922,
%T A039304 865080451,6055563151,42388942054,296722594372,2077058160601,
%U A039304 14539407124201,101775849869404,712430949085822,4987016643600751,34909116505205251
%N A039304 Number of distinct quadratic residues mod 7^n.
%C A039304 Number of distinct n-digit suffixes of base 7 squares.
%H A039304 Vincenzo Librandi, <a href="/A039304/b039304.txt">Table of n, a(n) for n = 0..200</a>
%H A039304 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,1,-7).
%F A039304 a(n) = floor( (7^n + 3)*7/16 ).
%F A039304 G.f.: (1 - 3*x - 7*x^2)/((1-x)*(1+x)*(1-7*x)). - _Colin Barker_, Mar 08 2012
%F A039304 a(n) = 7*a(n-1) + a(n-2) - 7*a(n-3). - _Vincenzo Librandi_, Apr 21 2012
%F A039304 a(n) = A000224(7^n). - _R. J. Mathar_, Sep 28 2017
%p A039304 A039304 := proc(n)
%p A039304     floor((7^n+3)*7/16) ;
%p A039304 end proc:
%p A039304 seq(A039304(n),n=0..10) ; # _R. J. Mathar_, Sep 28 2017
%t A039304 CoefficientList[Series[(1-3*x-7*x^2)/((1-x)*(1+x)*(1-7*x)),{x,0,40}],x] (* _Vincenzo Librandi_, Apr 21 2012 *)
%t A039304 LinearRecurrence[{7,1,-7},{1,4,22},30] (* _Harvey P. Dale_, Aug 03 2016 *)
%o A039304 (Magma) [Floor((7^n+3)*7/16): n in [0..25]]; // _Vincenzo Librandi_, May 14 2011
%o A039304 (Magma) I:=[1, 4, 22]; [n le 3 select I[n] else 7*Self(n-1)+Self(n-2)-7*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Apr 21 2012
%Y A039304 Cf. A000224, A000420 (7^n).
%K A039304 nonn,easy
%O A039304 0,2
%A A039304 _David W. Wilson_