Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A119957
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A119957 a(n) = sum of p consecutive residues of 2^x modulo n, starting with a sufficiently large x and where p = period of binary representation of 1/n. +0
4
0, 0, 3, 0, 10, 6, 7, 0, 27, 20, 55, 12, 78, 14, 15, 0, 68, 54, 171, 40, 42, 110, 92, 24, 250, 156, 243, 28, 406, 30, 31, 0, 165, 136, 175, 108, 666, 342, 156, 80, 410, 84, 301, 220, 225, 184, 423, 48, 490, 500, 102, 312, 1378, 486, 440, 56, 513, 812, 1711, 60, 1830, 62 (list; graph; listen)
OFFSET

1,3

COMMENT

Notice that a(n) is divisible by n. a(n)=0 for any n of the form 2^i. This sequence is base-dependent and uses base=2, so there are similar sequences for bases 3,4...

FORMULA

a(n) = sum (i=x..x+p-1) (2^i mod n) having: P=Period of binary representation of 1/n; x large enough for the period to start. Example: x>Floor(log2(n)).

EXAMPLE

a(1)=0 because 2^i mod 1 = {0,0,0,0,0,0,0,0,0...} and p=1

a(2)=0 because 2^i mod 2 = {1,0,0,0,0,0,0,0,0...}, p=1, x>1

a(14)=14 because 2^i mod 14 = {1,2,4,8,2,4,8,2,4,8,...}, p=3, x>1 ---> a=2+4+8=14

a(35)=175 because 2^i mod 35 = {1,2,4,8,16,32,29,23,11,22,9,18,1,2,4,...}, p=12, x>0 ---> a=1+2+4+8+16+32+29+23+11+22+9+18=175

CROSSREFS

Cf. A007733.

Sequence in context: A094052 A161678 A081658 this_sequence A028852 A095200 A090460

Adjacent sequences: A119954 A119955 A119956 this_sequence A119958 A119959 A119960

KEYWORD

base,easy,nonn

AUTHOR

Nestor Romeral Andres (cashogor(AT)yahoo.es), Aug 02 2006

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 November 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research