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.

Original entry on oeis.org

1, 2, 3, 5, 10, 8, 21, 14, 21, 14, 55, 19, 78, 27, 36, 44, 136, 34, 171, 44, 78, 65, 253, 53, 210, 90, 171, 90, 406, 63, 465, 152, 210, 152, 300, 103, 666, 189, 300, 152, 820, 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
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    A000010(n) = eulerphi(n);
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286144(n) = (2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n))/2;
    for(n=1, 10000, write("b286144.txt", n, " ", A286144(n)));
    
  • Python
    from sympy import prime, primepi, gcd, totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(totient(n), a257993(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286144 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A257993 n)) 2) (- (A000010 n)) (- (* 3 (A257993 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n)).