Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A038189
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A038189 Bit to left of least significant 1-bit in binary expansion of n. +0
12
0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1 (list; graph; listen)
OFFSET

0,1

COMMENT

Characteristic function of A091067.

a(n)=1 if kronecker(-n,m)=kronecker(m,n) for all m, otherwise a(n)=0. - Michael Somos Sep 22 2005

LINKS

Index entries for characteristic functions

Michael Gilleland, Some Self-Similar Integer Sequences

FORMULA

a(0) = 0, a(2n) = a(n) for n>0, a(4n+1) = 0, a(4n+3) = 1.

G.f.: sum (k>=0, t^3/(1-t^4), t=x^2^k). Parity of A025480. a(n) = 1/2 * (1 - (-1)^A025480(n)). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Jan 04 2004

EXAMPLE

a(6) = 1 since 6 = 110 and bit before right-most 1 is a 1.

MATHEMATICA

f[n_] := IntegerDigits[n, 2][[2]]; f[0] = f[1] = 0; Table[f@n, {n, 0, 104}] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 14 2009]

f[n_] := f[n] = Switch[ Mod[n, 4], 0, g[n/2], 1, 0, 2, g[n/2], 3, 1]; Table[ f@n, {n, 0, 104}] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 14 2009]

PROGRAM

(C) int a(int n) { return (n & ((n&-n)<<1)) ? 1 : 0; } - from Russ Cox

(PARI) a(n) = if(n<1, 0, ((n/2^valuation(n, 2)-1)/2)%2) /* Michael Somos Sep 22 2005 */

(PARI) a(n) = if(n<3, 0, prod(m=1, n, kronecker(-n, m)==kronecker(m, n))) /* Michael Somos Sep 22 2005 */

CROSSREFS

Cf. A038190.

A014707(n)=a(n+1). A014577(n)=1-a(n+1).

A038189(n)=A014707(n-1). [From Robert G. Wilson v (rgwv(AT)rgwv.com), Apr 14 2009]

Adjacent sequences: A038186 A038187 A038188 this_sequence A038190 A038191 A038192

Sequence in context: A100283 A064990 A102215 this_sequence A072783 A064911 A099618

KEYWORD

nonn,easy

AUTHOR

Fred Lunnon (fred(AT)csa5.cs.may.ie)

EXTENSIONS

More terms from David W. Wilson (davidwwilson(AT)comcast.net)

Definition corrected by Russ Cox and Ralf Stephan, Nov 08 2004

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 8 07:45 EST 2009. Contains 166143 sequences.


AT&T Labs Research