Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A039300
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A039300 Number of distinct quadratic residues mod 3^n. +0
4
1, 2, 4, 11, 31, 92, 274, 821, 2461, 7382, 22144, 66431, 199291, 597872, 1793614, 5380841, 16142521, 48427562, 145282684, 435848051, 1307544151, 3922632452, 11767897354, 35303692061, 105911076181, 317733228542, 953199685624 (list; graph; listen)
OFFSET

0,2

COMMENT

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

In general, for any odd prime p>=3, the number s of quadratic residues mod p^n is given by s=(p^(n+1) + p + 2)/2*(p+1) for even n, and s=(p^(n+1) + 2*p + 1)/2*(p+1) for odd n. - Lekraj Beedassy (blekraj(AT)yahoo.com), Jan 07 2005

REFERENCES

W. D. Stangl, "Counting Squares in Z_n", Mathematics Magazine pp. 285-9 Vol. 69 No. 4 October 1996.

FORMULA

[ (3^n+3)*3/8 ].

a(n)={3^(n+1) + 6 + (-1)^(n+1)}/8 - Lekraj Beedassy (blekraj(AT)yahoo.com), Jan 07 2005

G.f.: (1-x-3x^2)/((1-x)(1+x)(1-3x)).

PROGRAM

a(n)=if(n<0, 0, 3^n*3\8+1)

a(n)=if(n<1, n==0, 3*a(n-1)-2+n%2)

CROSSREFS

Equals A033113 + 1. Cf. A015518.

Cf. A023105.

Adjacent sequences: A039297 A039298 A039299 this_sequence A039301 A039302 A039303

Sequence in context: A102814 A034770 A002387 this_sequence A118974 A119020 A073191

KEYWORD

nonn,easy

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net)

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 11 13:47 EDT 2008. Contains 144830 sequences.


AT&T Labs Research