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!)
A177053 Numbers k such that sum of the decimal digits of k is a quadratic residue modulo k. 0

%I #10 Feb 01 2016 11:37:40

%S 1,2,3,4,5,6,7,8,9,10,13,15,17,18,22,27,31,36,37,38,39,40,41,45,54,58,

%T 62,63,66,71,72,74,77,79,81,82,83,86,88,89,90,97,100,103,106,108,111,

%U 112,114,117,121,122,126,130,131,133,135,137,138,139,141,144,150,153,156,157,159,161,162,163,167,169,171,177,178,179,180

%N Numbers k such that sum of the decimal digits of k is a quadratic residue modulo k.

%e 159 is in the sequence because L((1+5+9)/159) = L(15/159) = 1 where L(a/b) is the Legendre symbol of a and b, which is defined to be 1 if a is a quadratic residue (mod b) and -1 if a is a quadratic non-residue (mod b).

%p isA177053 := proc(n) is(numtheory[quadres](A007953(n),n) =1 ); end proc:

%p for n from 1 to 140 do if isA177053(n) then printf("%d,",n); end if; end do: # _R. J. Mathar_, Dec 12 2010

%o (PARI) isok(n) = issquare(Mod(sumdigits(n), n)); \\ _Michel Marcus_, Feb 01 2016

%K nonn,base

%O 1,2

%A _Michel Lagneau_, Dec 09 2010

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 April 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)