Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A115379
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A115379 Number of positive integers k < n such that n XOR k < n and GCD(n,k) is odd. +0
1
0, 1, 0, 3, 0, 3, 2, 7, 0, 3, 2, 7, 4, 11, 6, 15, 0, 3, 2, 7, 4, 11, 6, 15, 8, 19, 10, 23, 12, 27, 14, 31, 0, 3, 2, 7, 4, 11, 6, 15, 8, 19, 10, 23, 12, 27, 14, 31, 16, 35, 18, 39, 20, 43, 22, 47, 24, 51, 26, 55, 28, 59, 30, 63, 0, 3, 2, 7, 4, 11, 6, 15, 8, 19, 10, 23, 12, 27, 14, 31, 16, 35 (list; graph; listen)
OFFSET

0,4

COMMENT

A059029 equals the limiting sequence of 2^k consecutive terms of this sequence starting at position 2^k as k increases, where A059029(n) = n if n is even, 2n+1 if n is odd.

FORMULA

a(2^n) = 0, a(2^n-1) = 2^n-1, for n>=0. a(2^n+1)=3 (n>0), a(2^n+2)=2 (n>1)), a(2^n+3)=7 (n>1), a(2^n+4)=4 (n>2), a(2^n+5)=11 (n>2), etc.

PROGRAM

(PARI) a(n)=sum(k=0, n, if(bitxor(n, k)<n&gcd(n, k)%2==1, 1, 0))

CROSSREFS

Cf. A059029, A006257 (Josephus problem).

Adjacent sequences: A115376 A115377 A115378 this_sequence A115380 A115381 A115382

Sequence in context: A004604 A016035 A112470 this_sequence A127801 A096597 A097994

KEYWORD

nonn

AUTHOR

Paul D. Hanna (pauldhanna(AT)juno.com), Jan 21 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 October 7 14:39 EDT 2008. Contains 144666 sequences.


AT&T Labs Research