%I #17 Feb 16 2025 08:33:44
%S 2,12,5,40,5,84,12,86,14,142,5,148,23,216,27,367,5,265,23,148,27,412,
%T 12,430,59,142,44,832,5,1860,23,698,61,826,27,856,23,412,27,1402,5,
%U 850,80,148,90,1384,12,1759,40,265,27,607,23,1105,61,430,27,2086,5,2140,80,2352,148,4342,27,850,23,832,27,5080,5,2998,80,142,148,832,27,2956,138,1426
%N Compound filter: a(n) = P(A046523(n), A046523(2+n)), where P(n,k) is sequence A000027 used as a pairing function.
%H Antti Karttunen, <a href="/A286256/b286256.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F a(n) = (1/2)*(2 + ((A046523(n)+A046523(2+n))^2) - A046523(n) - 3*A046523(2+n)).
%o (PARI)
%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from _Charles R Greathouse IV_, Aug 17 2011
%o A286256(n) = (2 + ((A046523(n)+A046523(2+n))^2) - A046523(n) - 3*A046523(2+n))/2;
%o for(n=1, 10000, write("b286256.txt", n, " ", A286256(n)));
%o (Scheme) (define (A286256 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 2 n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 2 n)))) 2)))
%o (Python)
%o from sympy import factorint
%o def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%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): return T(a046523(n), a046523(n + 2)) # _Indranil Ghosh_, May 07 2017
%Y Cf. A000027, A046523, A286255, A286257, A286258.
%Y Cf. A001359 (gives the positions of 5's), A049002 (of 12's), A115093 (of 23's).
%K nonn,changed
%O 1,1
%A _Antti Karttunen_, May 07 2017