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.

A286034 Compound filter: a(n) = P(A046523(n), A161942(n)), where P(n,k) is sequence A000027 used as a pairing function.

This page as a plain text file.
%I A286034 #24 Feb 16 2025 08:33:44
%S A286034 1,8,3,49,8,34,3,239,124,97,8,165,30,34,34,1051,47,1237,17,508,21,97,
%T A286034 8,727,565,331,74,165,122,733,3,4403,34,502,34,7911,192,196,72,2302,
%U A286034 233,526,68,508,1237,97,8,3051,1774,5368,97,1782,380,727,97,727,51,1231,122,3220,498,34,288,18019,331,733,155,2713,34,733,47,35317,705,1897,873,1047,34
%N A286034 Compound filter: a(n) = P(A046523(n), A161942(n)), where P(n,k) is sequence A000027 used as a pairing function.
%H A286034 Antti Karttunen, <a href="/A286034/b286034.txt">Table of n, a(n) for n = 1..16384</a>
%H A286034 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286034 a(n) = (1/2)*(2 + ((A046523(n)+A161942(n))^2) - A046523(n) - 3*A161942(n)).
%o A286034 (PARI)
%o A286034 A000265(n) = (n >> valuation(n, 2));
%o A286034 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 A286034 A161942(n) = A000265(sigma(n));
%o A286034 A286034(n) = (2 + ((A046523(n)+A161942(n))^2) - A046523(n) - 3*A161942(n))/2;
%o A286034 for(n=1, 16384, write("b286034.txt", n, " ", A286034(n)));
%o A286034 (Scheme) (define (A286034 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A161942 n)) 2) (- (A046523 n)) (- (* 3 (A161942 n))) 2)))
%o A286034 (Python)
%o A286034 from sympy import factorint, divisors, divisor_sigma
%o A286034 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286034 def P(n):
%o A286034     f = factorint(n)
%o A286034     return sorted([f[i] for i in f])
%o A286034 def a046523(n):
%o A286034     x=1
%o A286034     while True:
%o A286034         if P(n) == P(x): return x
%o A286034         else: x+=1
%o A286034 def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
%o A286034 def a161942(n): return a000265(divisor_sigma(n))
%o A286034 def a(n): return T(a046523(n), a161942(n)) # _Indranil Ghosh_, May 07 2017
%Y A286034 Cf. A000027, A046523, A161942, A286260.
%K A286034 nonn
%O A286034 1,2
%A A286034 _Antti Karttunen_, May 07 2017