OFFSET
2,1
COMMENTS
a(n) is the average of the numbers from 1 to prime(n)^2. It's also the average of the primes in a prime(n) X prime(n) example of Haga's conjecture (see link below).
If a(n) is a square c^2, then prime(n) is an NSW prime (A088165) and a prime RMS number (A140480). - Ctibor O. Zizka, Aug 26 2008
The sequence starts with a(2) = (3^2 + 1)/2 = 5 since a(1) would be (2^2 + 1)/2 = 5/2. - Michael B. Porter, Dec 14 2009
LINKS
Harry J. Smith, Table of n, a(n) for n = 2..1000
Carlos Rivera, Conjecture 26. The Calendar-like square Conjecture, The Prime Puzzles and Problems Connection.
FORMULA
a(n) = 1 + A084921(n). - R. J. Mathar, Sep 30 2011
a(n) mod 4 = 1. - Altug Alkan, Apr 08 2016
Product_{n>=2} (1 - 1/a(n)) = 2/3. - Amiram Eldar, Jun 03 2022
MAPLE
MATHEMATICA
a[n_] := (Prime[n]^2+1)/2; Table[a[n], {n, 2, 50}]
PROG
(PARI) A066885(n) = (prime(n)^2+1)/2 \\ Michael B. Porter, Dec 14 2009
(PARI) { for (n=2, 1000, write("b066885.txt", n, " ", (prime(n)^2 + 1)/2) ) } \\ Harry J. Smith, Apr 04 2010
(Magma) [(NthPrime(n)^2+1)/2 : n in [2..50]]; // Wesley Ivan Hurt, Jun 23 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Jan 22 2002
EXTENSIONS
Edited by Dean Hickerson, Jun 08 2002
STATUS
approved