[go: up one dir, main page]

login
Search: a154282 -id:a154282
     Sort: relevance | references | number | modified | created      Format: long | short | data
Dirichlet inverse of A019590; Fully multiplicative with a(2^e) = (-1)^e, a(p^e) = 0 for odd primes p.
+10
15
1, -1, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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
OFFSET
1,1
COMMENTS
Equals +1 if n is an even power of 2 (2^0, 2^2, 2^4,...), -1 if n is an odd power of 2 (2^1, 2^3, 2^5,..) and zero anywhere else.
Mobius transform of A035263. - R. J. Mathar, Jul 14 2012
LINKS
Mats Granvik (first 220 terms) & Antti Karttunen, Table of n, a(n) for n = 1..65536
FORMULA
Abs(a(n)) = A036987(n-1) = A209229(n).
a(n) is multiplicative with a(2^e) = (-1)^e, a(p^e) = 0^e if p>2. - Michael Somos, Jul 05 2009
G.f. A(x) satisfies x = A(x) + A(x^2).
Dirichlet g.f.: (1 + 2^(-s))^(-1). - Michael Somos, Jul 05 2009
a(1) = 1, after which: a(2n) = -a(n), a(2n+1) = 0. - Antti Karttunen, Jul 24 2017
EXAMPLE
x - x^2 + x^4 - x^8 + x^16 - x^32 + x^64 - x^128 + x^256 - x^512 + ...
MAPLE
a:= n-> (p-> `if`(2^p=n, (-1)^p, 0))(ilog2(n)):
seq(a(n), n=1..95); # Alois P. Heinz, Feb 18 2024
MATHEMATICA
nn = 95; a = PadRight[{1, 1}, nn, 0]; Inverse[Table[Table[If[Mod[n, k] == 0, a[[n/k]], 0], {k, 1, nn}], {n, 1, nn}]][[All, 1]] (* Mats Granvik, Jul 24 2017 *)
PROG
(PARI) {a(n) = if( n < 2, n == 1, - a(n / 2))} /* Michael Somos, Jul 05 2009 */
(Scheme) (define (A154269 n) (cond ((= 1 n) 1) ((even? n) (* -1 (A154269 (/ n 2)))) (else 0))) ;; Antti Karttunen, Jul 24 2017
CROSSREFS
Cf. A209229 (gives the absolute values).
KEYWORD
sign,mult
AUTHOR
Mats Granvik, Jan 06 2009
EXTENSIONS
Alternative description added to the name by Antti Karttunen, Jul 24 2017
STATUS
approved
Dirichlet inverse of A154272; Fully multiplicative with a(3^e) = (-1)^e, a(p^e) = 0 for primes p <> 3.
+10
8
1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 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, 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
OFFSET
1,1
COMMENTS
Abs(A154272) is a Fredholm-Rueppel-like sequence.
Sequence equals +1 if n is an even power of 3 (3^0, 3^2, 3^4,...), equals -1 if n is an odd power of 3 (3^1, 3^3, 3^5, 3^7,...) and zero elsewhere. - Comment edited by R. J. Mathar, Jun 24 2013
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..59049 (terms 1..220 from Mats Granvik)
FORMULA
Fully multiplicative with a(3) = -1, a(p) = 0 for primes p <> 3. - Antti Karttunen, Jul 24 2017
From Amiram Eldar, Nov 03 2023: (Start)
abs(a(n)) = A225569(n-1).
Dirichlet g.f.: 1/(1+3^(-s)). (End)
MATHEMATICA
nn = 95; a = PadRight[{1, 0, 1}, nn, 0]; Inverse[Table[Table[If[Mod[n, k] == 0, a[[n/k]], 0], {k, 1, nn}], {n, 1, nn}]][[All, 1]] (* Mats Granvik, Jul 24 2017 *)
PROG
(PARI) A154271(n) = { my(k=valuation(n, 3)); if((3^k)==n, (-1)^k, 0); }; \\ Antti Karttunen, Jul 24 2017
(Scheme) (define (A154271 n) (cond ((= 1 n) 1) ((zero? (modulo n 3)) (* -1 (A154271 (/ n 3)))) (else 0))) ;; Antti Karttunen, Jul 24 2017
CROSSREFS
Cf. A154272, A154269, A014578 (Möbius inverse), A154282, A225569.
Cf. A225569 (gives the absolute values when interpreted as the characteristic function of powers of 3, i.e., with starting offset 1 instead of 0).
KEYWORD
sign,mult,easy
AUTHOR
Mats Granvik, Jan 06 2009
EXTENSIONS
Alternative description added to the name by Antti Karttunen, Jul 24 2017
STATUS
approved
1,0,0,1 followed by 0,0,0...
+10
1
1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,1
COMMENTS
Dirichlet inverse of this sequence is A154282.
FORMULA
Multiplicative with a(2^2) = 1, a(2^e) = 0 for e<>2, a(p^e) = 0 for odd prime p. - Andrew Howroyd, Aug 05 2018
MATHEMATICA
PadRight[{1, 0, 0, 1}, 120, 0] (* Harvey P. Dale, Aug 06 2012 *)
PROG
(PARI) a(n)={n==1 || n==4} \\ Andrew Howroyd, Aug 05 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Mats Granvik, Jan 06 2009
STATUS
approved

Search completed in 0.009 seconds