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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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, 131, 65, 84, 83, 94, 66, 128, 103, 158, 143, 216, 137, 212, 42, 160, 224, 156, 242, 176, 132, 327, 147, 176, 513, 297, 259, 312, 303, 246, 170, 224, 303, 365, 509, 240
Offset: 1

Views

Author

Antti Karttunen, Nov 26 2013

Keywords

Crossrefs

Restricted to primes: A232505(n) = a(A000040(n)). Cf. also A228131.

Programs

  • Maple
    A232597 := proc(n)
        local a;
        a := 0 ;
        for k from 1 to n by 2 do
            if numtheory[jacobi](k,n) = 1 then
                a := a+k ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, May 25 2017
  • PARI
    A232597(n) = {s=0; for(k=1, n, s=s+((k%2)*((1+kronecker(k, n))\2)*k)); return(s); }
    for(n=1, 60, print1(A232597(n), ", "))
    
  • PARI
    a(n)=my(s); forstep(k=1,n,if(kronecker(k,n)==1, s+=k)); s \\ Charles R Greathouse IV, Nov 26 2013
Showing 1-1 of 1 results.