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.

A286144 Compound filter: a(n) = T(A000010(n), A257993(n)), where T(n,k) is sequence A000027 used as a pairing function.

This page as a plain text file.
%I A286144 #12 Feb 16 2025 08:33:44
%S A286144 1,2,3,5,10,8,21,14,21,14,55,19,78,27,36,44,136,34,171,44,78,65,253,
%T A286144 53,210,90,171,90,406,63,465,152,210,152,300,103,666,189,300,152,820,
%U A286144 103,903,230,300,275,1081,169,903,230,528,324,1378,208,820,324,666,434,1711,187,1830,495,666,560,1176,251,2211,560,990,324,2485,349,2628,702,820,702
%N A286144 Compound filter: a(n) = T(A000010(n), A257993(n)), where T(n,k) is sequence A000027 used as a pairing function.
%H A286144 Antti Karttunen, <a href="/A286144/b286144.txt">Table of n, a(n) for n = 1..10000</a>
%H A286144 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286144 a(n) = (1/2)*(2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n)).
%t A286144 Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {EulerPhi@ n, Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i]}, {n, 74}] (* _Michael De Vlieger_, May 04 2017 *)
%o A286144 (PARI)
%o A286144 A000010(n) = eulerphi(n);
%o A286144 A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
%o A286144 A286144(n) = (2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n))/2;
%o A286144 for(n=1, 10000, write("b286144.txt", n, " ", A286144(n)));
%o A286144 (Scheme) (define (A286144 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A257993 n)) 2) (- (A000010 n)) (- (* 3 (A257993 n))) 2)))
%o A286144 (Python)
%o A286144 from sympy import prime, primepi, gcd, totient
%o A286144 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286144 def a053669(n):
%o A286144     x=1
%o A286144     while True:
%o A286144         if gcd(prime(x), n) == 1: return prime(x)
%o A286144         else: x+=1
%o A286144 def a257993(n): return primepi(a053669(n))
%o A286144 def a(n): return T(totient(n), a257993(n)) # _Indranil Ghosh_, May 05 2017
%Y A286144 Cf. A000010, A000027, A257993, A286142, A286143, A286152, A286160, A286161, A286162, A286163, A286164.
%K A286144 nonn
%O A286144 1,2
%A A286144 _Antti Karttunen_, May 04 2017