%I #23 Oct 07 2024 02:04:16
%S 0,9,25,36,49,81,100,121,144,169,196,289,324,361,400,484,529,576,625,
%T 676,729,784,841,961,1156,1296,1369,1444,1600,1681,1849,1936,2116,
%U 2209,2304,2401,2500,2704,2809,2916,3136,3364,3481,3721,3844,4489,4624,5041,5184,5329,5476,5776
%N Numbers k such that k = Sum_{j=2..k+2} L(k/prime(j)) where L(n/p) is the Legendre symbol. Fixed points of A372725.
%H Paolo Xausa, <a href="/A372724/b372724.txt">Table of n, a(n) for n = 1..10000</a>
%F A positive k is a term if k is a square and its odd part is divisible by exactly one prime.
%p L := (n, k) -> NumberTheory:-LegendreSymbol(n, ithprime(k)):
%p s := n -> local k; add(L(n, k), k = 2..n + 2):
%p select(m -> m = s(m), [seq(0..400)]);
%p # Alternative:
%p isA := k -> (k = 0) or (issqr(k) and
%p nops(NumberTheory:-PrimeFactors(k/2^padic[ordp] (k, 2))) = 1):
%p select(isA, [seq(0..6000)]);
%t Join[{0}, Select[Range[100]^2, PrimeNu[#/2^IntegerExponent[#, 2]] == 1 &]] (* _Paolo Xausa_, Jul 10 2024 *)
%o (PARI) isok(k) = k == sum(j=2, k+2, kronecker(k, prime(j))); \\ _Michel Marcus_, May 22 2024
%Y Subsequence of A000290, and A069562 U {0}.
%Y Cf. A372725, A336101, A373087.
%K nonn
%O 1,2
%A _Peter Luschny_, May 22 2024