login
(Sum_{i=1..n} prime(i)) mod 4.
1

%I #8 Jul 28 2018 05:17:33

%S 0,2,1,2,1,0,1,2,1,0,1,0,1,2,1,0,1,0,1,0,3,0,3,2,3,0,1,0,3,0,1,0,3,0,

%T 3,0,3,0,3,2,3,2,3,2,3,0,3,2,1,0,1,2,1,2,1,2,1,2,1,2,3,2,3,2,1,2,3,2,

%U 3,2,3,0,3,2,3,2,1,2,3,0,1,0,1,0,1,0,3,0,1,2,1,0,3,2,1,0,3,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,1,0,1,0,3,0,3,0

%N (Sum_{i=1..n} prime(i)) mod 4.

%C Inspired by A103271, prime(n)+prime(n+1) mod 4.

%F a(n) = A007504(n) mod 4.

%o (PARI) A272356(n,print_all=1,a=Mod(0,4))={n&&forprime(p=2,,a+=p;print_all&&print1(lift(a)",");n--||break);lift(a)}

%Y Cf. A103271, A007504.

%K nonn

%O 0,2

%A _M. F. Hasler_, Apr 26 2016