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.

A039302 Number of distinct quadratic residues mod 5^n.

This page as a plain text file.
%I A039302 #28 Aug 20 2025 00:28:53
%S A039302 1,3,11,53,261,1303,6511,32553,162761,813803,4069011,20345053,
%T A039302 101725261,508626303,2543131511,12715657553,63578287761,317891438803,
%U A039302 1589457194011,7947285970053,39736429850261,198682149251303,993410746256511,4967053731282553
%N A039302 Number of distinct quadratic residues mod 5^n.
%C A039302 Number of distinct n-digit suffixes of base 5 squares.
%D A039302 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 324.
%H A039302 Vincenzo Librandi, <a href="/A039302/b039302.txt">Table of n, a(n) for n = 0..1000</a>
%H A039302 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (5,1,-5).
%F A039302 a(n) = floor((5^n+3)*5/12).
%F A039302 G.f.: (1-2*x-5*x^2)/((1-x)*(1+x)*(1-5*x)). - _Colin Barker_, Mar 14 2012
%F A039302 a(n) = 5*a(n-1) +a(n-2) -5*a(n-3). - _Vincenzo Librandi_, Apr 21 2012
%F A039302 a(n) = A000224(5^n). - _R. J. Mathar_, Sep 28 2017
%p A039302 A039302 := proc(n)
%p A039302     floor((5^n+3)*5/12) ;
%p A039302 end proc:
%p A039302 seq(A039302(n),n=0..10) ; # _R. J. Mathar_, Sep 28 2017
%t A039302 CoefficientList[Series[(1-2*x-5*x^2)/((1-x)*(1+x)*(1-5*x)),{x,0,30}],x] (* or *)LinearRecurrence[{5,1,-5},{1,3,11},30] (* _Vincenzo Librandi_, Apr 21 2012 *)
%o A039302 (Magma) I:=[1, 3, 11]; [n le 3 select I[n] else 5*Self(n-1)+Self(n-2)-5*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Apr 21 2012
%K A039302 nonn,easy
%O A039302 0,2
%A A039302 _David W. Wilson_