cp's OEIS Frontend

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.

A232597 a(n) = sum of odd k in 1..n for which Kronecker(k,n)=1.

This page as a plain text file.
%I A232597 #17 Nov 27 2017 00:36:16
%S A232597 1,1,1,4,1,6,1,8,13,13,18,8,13,31,1,64,38,25,50,40,23,78,26,24,124,
%T A232597 131,65,84,83,94,66,128,103,158,143,216,137,212,42,160,224,156,242,
%U A232597 176,132,327,147,176,513,297,259,312,303,246,170,224,303,365,509,240
%N A232597 a(n) = sum of odd k in 1..n for which Kronecker(k,n)=1.
%p A232597 A232597 := proc(n)
%p A232597     local a;
%p A232597     a := 0 ;
%p A232597     for k from 1 to n by 2 do
%p A232597         if numtheory[jacobi](k,n) = 1 then
%p A232597             a := a+k ;
%p A232597         end if;
%p A232597     end do:
%p A232597     a ;
%p A232597 end proc: # _R. J. Mathar_, May 25 2017
%o A232597 (PARI)
%o A232597 A232597(n) = {s=0; for(k=1, n, s=s+((k%2)*((1+kronecker(k, n))\2)*k)); return(s); }
%o A232597 for(n=1, 60, print1(A232597(n), ", "))
%o A232597 (PARI) a(n)=my(s); forstep(k=1,n,if(kronecker(k,n)==1, s+=k)); s \\ _Charles R Greathouse IV_, Nov 26 2013
%Y A232597 Restricted to primes: A232505(n) = a(A000040(n)). Cf. also A228131.
%K A232597 nonn
%O A232597 1,4
%A A232597 _Antti Karttunen_, Nov 26 2013