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.

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

This page as a plain text file.
%I A286255 #14 Feb 16 2025 08:33:44
%S A286255 2,5,12,14,23,27,38,63,40,27,80,90,23,61,216,152,80,90,80,148,61,27,
%T A286255 302,375,40,84,179,90,467,495,530,698,61,61,826,702,23,61,412,324,467,
%U A286255 495,80,265,148,27,1178,1323,109,148,142,90,302,430,412,430,61,27,1832,1890,23,142,2787,2410,601,495,80,148,601,495,2630,2700,23,142,265,148,601,495,1178
%N A286255 Compound filter: a(n) = P(A046523(n), A046523(1+n)), where P(n,k) is sequence A000027 used as a pairing function.
%H A286255 Antti Karttunen, <a href="/A286255/b286255.txt">Table of n, a(n) for n = 1..10000</a>
%H A286255 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286255 a(n) = (1/2)*(2 + ((A046523(n)+A046523(1+n))^2) - A046523(n) - 3*A046523(1+n)).
%o A286255 (PARI)
%o A286255 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 A286255 A286255(n) = (2 + ((A046523(n)+A046523(1+n))^2) - A046523(n) - 3*A046523(1+n))/2;
%o A286255 for(n=1, 10000, write("b286255.txt", n, " ", A286255(n)));
%o A286255 (Scheme) (define (A286255 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 1 n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 1 n)))) 2)))
%o A286255 (Python)
%o A286255 from sympy import factorint
%o A286255 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286255 def P(n):
%o A286255     f = factorint(n)
%o A286255     return sorted([f[i] for i in f])
%o A286255 def a046523(n):
%o A286255     x=1
%o A286255     while True:
%o A286255         if P(n) == P(x): return x
%o A286255         else: x+=1
%o A286255 def a(n): return T(a046523(n), a046523(n + 1)) # _Indranil Ghosh_, May 07 2017
%Y A286255 Cf. A000027, A046523, A286240, A286256, A286257, A286258.
%Y A286255 Cf. A005383 (after its initial term 3, gives the positions of 23's in this sequence).
%Y A286255 Cf. A051950 (one of the matches not matched by A046523 alone).
%K A286255 nonn
%O A286255 1,1
%A A286255 _Antti Karttunen_, May 07 2017