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.

A187929 Odd numbers k such that 1^((k-1)/2) + 2^((k-1)/2) + .... + (k-1)^((k-1)/2) == 0 (mod k).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 27, 29, 31, 35, 37, 39, 41, 43, 47, 51, 53, 55, 59, 61, 63, 67, 71, 73, 75, 77, 79, 83, 85, 87, 89, 91, 95, 97, 99, 101, 103, 107, 109, 111, 113, 115, 119, 123, 125, 127, 131, 135, 137, 139, 143, 147, 149, 151, 155, 157, 159
Offset: 1

Views

Author

Keywords

Comments

Asymptotic density is 0.379...

Crossrefs

Cf. A007850.

Programs

  • Mathematica
    gi[n_]:=Mod[Sum[PowerMod[j,(n-1)/2,n],{j,n-1}],n]; Select[ Range[1,300,2], gi[#]==0&]
  • PARI
    is(n)=my(e=(n-1)/2);sum(k=1,n-1,Mod(k,n)^e)==0;
    select(is,vector(1000,i,2*i-1)) \\ on older versions, switch the arguments
    \\ Charles R Greathouse IV, Mar 19 2011