login
a(n) = (prime(n)^2 - 1)/24.
33

%I #113 Oct 27 2021 09:36:10

%S 1,2,5,7,12,15,22,35,40,57,70,77,92,117,145,155,187,210,222,260,287,

%T 330,392,425,442,477,495,532,672,715,782,805,925,950,1027,1107,1162,

%U 1247,1335,1365,1520,1552,1617,1650,1855,2072,2147,2185,2262,2380,2420,2625,2752,2882,3015

%N a(n) = (prime(n)^2 - 1)/24.

%C 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

%C 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

%C For primes => 5, a(n) == 0 or 2 (mod 5). - _Richard R. Forberg_, Aug 28 2013

%C 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

%C 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

%C 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

%H Charles R Greathouse IV, <a href="/A024702/b024702.txt">Table of n, a(n) for n = 3..10000</a>

%H Brady Haran and Matt Parker, <a href="https://www.youtube.com/watch?v=ZMkIiFs35HQ">Squaring Primes</a>, Numberphile video (2018).

%H Carlos Rivera, <a href="https://www.primepuzzles.net/puzzles/puzz_1060.htm">Puzzle 1060. Can you find more solutions?</a>, The Prime Puzzles and Problems Connection. [Asks for squares in this sequence]

%F a(n) = (A000040(n)^2 - 1)/24 = (A001248(n) - 1)/24. - _Omar E. Pol_, Dec 07 2011

%F a(n) = A005097(n-1)*A006254(n-1)/6. - _Bruno Berselli_, Dec 08 2011

%F a(n) = A084920(n)/24. - _R. J. Mathar_, Aug 23 2013

%F a(n) = A127922(n)/A000040(n) for n >= 3. - _César Aguilera_, Nov 01 2019

%e For n = 6, the 6th prime is 13, so a(6) = (13^2 - 1)/24 = 168/24 = 7.

%p A024702:=n->(ithprime(n)^2-1)/24: seq(A024702(n), n=3..70); # _Wesley Ivan Hurt_, Mar 01 2015

%t (Prime[Range[3,100]]^2-1)/24 (* _Vladimir Joseph Stephan Orlovsky_, Mar 15 2011 *)

%o (PARI) a(n)=prime(n)^2\24 \\ _Charles R Greathouse IV_, May 30 2013

%o (PARI) is(n)=my(k);issquare(24*n+1,&k)&&isprime(k) \\ _Charles R Greathouse IV_, May 31 2013

%Y Subsequence of generalized pentagonal numbers A001318.

%Y Cf. A075888.

%K nonn,easy

%O 3,2

%A _Clark Kimberling_, Dec 11 1999