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

 

Logo

The submissions stack has been unacceptably high for several months now. Please voluntarily restrict your submissions and please help with the editing. (We don't want to have to impose further limits.)

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039306 Number of distinct quadratic residues mod 9^n. 2
1, 4, 31, 274, 2461, 22144, 199291, 1793614, 16142521, 145282684, 1307544151, 11767897354, 105911076181, 953199685624, 8578797170611, 77209174535494, 694882570819441, 6253943137374964, 56285488236374671, 506569394127372034 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

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

LINKS

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

Index entries for linear recurrences with constant coefficients, signature (10,-9).

FORMULA

a(n) = floor((9^n+3)*3/8).

G.f.: (1-6*x)/((1-x)*(1-9*x)). [Colin Barker, Mar 14 2012]

a(n) = 9*a(n-1) +a(n-2) -9*a(n-3). Vincenzo Librandi, Apr 22 2012

MATHEMATICA

CoefficientList[Series[(1-6*x)/((1-x)*(1-9*x)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 22 2012 *)

PROG

(MAGMA) I:=[1, 4, 31]; [n le 3 select I[n] else 9*Self(n-1)+Self(n-2)-9*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 22 2012

CROSSREFS

Sequence in context: A001091 A077615 A025506 * A081054 A261053 A192407

Adjacent sequences:  A039303 A039304 A039305 * A039307 A039308 A039309

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 | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified August 27 17:19 EDT 2015. Contains 261095 sequences.