OFFSET
1,3
COMMENTS
The sequence is not monotone, and not one-to-one: a(95)=a(97)=23038.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The first three primes are 2, 3, 5, so a(3) = (2^2 mod 5) + (3^2 mod 5) = 4 + 4 = 8.
MAPLE
P:= [seq(ithprime(i), i=1..100)]:
seq(add(P[i]^2 mod P[n], i=1..n-1), n=1..100);
PROG
(PARI) a(n) = my(p=prime(n)); sum(i=1, n-1, lift(Mod(prime(i), p)^2)); \\ Michel Marcus, Nov 11 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 10 2020
STATUS
approved