login
Intersection of A092572 and A155716: N = a^2 + 3b^2 = c^2 + 6d^2 for some positive integers a,b,c,d.
2

%I #17 Jan 20 2025 03:53:50

%S 7,28,31,49,63,73,79,97,100,103,112,124,127,151,175,193,196,199,217,

%T 223,241,252,271,279,292,313,316,337,343,367,388,400,409,412,433,439,

%U 441,448,457,463,484,487,496,508,511,553,567,577,601,604,607,631,657,673

%N Intersection of A092572 and A155716: N = a^2 + 3b^2 = c^2 + 6d^2 for some positive integers a,b,c,d.

%C From _Robert Israel_, Jan 19 2025: (Start)

%C If k is a term, then so is j^2 * k for all positive integers j.

%C The primes in this sequence appear to be A033199.

%C (End)

%H Robert Israel, <a href="/A155712/b155712.txt">Table of n, a(n) for n = 1..10000</a>

%p N:= 1000: # for terms <= N

%p A:= {seq(seq(a^2 + 3*b^2, b=1 .. floor(sqrt((N-a^2)/3))),a=1..floor(sqrt(N)))}

%p intersect {seq(seq(c^2 + 6*d^2, d = 1 .. floor(sqrt((N-c^2)/6))),c=1..floor(sqrt(N)))}:

%p sort(convert(A,list)); # _Robert Israel_, Jan 19 2025

%o (PARI) isA155712(n,/* optional 2nd arg allows to get other sequences */c=[6,3]) = { for(i=1,#c, for(b=1,sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) && next(2)); return);1}

%o for( n=1,999, isA155712(n) && print1(n",")) \\ Update to modern PARI syntax (& -> &&) by _M. F. Hasler_, Jan 18 2025

%Y Cf. A000404, A033199, A092572, A097268, A154777, A154778, A155716, A155717, A155560-A155578.

%K easy,nonn

%O 1,1

%A _M. F. Hasler_, Jan 25 2009