%I #16 Feb 16 2025 08:33:44
%S 2,5,5,25,5,27,23,44,14,61,5,117,38,27,27,226,23,90,23,90,27,142,5,
%T 375,40,27,86,148,5,495,80,698,27,61,27,702,80,61,27,765,5,625,23,90,
%U 148,61,23,1224,109,90,27,832,5,324,61,324,61,142,23,2013,23,84,90,2410,27,625,302,90,27,625,23,2998,80,27,90,265,61,495,23,1426,152,601,5,2013,142,27,142
%N Compound filter: a(n) = P(A046523(n), A046523(2n+1)), where P(n,k) is sequence A000027 used as a pairing function.
%H Antti Karttunen, <a href="/A286258/b286258.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)+1))^2) - A046523(n) - 3*A046523((2*n)+1)).
%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 A286258(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)+1))^2) - A046523(n) - 3*A046523((2*n)+1));
%o for(n=1, 10000, write("b286258.txt", n, " ", A286258(n)));
%o (Scheme) (define (A286258 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 1 n n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 1 n 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(2*n + 1)) # _Indranil Ghosh_, May 07 2017
%Y Cf. A000027, A046523, A286255, A286256, A286257.
%Y Cf. A005384 (gives the positions of 5's), A234095 (of 23's).
%K nonn,changed
%O 1,1
%A _Antti Karttunen_, May 07 2017