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

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

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 to sequences with linear recurrences with constant coefficients, signature (9,1,-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 A192407 A000858

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 December 20 02:13 EST 2014. Contains 252240 sequences.