OFFSET
1,1
LINKS
Katie Khan, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=7, the 7th prime = 17 and those digits 1^2 + 7^2 = 50 = a(7).
MATHEMATICA
a[n_]:=Norm[IntegerDigits[Prime[n]]]^2; Array[a, 64] (* Stefano Spezia, Oct 03 2024 *)
PROG
(PARI) a(n) = norml2(digits(prime(n))); \\ Michel Marcus, Oct 03 2024
(Python)
from sympy import prime
def A376714(n): return sum((0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[int(d)] for d in str(prime(n)) if d>'0') # Chai Wah Wu, Oct 04 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Katie Khan, Oct 02 2024
STATUS
approved