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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066829 1 if product of odd number of primes; 0 if product of even number of primes. 8
0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

a(A026424(n)) = 1; a(A028260(n)) = 0.

Contribution from Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 01 2009: (Start)

The first N Terms are constructed by the following sieving process:

for j:=1 until N do a(j):=0,

for i:=1 until N/2 do

for j:=2*i step i until N do a(j):=1-a(i). (End)

a(n) = (A008836(n) + 1) / 2.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for characteristic functions

Index entries for sequences generated by sieves [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 01 2009]

FORMULA

a(m*n) = a(m) XOR a(n). [Reinhard Zumkeller, Aug 28 2008]

a(n) = A001222(n) mod 2. [Reinhard Zumkeller, Nov 19 2011]

EXAMPLE

Contribution from Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 01 2009: (Start)

Sieve for N = 30, also demonstrating the affinity to the Sieve of Eratosthenes:

[initial] a(j):=0, 1<=j<=30:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

[i=1] a(1)=0 --> a(j):=1, 2<=j<=30:

0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

[i=2] a(2)=1 --> a(2*j):=0, 2<=j<=[30/2]:

0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

[i=3] a(3)=1 --> a(3*j):=0, 2<=j<=[30/3]:

0 1 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0

[i=4] a(4)=0 --> a(4*j):=1, 2<=j<=[30/4]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 1 0

[i=5] a(5)=1 --> a(5*j):=0, 2<=j<=[30/5]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 1 0 0 0 1 1 0

[i=6] a(6)=0 --> a(6*j):=1, 2<=j<=[30/6]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1

[i=7] a(7)=1 --> a(7*j):=0, 2<=j<=[30/7]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1

[i=8] a(8)=1 --> a(8*j):=0, 2<=j<=[30/8]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1

[i=9] a(9)=0 --> a(9*j):=1, 2<=j<=[30/9]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1

[i=10] a(10)=0 --> a(10*j):=1, 2<=j<=[30/10]:

0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1

and so on: a(22):=0 in [i=11], a(24):=0 in [i=12], a(26):=0 in [i=13], a(28):=1 in [i=14], and a(30):=1 in [i=15]. (End)

PROG

(PARI) A066829(n)=if(bigomega(n)%2==1, 1, 0)

(Haskell)

a066829 = (`mod` 2) . a001222 -- Reinhard Zumkeller, Nov 19 2011

CROSSREFS

Cf. A065043.

Cf. A072203, A055038 (partial sums), A001222.

Sequence in context: A139689 A073070 A099104 * A174207 A048820 A144101

Adjacent sequences:  A066826 A066827 A066828 * A066830 A066831 A066832

KEYWORD

nonn

AUTHOR

G. L. Honaker, Jr. (honak3r(AT)gmail.com), Jan 17 2002

EXTENSIONS

More terms from Jason Earls (zevi_35711(AT)yahoo.com), Jan 21 2002

Corrected and comment added by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jun 26 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 05:39 EST 2012. Contains 205436 sequences.