login
A242111
Number of nonnegative k such that k^2 + 2 divides n^2 + 2.
1
1, 1, 3, 1, 4, 2, 2, 2, 5, 1, 5, 2, 2, 2, 7, 1, 4, 2, 2, 3, 4, 1, 6, 2, 2, 3, 4, 1, 4, 2, 3, 2, 8, 1, 4, 2, 3, 2, 4, 1, 5, 4, 2, 2, 7, 1, 4, 3, 2, 3, 5, 1, 8, 2, 2, 2, 4, 1, 11, 3, 2, 3, 4, 2, 4, 2, 2, 2, 5, 2, 6, 3, 2, 2, 7, 1, 7, 2, 2, 2, 7, 1, 5, 2, 2, 3, 6, 1, 4, 2, 2, 3, 7, 1, 5, 4, 3, 2, 4, 1, 4, 2, 3, 3, 5, 1, 4, 3, 3, 3, 4, 1, 8, 4, 2, 2, 4, 1, 6, 2, 3, 2, 5, 1, 6, 2, 2, 2
OFFSET
0,3
COMMENTS
a(A067201(n)) = 1, but these are not the only cases where a(k) = 1.
LINKS
FORMULA
G.f.: Sum_{k>=0} (Sum_{i in S(k)} x^i)/(1 - x^(k^2+2)) where S(k) = {i : 0 <= i < k^2 + 2, i^2 + 2 == 0 (mod k^2 + 2)}.
EXAMPLE
For n=2, n^2+2=6 is divisible by 0^2+2=2, 1^2+2=3 and 2^2+2=6 so a(2)=3.
MAPLE
a:= n -> nops(select(t -> issqr(t-2), numtheory:-divisors(n^2+2))):
seq(a(n), n=0..100);
PROG
(PARI) a(n) = my(m=n^2+2); sum(k=0, n, !(m % (k^2+2))); \\ Michel Marcus, Jun 12 2024
CROSSREFS
Sequence in context: A174907 A237016 A135822 * A209919 A116537 A194307
KEYWORD
nonn
AUTHOR
Robert Israel, Aug 15 2014
STATUS
approved