login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 2^(n-1) mod M(n) where M(n) = A014963(n) is the exponential of the Mangoldt function.
11

%I #23 Oct 02 2023 16:20:45

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

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

%U 0,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0

%N a(n) = 2^(n-1) mod M(n) where M(n) = A014963(n) is the exponential of the Mangoldt function.

%C Appears to be always either 0 or 1.

%C This follows from Fermat's Little Theorem. - _Charles R Greathouse IV_, Feb 13 2011

%C Characteristic function for odd prime powers (larger than one). - _Antti Karttunen_, Sep 14 2017, after _Charles R Greathouse IV_'s Feb 13 2011 formula.

%H Antti Karttunen, <a href="/A174275/b174275.txt">Table of n, a(n) for n = 1..16385</a>

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

%F a(n) = A000079(n-1) mod A014963(n).

%F a(n) = 1 if n = p^k for k > 0 and p a prime not equal to 2, a(n) = 0 otherwise. - _Charles R Greathouse IV_, Feb 13 2011

%t a[n_] := Mod[2^(n - 1), Exp[MangoldtLambda[n]]] (* _Steven Foster Clark_, Sep 04 2023 *)

%o (PARI) vector(70, n, ispower(k=n, , &k); isprime(k)&k!=2) \\ _Charles R Greathouse IV_, Feb 13 2011

%Y Cf. A062173.

%K nonn,easy

%O 1,1

%A _Mats Granvik_, Mar 14 2010

%E More terms from _Antti Karttunen_, Sep 14 2017

%E Name corrected by _Steven Foster Clark_, Sep 05 2023