login
A262247
Number of squares formed from a square composed of p^2 unit squares where p is n-th prime.
0
5, 14, 55, 140, 506, 819, 1785, 2470, 4324, 8555, 10416, 17575, 23821, 27434, 35720, 51039, 70210, 77531, 102510, 121836, 132349, 167480, 194054, 238965, 308945, 348551, 369564, 414090, 437635, 487369, 690880, 757966, 866525, 904890, 1113775, 1159076
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.
FORMULA
a(n) = prime(n) * (prime(n)+1) * (2*prime(n)+1) / 6.
a(n) = A000330(A000040(n)).
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