cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A286253 #10 Feb 16 2025 08:33:44
%S A286253 0,1,8,1,9,1,25,1,5,1,26,1,27,1,17,1,35,1,53,1,5,1,75,1,9,1,8,1,65,1,
%T A286253 131,1,5,1,13,1,90,1,12,1,104,1,134,1,5,1,186,1,14,1,8,1,152,1,18,1,5,
%U A286253 1,188,1,189,1,30,1,9,1,229,1,5,1,273,1,252,1,8,1,14,1,347,1,5,1,323,1,9,1,12,1,324,1,19,1,5,1,31,1,350,1,8,1,377,1,462,1,5
%N A286253 Compound filter: a(n) = P(A055396(n), A001511(1+n)), where P(n,k) is sequence A000027 used as a pairing function.
%H A286253 Antti Karttunen, <a href="/A286253/b286253.txt">Table of n, a(n) for n = 1..10000</a>
%H A286253 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286253 a(n) = (1/2)*(2 + ((A055396(n)+A001511(1+n))^2) - A055396(n) - 3*A001511(1+n)).
%o A286253 (PARI)
%o A286253 A001511(n) = (1+valuation(n,2));
%o A286253 A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from _Charles R Greathouse IV_, Apr 23 2015
%o A286253 A286253(n) = (2 + ((A055396(n)+A001511(1+n))^2) - A055396(n) - 3*A001511(1+n))/2;
%o A286253 for(n=1, 10000, write("b286253.txt", n, " ", A286253(n)));
%o A286253 (Scheme) (define (A286253 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A001511 (+ 1 n))) 2) (- (A055396 n)) (- (* 3 (A001511 (+ 1 n)))) 2)))
%o A286253 (Python)
%o A286253 from sympy import primepi, isprime, primefactors
%o A286253 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286253 def a049084(n): return primepi(n)*(1*isprime(n))
%o A286253 def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
%o A286253 def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
%o A286253 def a(n): return T(a055396(n), a001511(n + 1)) # _Indranil Ghosh_, May 07 2017
%Y A286253 Cf. A000027, A001511, A055396, A286164, A286251, A286252, A286254.
%K A286253 nonn
%O A286253 1,3
%A A286253 _Antti Karttunen_, May 07 2017