login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268340 Characteristic function of the prime powers p^k, k >= 2. 4
0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1

COMMENTS

Mobius transform of A046660. - Isaac Saffold, Dec 14 2017

LINKS

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

Index entries for characteristic functions

Index entries for sequences computed from exponents in factorization of n

FORMULA

a(n) = Sum_{d|n} (mobius(n/d)*(bigomega(d) - omega(d))) - Isaac Saffold, Dec 14 2017

MAPLE

N:= 1000: # to get a(1)...a(N)

V:= Vector(N):

for p in select(isprime, [2, seq(i, i=3..isqrt(N), 2)]) do

for k from 2 to floor(log[p](N)) do

  V[p^k]:= 1

od od:

convert(V, list); # Robert Israel, Dec 14 2017

MATHEMATICA

Table[Boole@ And[PrimePowerQ@ n, ! PrimeQ@ n], {n, 105}] (* Michael De Vlieger, Feb 02 2016 *)

Table[If[!PrimeQ[n]&&PrimePowerQ[n], 1, 0], {n, 130}] (* Harvey P. Dale, Jan 20 2019 *)

PROG

(PARI) a(n)=my(b); ispower(n, , &b)&&isprime(b)

(PARI) first(n) = my(res = vector(n)); forprime(p = 2, sqrtint(n), for(i = 2, logint(n, p), res[p^i] = 1)); res \\ David A. Corneth, Nov 03 2017

CROSSREFS

Characteristic function of A246547.

Cf. A069513, A010055, A075802, A112526.

Sequence in context: A283316 A284508 A160351 * A336356 A319988 A023969

Adjacent sequences:  A268337 A268338 A268339 * A268341 A268342 A268343

KEYWORD

nonn,easy

AUTHOR

Jeppe Stig Nielsen, Feb 02 2016

EXTENSIONS

More terms from Antti Karttunen, Nov 03 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 8 11:44 EST 2021. Contains 341948 sequences. (Running on oeis4.)