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.

A338930 Numbers k such that Sum_{d | k} (d^2 mod k) is prime.

Original entry on oeis.org

8, 16, 18, 21, 39, 45, 55, 57, 93, 98, 99, 100, 111, 119, 129, 144, 153, 162, 183, 203, 205, 219, 231, 237, 245, 261, 273, 291, 309, 341, 355, 377, 381, 413, 417, 429, 471, 481, 484, 489, 505, 511, 513, 517, 543, 583, 603, 609, 629, 637, 639, 651, 655, 669, 676, 687, 689, 697, 707, 722, 723, 731
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 16 2020

Keywords

Comments

Terms that are even are in A028982.

Examples

			a(3) = 18 is in the sequence because Sum_{d|18} (d^2 mod 18) =  (1^2 mod 18) + (2^2 mod 18) + (3^2 mod 18) + (6^2 mod 18) + (9^2 mod 18) + (18^2 mod 18) = 1 + 4 + 9 + 0 + 9 + 0 = 23 is prime.
		

Crossrefs

Cf. A028982.

Programs

  • Maple
    filter:= proc(n) local t;
      isprime(add(t^2 mod n, t = numtheory:-divisors(n)))
    end proc:
    select(filter, [$1..1000]);
  • Mathematica
    Select[Range[800],PrimeQ[Total[PowerMod[Divisors[#],2,#]]]&] (* Harvey P. Dale, Dec 31 2021 *)
  • PARI
    isok(m) = isprime(sumdiv(m, d, lift(Mod(d, m)^2))); \\ Michel Marcus, Nov 16 2020