login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A089608
a(n) = ((-1)^(n+1)*A002425(n)) modulo 6.
2
1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 1
OFFSET
1,2
COMMENTS
Let S(1)={1} and S(n+1)=S(n)S'(n) where S'(n) is obtained from S(n) by changing last term using the cyclic permutation 1->5->1, then sequence is S(infinity).
FORMULA
a(n) = 5 - 4*A035263(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 7/3. - Amiram Eldar, Nov 28 2022
From Amiram Eldar, Jan 04 2023: (Start)
Multiplicative with a(2^e) = 5 if e is odd, and 1 if e is even, a(p^e) = 1 for p >= 3.
Dirichlet g.f.: zeta(s)*(2^s+5)/(2^s+1). (End)
MATHEMATICA
a[n_] := Mod[IntegerExponent[n, 2], 2] * 4 + 1; Array[a, 100] (* Amiram Eldar, Nov 28 2022 *)
PROG
(PARI) a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%6
(PARI) a(n)=valuation(n, 2)%2 * 4 + 1; \\ Andrew Howroyd, Aug 01 2018
(Scheme)
(define (A035263 n) (let loop ((n n) (i 1)) (cond ((odd? n) (modulo i 2)) (else (loop (/ n 2) (+ 1 i))))))
(define (A089608 n) (- 5 (* 4 (A035263 n))))
;; Antti Karttunen, Sep 11 2017
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Benoit Cloitre, Dec 30 2003
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Aug 01 2018
STATUS
approved