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

%I #24 Nov 10 2022 07:42:38

%S 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,

%T 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,

%U 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

%N a(n) = ((-1)^(n+1)*A002425(n)) modulo 5.

%H Andrew Howroyd, <a href="/A089612/b089612.txt">Table of n, a(n) for n = 1..1024</a>

%F 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).

%F Multiplicative with a(2^e) = 2^(e + 1) mod 5, a(p^e) = 1 for odd prime p. - _Andrew Howroyd_, Aug 01 2018

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 21/10. - _Amiram Eldar_, Nov 10 2022

%t Table[Mod[Numerator[2 / n (4^n - 1) BernoulliB[2 n]], 5], {n, 100}] (* _Vincenzo Librandi_, Aug 01 2018 *)

%o (PARI) a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%5

%o (PARI) a(n)=if(n%2, 1, 2*2^valuation(n,2) % 5); \\ _Andrew Howroyd_, Aug 01 2018

%o (Magma) [Numerator(2/n*(4^n-1)*Bernoulli(2*n)) mod 5: n in [1..100]]; // _Vincenzo Librandi_, Aug 01 2018

%Y Cf. A002425, A056832.

%K nonn,mult

%O 1,2

%A _Benoit Cloitre_, Dec 30 2003

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 July 23 09:37 EDT 2024. Contains 374547 sequences. (Running on oeis4.)