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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211487 Characteristic sequence of numbers n having a primitive root modulo n. 3
0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

a(1) = 0, since we have an empty set of numbers more than 0 and less than 1.

If A(x) is the counting function of a(n)=1, n<=x, then A(x)~2*x/log(x) as x tends to infinity.

Characteristic function of A033948 (apart from the initial term). - Antti Karttunen, Aug 22 2017

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

Index entries for characteristic functions

FORMULA

a(n) = 1 iff n = 2, 4, p^k, 2*p^k, where p is an odd prime.

A001783(n) ≡ (-1)^a(n) mod n.

From Antti Karttunen, Aug 22 2017: (Start)

For n > 1, if A034380(n) = 1, a(n) = 1, otherwise a(n) = 0.

A103131(n) = (-1)^a(n) for n > 2.

(End)

PROG

(PARI) A211487(n) = if(n%2, !!isprimepower(n), (n==2 || n==4 || (isprimepower(n/2, &n) && n>2))); \\ Antti Karttunen, Aug 22 2017, after Charles R Greathouse IV's code for A033948.

CROSSREFS

Cf. A001783, A033948, A034380, A103131.

Sequence in context: A196147 A242647 A275606 * A252372 A204447 A188642

Adjacent sequences:  A211484 A211485 A211486 * A211488 A211489 A211490

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, May 13 2012

EXTENSIONS

More terms from Antti Karttunen, Aug 22 2017

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 23 19:08 EST 2017. Contains 295128 sequences.