login
Compound filter (3-adic valuation & signature for base-2 1-runs): a(n) = P(A051064(n), A278222(n)), where P(n,k) is sequence A000027 used as a pairing function.
4

%I #12 May 12 2017 03:33:00

%S 2,2,12,2,16,12,29,2,31,16,67,12,67,29,138,2,16,31,67,16,467,67,277,

%T 12,67,67,745,29,277,138,497,2,23,16,67,31,436,67,302,16,436,467,1771,

%U 67,1894,277,1129,12,67,67,668,67,1771,745,2557,29,302,277,2557,138,1129,497,2148,2,16,23,67,16,467,67,277,31,436,436,1832,67,1771,302,1129,16,566

%N Compound filter (3-adic valuation & signature for base-2 1-runs): a(n) = P(A051064(n), A278222(n)), where P(n,k) is sequence A000027 used as a pairing function.

%H Antti Karttunen, <a href="/A286464/b286464.txt">Table of n, a(n) for n = 1..10000</a>

%H Indranil Ghosh, <a href="/A286464/a286464.txt">Python program to generate the sequence</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 + ((A051064(n)+A278222(n))^2) - A051064(n) - 3*A278222(n)).

%o (PARI)

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of _M. F. Hasler_

%o A051064(n) = if(n<1, 0, 1+valuation(n, 3));

%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 A278222(n) = A046523(A005940(1+n));

%o A286464(n) = (1/2)*(2 + ((A051064(n)+A278222(n))^2) - A051064(n) - 3*A278222(n))

%o for(n=1, 10000, write("b286464.txt", n, " ", A286464(n)));

%o (Scheme) (define (A286464 n) (* (/ 1 2) (+ (expt (+ (A051064 n) (A278222 n)) 2) (- (A051064 n)) (- (* 3 (A278222 n))) 2)))

%Y Cf. A000027, A051064, A278222, A286462, A286463.

%K nonn

%O 1,1

%A _Antti Karttunen_, May 10 2017