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.

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

Original entry on oeis.org

2, 12, 5, 40, 5, 84, 12, 86, 14, 142, 5, 148, 23, 216, 27, 367, 5, 265, 23, 148, 27, 412, 12, 430, 59, 142, 44, 832, 5, 1860, 23, 698, 61, 826, 27, 856, 23, 412, 27, 1402, 5, 850, 80, 148, 90, 1384, 12, 1759, 40, 265, 27, 607, 23, 1105, 61, 430, 27, 2086, 5, 2140, 80, 2352, 148, 4342, 27, 850, 23, 832, 27, 5080, 5, 2998, 80, 142, 148, 832, 27, 2956, 138, 1426
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A001359 (gives the positions of 5's), A049002 (of 12's), A115093 (of 23's).

Programs

  • PARI
    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
    A286256(n) = (2 + ((A046523(n)+A046523(2+n))^2) - A046523(n) - 3*A046523(2+n))/2;
    for(n=1, 10000, write("b286256.txt", n, " ", A286256(n)));
    
  • Python
    from sympy import factorint
    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(a046523(n), a046523(n + 2)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286256 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 2 n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 2 n)))) 2)))
    

Formula

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