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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179417 a(n) = is binary number (shown here in decimal) constructed from quadratic residues of 65537 in range [(n^2)+1,(n+1)^2], in such way that quadratic residues are mapped to 1-bits, and non-quadratic residues (as well as the multiples of 65537) to 0-bits, with the lower end of range mapped to less significant, and the higher end of range to more significant bits. 3
1, 5, 24, 104, 279, 2001, 4131, 17453, 88826, 362532, 1655660, 6120642, 25376649, 128526482, 301370205, 1756488602, 8046359747, 30854867177, 73845140753, 488906501177, 2106640948770, 6573967883049, 29711211505300 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

The binary width of terms are 1, 3, 5, 7, 9, ... i.e. the successive odd numbers, as their partial sums give the squares, 1, 4, 9, 16, ... at which points there certainly is always a quadratic residue, which thus gives the most significant bit for each number.

LINKS

A. Karttunen, Table of n, a(n) for n = 0..256

A. Karttunen, Terms a(0)-a(255) drawn as a bit triangle, 1 pixel per bit.

A. Karttunen, Terms a(0)-a(255) drawn as a bit triangle, 2x2 pixels per bit.

A. Karttunen, Terms a(0)-a(255) drawn as a bit triangle, 3x3 pixels per bit.

EXAMPLE

In range [(2^2)+1,(2+1)^2] (i.e. [5,9]) we have A165471(5)=A165471(6)=A165471(7)=-1 and A165471(8)=A165471(9)=+1, i.e. there are quadratic non-residues at points 5, 6 and 7, and quadratic residues at 8 and 9, so we construct a binary number 11000, which is 24 in decimal, thus a(2)=24.

PROG

(MIT Scheme:)

(define (A179417 n) (let ((ul (A005408 n))) (let loop ((i (A000290 n)) (j 0) (s 0)) (cond ((= j ul) s) ((= 0 (1+halved (A165471 (1+ i)))) (loop (1+ i) (1+ j) s)) (else (loop (1+ i) (1+ j) (+ s (expt 2 j))))))))

(define (1+halved n) (floor->exact (/ (1+ n) 2)))

CROSSREFS

A179418.

Compare to similar bit triangle illustrations given in A080070, A122229, A122232, A122235, A122239, A122242, A122245.

Sequence in context: A276139 A078820 A291395 * A181305 A046724 A272578

Adjacent sequences:  A179414 A179415 A179416 * A179418 A179419 A179420

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Jul 27 2010

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 September 20 22:20 EDT 2019. Contains 327252 sequences. (Running on oeis4.)