This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A089608 #25 Jan 04 2023 02:05:15 %S A089608 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, %T A089608 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, %U A089608 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 %N A089608 a(n) = ((-1)^(n+1)*A002425(n)) modulo 6. %C A089608 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). %H A089608 Antti Karttunen, <a href="/A089608/b089608.txt">Table of n, a(n) for n = 1..65536</a> %H A089608 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>. %H A089608 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>. %F A089608 a(n) = 5 - 4*A035263(n). %F A089608 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 7/3. - _Amiram Eldar_, Nov 28 2022 %F A089608 From _Amiram Eldar_, Jan 04 2023: (Start) %F A089608 Multiplicative with a(2^e) = 5 if e is odd, and 1 if e is even, a(p^e) = 1 for p >= 3. %F A089608 Dirichlet g.f.: zeta(s)*(2^s+5)/(2^s+1). (End) %t A089608 a[n_] := Mod[IntegerExponent[n, 2], 2] * 4 + 1; Array[a, 100] (* _Amiram Eldar_, Nov 28 2022 *) %o A089608 (PARI) a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%6 %o A089608 (PARI) a(n)=valuation(n,2)%2 * 4 + 1; \\ _Andrew Howroyd_, Aug 01 2018 %o A089608 (Scheme) %o A089608 (define (A035263 n) (let loop ((n n) (i 1)) (cond ((odd? n) (modulo i 2)) (else (loop (/ n 2) (+ 1 i)))))) %o A089608 (define (A089608 n) (- 5 (* 4 (A035263 n)))) %o A089608 ;; _Antti Karttunen_, Sep 11 2017 %Y A089608 Cf. A002425, A035263, A056832. %K A089608 nonn,mult %O A089608 1,2 %A A089608 _Benoit Cloitre_, Dec 30 2003 %E A089608 Keyword:mult added by _Andrew Howroyd_, Aug 01 2018