OFFSET
3,2
COMMENTS
Note that p^2 - 1 is always divisible by 24 since p == 1 or 2 (mod 3), so p^2 == 1 (mod 3) and p == 1, 3, 5, or 7 (mod 8) so p^2 == 1 (mod 8). - Michael B. Porter, Sep 02 2016
For n > 3 and m > 1, a(n) = A000330(m)/(2*m + 1), where 2*m + 1 = prime(n). For example, for m = 8, 2*m + 1 = 17 = prime(7), A000330(8) = 204, 204/17 = 12 = a(7). - Richard R. Forberg, Aug 20 2013
For primes => 5, a(n) == 0 or 2 (mod 5). - Richard R. Forberg, Aug 28 2013
The only primes in this sequence are 2, 5 and 7 (checked up to n = 10^7). The set of prime factors, however, appears to include all primes. - Richard R. Forberg, Feb 28 2015
Subsequence of generalized pentagonal numbers (cf. A001318): a(n) = k_n*(3*k_n - 1)/2, for k_n in {1, -1, 2, -2, 3, -3, 4, 5, -5, -6, 7, -7, 8, 9, 10, -10, ...} = A024699(n-2)*((A000040(n) mod 6) - 3)/2, n >= 3. - Daniel Forgues, Aug 02 2016
The only primes in this sequence are indeed 2, 5 and 7. For a prime p >= 5, if both p + 1 and p - 1 contains a prime factor > 3, then (p^2 - 1)/24 = (p + 1)*(p - 1)/24 contains at least 2 prime factors, so at least one of p + 1 and p - 1 is 3-smooth. Let's call it s. Also, If (p^2 - 1)/24 is a prime, then A001222(p^2-1) = 5. Since A001222(p+1) and A001222(p-1) are both at least 2, A001222(s) <= 5 - 2 = 3. From these we can see the only possible cases are p = 7, 11 and 13. - Jianing Song, Dec 28 2018
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 3..10000
Brady Haran and Matt Parker, Squaring Primes, Numberphile video (2018).
Carlos Rivera, Puzzle 1060. Can you find more solutions?, The Prime Puzzles and Problems Connection. [Asks for squares in this sequence]
FORMULA
a(n) = A084920(n)/24. - R. J. Mathar, Aug 23 2013
EXAMPLE
For n = 6, the 6th prime is 13, so a(6) = (13^2 - 1)/24 = 168/24 = 7.
MAPLE
MATHEMATICA
(Prime[Range[3, 100]]^2-1)/24 (* Vladimir Joseph Stephan Orlovsky, Mar 15 2011 *)
PROG
(PARI) a(n)=prime(n)^2\24 \\ Charles R Greathouse IV, May 30 2013
(PARI) is(n)=my(k); issquare(24*n+1, &k)&&isprime(k) \\ Charles R Greathouse IV, May 31 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Dec 11 1999
STATUS
approved