OFFSET
1,1
COMMENTS
Inspired by geometric interpretation of A001248.
Obviously, a(n) is a prime number, only for n = 1.
Subsequence of A000330.
Obviously, there is only one solution for a and b to the equation p*p = a*b where p is prime, if a > 1 and b > 1. So there can be only one rectangle that is composed of p^2 unit squares, if a > 1 and b > 1. That rectangle is the p X p square. Its uniqueness is a motivation for this sequence.
EXAMPLE
For a square composed of 4 unit squares, there are 5 squares.
MATHEMATICA
Table[Prime[n] (Prime[n] + 1) (2 Prime[n] + 1)/6, {n, 50}] (* Vincenzo Librandi, Sep 17 2015 *)
(#(#+1)(2#+1))/6&/@Prime[Range[40]] (* Harvey P. Dale, Sep 05 2022 *)
PROG
(PARI) a(n) = my(p=prime(n)); p * (p+1) * (2*p+1) / 6;
vector(40, n, a(n))
(Magma) [NthPrime(n)*(NthPrime(n)+1)*(2*NthPrime(n)+1)/6: n in [1..40]]; // Vincenzo Librandi, Sep 17 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Sep 16 2015
STATUS
approved