login
A376714
Sum of squares of the decimal digits of the n-th prime.
2
4, 9, 25, 49, 2, 10, 50, 82, 13, 85, 10, 58, 17, 25, 65, 34, 106, 37, 85, 50, 58, 130, 73, 145, 130, 2, 10, 50, 82, 11, 54, 11, 59, 91, 98, 27, 75, 46, 86, 59, 131, 66, 83, 91, 131, 163, 6, 17, 57, 89, 22, 94, 21, 30, 78, 49, 121, 54, 102, 69, 77, 94, 58, 11
OFFSET
1,1
FORMULA
a(n) = A003132(A000040(n)).
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