OFFSET
1,2
COMMENTS
For n > 1, a(n) == 0 (mod 4).
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5)=12 because 5^2 mod A014442(5) = 25 mod 13 = 12.
MAPLE
with(numtheory):
for n from 1 to 500 do:
p:=n^2+1:x:=factorset(p):n0:=nops(x):r:=irem(n^2, x[n0]):
printf(`%d, `, r):
od:
MATHEMATICA
Table[Mod[n^2, FactorInteger[n^2+1, FactorComplete->True][[-1, 1]]], {n, 100}]
PROG
(PARI) a(n) = lift(Mod(n, vecmax(factor(n^2+1)[, 1]))^2); \\ Michel Marcus, Sep 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Nov 11 2014
EXTENSIONS
Edited: exchanged name with an old comment. Old name as an alternative formula. Keyword easy added. - Wolfdieter Lang, Nov 29 2014
Redundancy in Name and in Formula section removed (at the suggestion of Michel Marcus) by Jon E. Schoenfield, Sep 13 2017
STATUS
approved