OFFSET
1,12
EXAMPLE
a(12) = 2 because 12 = 2*6 (p = 2 and q = 6^2 + 1 = 37) and 12 = 3*4 (p = 3 and q = 4^2 + 1 = 17).
PROG
(Magma) [#[p: p in [1..n] | n mod p eq 0 and IsPrime(p) and IsPrime((n^2 div p^2) + 1)]: n in [1..100]];
(PARI) a(n) = sumdiv(n, p, isprime(p) && isprime((n/p)^2+1)); \\ Michel Marcus, Dec 23 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 22 2022
STATUS
approved