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.

A286386 Compound filter: a(n) = 2*A286473(n) + (1 if n is a square, 0 otherwise).

Original entry on oeis.org

3, 12, 14, 21, 10, 28, 14, 36, 31, 44, 14, 52, 10, 60, 46, 69, 10, 76, 14, 84, 62, 92, 14, 100, 43, 108, 78, 116, 10, 124, 14, 132, 94, 140, 58, 149, 10, 156, 110, 164, 10, 172, 14, 180, 126, 188, 14, 196, 63, 204, 142, 212, 10, 220, 90, 228, 158, 236, 14, 244, 10, 252, 174, 261, 106, 268, 14, 276, 190, 284, 14, 292, 10, 300, 206, 308, 94, 316, 14, 324, 223
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Cf. A000290 (gives the positions off odd terms), A010052, A286473, A286366, A286388.

Programs

  • Python
    from sympy import sqrt, divisors, primefactors
    import math
    def a010052(n): return 1 if n<1 else int(math.floor(sqrt(n))) - int(math.floor(sqrt(n - 1)))
    def a286473(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4)
    def a(n): return 2*a286473(n) + a010052(n) # Indranil Ghosh, May 14 2017
  • Scheme
    (define (A286386 n) (+ (* 2 (A286473 n)) (A010052 n)))
    

Formula

a(n) = 2*A286473(n) + A010052(n).