%I #15 May 09 2017 14:26:21
%S 1,1,2,1,3,2,2,1,7,3,2,2,3,2,5,1,3,7,2,3,16,2,2,2,10,3,29,2,3,5,2,1,
%T 16,3,5,7,3,2,5,3,3,16,2,2,12,2,2,2,7,10,5,3,3,29,5,2,16,3,2,5,3,2,67,
%U 1,21,16,2,3,16,5,2,7,3,3,14,2,16,5,2,3,121,3,2,16,21,2,5,2,3,12,5,2,16,2,5,2,3,7,67,10,3,5,2,3,23,3,2,29,3,5,5,2,3
%N Compound filter: a(n) = P(A286361(n), A286363(n)), where P(n,k) is sequence A000027 used as a pairing function.
%C This sequence packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027. These two components essentially give the prime signature of 4k+1 part and the prime signature of 4k+3 part, and they can be accessed from a(n) with functions A002260 and A004736. For example, A004431 lists all such numbers that the first component is larger than one and the second component is a perfect square.
%H Antti Karttunen, <a href="/A286364/b286364.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F a(n) = (1/2)*(2+((A286361(n)+A286363(n))^2) - A286361(n) - 3*A286363(n)).
%F Other identities. For all n >= 1:
%F a(A267099(n)) = A038722(a(n)).
%o (Scheme) (define (A286364 n) (* (/ 1 2) (+ (expt (+ (A286361 n) (A286363 n)) 2) (- (A286361 n)) (- (* 3 (A286363 n))) 2)))
%o (Python)
%o from sympy import factorint
%o from operator import mul
%o def P(n):
%o f = factorint(n)
%o return sorted([f[i] for i in f])
%o def a046523(n):
%o x=1
%o while True:
%o if P(n) == P(x): return x
%o else: x+=1
%o def A(n, k):
%o f = factorint(n)
%o return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
%o def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o def a(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3))) # _Indranil Ghosh_, May 09 2017
%Y Cf. A000027, A002260, A004431, A004736, A038722, A267099, A286361, A286363, A286365.
%K nonn
%O 1,3
%A _Antti Karttunen_, May 08 2017
|