Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A055094
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A055094 Binary encoding of quadratic residue set of n. L(1/n) is the most significant bit, L(n-1/n) is the least significant bit, i.e. each row of A055088 interpreted as a binary number. +0
8
0, 1, 2, 4, 9, 22, 52, 72, 146, 313, 738, 1156, 2829, 6772, 9520, 18496, 53643, 75154, 162438, 312328, 600116, 1513186, 4023888, 4737152, 9741609, 23182093, 38478994, 76286020, 166236537, 311977264, 921787428, 1212203072, 2962424994 (list; graph; listen)
OFFSET

1,3

COMMENT

L(a/n) stands for generalized Legendre symbol, with value = 1 only if a is a quadratic residue of n.

FORMULA

a(n) = qrs2bincode(n)

MAPLE

qrs2bincode := proc(n) local i, z; z := 0; for i from 1 to n-1 do z := z*2; if (1 = quadres(i, n)) then z := z + 1; fi; od; RETURN(z); end;

PROGRAM

(PARI) {a(n)=sum(k=1, n-1, 2^(k-1)*(0<sum(i=1, n-1, i^2%n==n-k)))} /* Michael Somos Oct 14 2006 */

CROSSREFS

Cf. A055088, A054432, A055095.

Sequence in context: A156801 A057580 A129875 this_sequence A055729 A048211 A098719

Adjacent sequences: A055091 A055092 A055093 this_sequence A055095 A055096 A055097

KEYWORD

nonn

AUTHOR

Antti Karttunen Apr 04 2000

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 December 17 13:29 EST 2009. Contains 170826 sequences.


AT&T Labs Research