login
a(n) = A014284(n^2) + A014284(n^2-1).
0

%I #23 Aug 10 2023 07:16:05

%S 1,17,137,611,1839,4405,9101,16859,28987,46663,71797,105863,151259,

%T 209895,284777,378661,493863,634985,804801,1007439,1245345,1526369,

%U 1851971,2227153,2658287,3151447,3711837,4343483,5053859,5849959,6739255,7727399,8825137,10034745

%N a(n) = A014284(n^2) + A014284(n^2-1).

%F a(n) = 2*A014284(n^2-1) + A008578(n^2). - _Michel Marcus_, Aug 10 2023

%t nn = 34; s = Accumulate[{1}~Join~Prime@ Range[nn^2]]; {1}~Join~Array[Total@ s[[# - 1 ;; #]] &[#^2] &, nn - 1, 2] (* _Michael De Vlieger_, Aug 10 2023 *)

%o (PARI) f(n) = if (n, 1 + vecsum(primes(n-1)), 0); \\ A014284

%o a(n) = f(n^2) + f(n^2-1); \\ _Michel Marcus_, Aug 10 2023

%Y Cf. A008578, A014284.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Mar 02 2023