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!)
A089612 a(n) = ((-1)^(n+1)*A002425(n)) modulo 5. 1
1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 2, 1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 2, 1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 2, 1, 4, 1, 3, 1, 4, 1, 1, 1, 4, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 4, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Let S(1) = {1, 4} and S(n+1) = S(n)*S'(n), where S'(n) is obtained from S(n) by changing last term using the cyclic permutation 4->3->1->2->4; sequence is S(infinity).
Multiplicative with a(2^e) = 2^(e + 1) mod 5, a(p^e) = 1 for odd prime p. - Andrew Howroyd, Aug 01 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 21/10. - Amiram Eldar, Nov 10 2022
MATHEMATICA
Table[Mod[Numerator[2 / n (4^n - 1) BernoulliB[2 n]], 5], {n, 100}] (* Vincenzo Librandi, Aug 01 2018 *)
PROG
(PARI) a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%5
(PARI) a(n)=if(n%2, 1, 2*2^valuation(n, 2) % 5); \\ Andrew Howroyd, Aug 01 2018
(Magma) [Numerator(2/n*(4^n-1)*Bernoulli(2*n)) mod 5: n in [1..100]]; // Vincenzo Librandi, Aug 01 2018
CROSSREFS
Sequence in context: A327980 A094804 A232633 * A353776 A292269 A010127
KEYWORD
nonn,mult
AUTHOR
Benoit Cloitre, Dec 30 2003
STATUS
approved

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 March 29 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)