login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039301 Number of distinct quadratic residues mod 4^n. 11
1, 2, 4, 12, 44, 172, 684, 2732, 10924, 43692, 174764, 699052, 2796204, 11184812, 44739244, 178956972, 715827884, 2863311532, 11453246124, 45812984492, 183251937964, 733007751852, 2932031007404, 11728124029612, 46912496118444 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Number of distinct n-digit suffixes of base 4 squares.

a(n) = A007583(n-1)+1 = A020988(n-2)+2 = A083584(n-2)+3. - Ralf Stephan, Jun 14 2003

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..170

FORMULA

a(n) = floor((4^n+10)/6).

Also, a(0)=1 and, for n>0, a(n) = (4^n+8)/6. - Bruno Berselli, Jul 27 2010

G.f.: (1-3*x-2*x^2)/((1-x)*(1-4*x)). - Bruno Berselli, Jul 27 2010

a(n)-5*a(n-1)+4*a(n-2) = 0 for n>1. - Bruno Berselli, Jul 27 2010

MAPLE

a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=4*a[n-1]-1 od: seq(a[n]+1, n=0..24); # Zerinvary Lajos, Mar 20 2008

MATHEMATICA

f[n_]:=4^n; lst={}; Do[a=f[n]; Do[a-=f[m], {m, n-1, 1, -1}]; AppendTo[lst, a], {n, 30}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 10 2010 *)

PROG

(MAGMA) [Floor((4^n+10)/6): n in [0..40] ]; // Vincenzo Librandi, Apr 28 2011

CROSSREFS

Sequence in context: A139669 A179973 A275780 * A180205 A131529 A238111

Adjacent sequences:  A039298 A039299 A039300 * A039302 A039303 A039304

KEYWORD

nonn,easy

AUTHOR

David W. Wilson

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 19:59 EST 2019. Contains 329288 sequences. (Running on oeis4.)