login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286254 Compound filter: a(n) = P(A001511(n), A055396(1+n)), where P(n,k) is sequence A000027 used as a pairing function. 4

%I #9 May 07 2017 21:34:07

%S 1,5,1,13,1,12,1,14,1,17,1,31,1,5,1,60,1,38,1,9,1,47,1,19,1,5,1,69,1,

%T 68,1,27,1,8,1,94,1,5,1,124,1,107,1,9,1,122,1,33,1,5,1,156,1,8,1,14,1,

%U 155,1,193,1,5,1,43,1,192,1,9,1,212,1,280,1,5,1,18,1,255,1,20,1,278,1,13,1,5,1,355,1,12,1,9,1,8,1,441,1,5,1,381,1,380,1,14

%N Compound filter: a(n) = P(A001511(n), A055396(1+n)), where P(n,k) is sequence A000027 used as a pairing function.

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

%H MathWorld, <a href="http://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>

%F a(n) = (1/2)*(2 + ((A001511(n)+A055396(1+n))^2) - A001511(n) - 3*A055396(1+n)).

%o (PARI)

%o A001511(n) = (1+valuation(n,2));

%o A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from _Charles R Greathouse IV_, Apr 23 2015

%o A286254(n) = (2 + ((A001511(n)+A055396(1+n))^2) - A001511(n) - 3*A055396(1+n))/2;

%o for(n=1, 10000, write("b286254.txt", n, " ", A286254(n)));

%o (Scheme) (define (A286254 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A055396 (+ 1 n))) 2) (- (A001511 n)) (- (* 3 (A055396 (+ 1 n)))) 2)))

%o (Python)

%o from sympy import primepi, isprime, primefactors

%o def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2

%o def a049084(n): return primepi(n)*(1*isprime(n))

%o def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))

%o def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")

%o def a(n): return T(a001511(n), a055396(n + 1)) # _Indranil Ghosh_, May 07 2017

%Y Cf. A000027, A001511, A055396, A253790, A286161, A286251, A286252, A286253.

%K nonn

%O 1,2

%A _Antti Karttunen_, May 07 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)