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.

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

Original entry on oeis.org

1, 2, 5, 12, 14, 23, 27, 59, 42, 40, 65, 109, 90, 61, 86, 261, 152, 142, 189, 179, 148, 115, 275, 473, 273, 148, 318, 265, 434, 674, 495, 1097, 320, 226, 430, 1093, 702, 271, 430, 757, 860, 832, 945, 485, 619, 373, 1127, 1969, 1032, 485, 698, 619, 1430, 838, 1030, 1105, 856, 556, 1769, 2791, 1890, 625, 1117, 4497, 1426, 1196, 2277, 935, 1220
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Cf. for example A061468 (one of the sequences this matches with).

Programs

  • PARI
    A000010(n) = eulerphi(n);
    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
    A286160(n) = (2 + ((A000010(n)+A046523(n))^2) - A000010(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286160.txt", n, " ", A286160(n)));
    
  • Python
    from sympy import factorint, totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(totient(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286160 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A046523 n)) 2) (- (A000010 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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