The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354923 a(n) = 1 if n is either a power of prime or 2*prime, otherwise 0. 2

%I #11 Jun 13 2022 16:47:20

%S 1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,0,0,1,1,0,1,1,1,0,1,0,1,1,0,1,

%T 0,0,1,1,0,0,1,0,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,1,0,0,1,0,

%U 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,0,0,0,1,0,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,1,0,0,1

%N a(n) = 1 if n is either a power of prime or 2*prime, otherwise 0.

%H Antti Karttunen, <a href="/A354923/b354923.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F For n > 4, a(n) = A010055(n) + A353478(n).

%t a[n_] := If[PrimePowerQ[n] || PrimeQ[n/2], 1, 0]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Jun 13 2022 *)

%o (PARI) A354923(n) = ((1==n)|| isprimepower(n) || (!(n%2) && isprime(n/2)));

%Y Characteristic function of A354925.

%Y Cf. A010055, A265128, A353478.

%Y Cf. also A354924.

%K nonn

%O 1

%A _Antti Karttunen_, Jun 13 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 06:46 EDT 2024. Contains 373013 sequences. (Running on oeis4.)