login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039302 Number of distinct quadratic residues mod 5^n. 4
1, 3, 11, 53, 261, 1303, 6511, 32553, 162761, 813803, 4069011, 20345053, 101725261, 508626303, 2543131511, 12715657553, 63578287761, 317891438803, 1589457194011, 7947285970053, 39736429850261, 198682149251303, 993410746256511 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Number of distinct n-digit suffixes of base 5 squares.
REFERENCES
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 324.
LINKS
FORMULA
a(n) = floor((5^n+3)*5/12).
G.f.: (1-2*x-5*x^2)/((1-x)*(1+x)*(1-5*x)). [Colin Barker, Mar 14 2012]
a(n) = 5*a(n-1) +a(n-2) -5*a(n-3). Vincenzo Librandi, Apr 21 2012
a(n) = A000224(5^n). - R. J. Mathar, Sep 28 2017
MAPLE
A039302 := proc(n)
floor((5^n+3)*5/12) ;
end proc:
seq(A039302(n), n=0..10) ; # R. J. Mathar, Sep 28 2017
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Sequence in context: A107958 A253972 A053557 * A074512 A005502 A305710
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 10:56 EDT 2024. Contains 371791 sequences. (Running on oeis4.)