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.

A380520 Numbers m such that the sum of squares of nondivisors of m is prime.

Original entry on oeis.org

5, 6, 26, 38, 66, 166, 206, 238, 266, 318, 321, 333, 341, 369, 405, 406, 445, 458, 481, 553, 606, 658, 706, 784, 873, 893, 933, 946, 1125, 1166, 1173, 1273, 1286, 1293, 1353, 1546, 1578, 1606, 1666, 1678, 1705, 1726, 1745, 1773, 1781, 1786, 1858, 1906, 1918, 1941
Offset: 1

Views

Author

Michel Lagneau, Jan 26 2025

Keywords

Examples

			Nondivisors of 6 are {4, 5} and their sum of squares 4^2 + 5^2 = 41 is prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local d;
          isprime(n*(n+1)*(2*n+1)/6 - add(d^2,d=numtheory:-divisors(n)))
    end proc:
    select(filter, [$1..2000]); # Robert Israel, Feb 26 2025
  • Mathematica
    Q1[n_]:=(n > 0) && PrimeQ[n]; Select[Range[2000], Q1[#(#+1)(2#+1)/6 - DivisorSigma[2, #]] &]
  • PARI
    isok(k) = isprime(norml2(setminus([1..k], divisors(k)))); \\ Michel Marcus, Jan 28 2025