OFFSET
1,1
MATHEMATICA
Table[If[(m9=Mod[Prime[n]^2, 9])==0, 9, m9], {n, 200}]
PROG
(Python)
from sympy import prime
def A166923(n):
....return 1 + (prime(n)**2-1) % 9 # Chai Wah Wu, Sep 03 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Oct 23 2009
EXTENSIONS
Definition corrected by Chai Wah Wu, Sep 03 2014
STATUS
approved