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.

A286474 Compound filter: a(n) = 4*A032742(n) + (n mod 4), a(1) = 1.

Original entry on oeis.org

1, 6, 7, 8, 5, 14, 7, 16, 13, 22, 7, 24, 5, 30, 23, 32, 5, 38, 7, 40, 29, 46, 7, 48, 21, 54, 39, 56, 5, 62, 7, 64, 45, 70, 31, 72, 5, 78, 55, 80, 5, 86, 7, 88, 61, 94, 7, 96, 29, 102, 71, 104, 5, 110, 47, 112, 77, 118, 7, 120, 5, 126, 87, 128, 53, 134, 7, 136, 93, 142, 7, 144, 5, 150, 103, 152, 45, 158, 7, 160, 109, 166, 7, 168, 69, 174, 119, 176, 5, 182, 55
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, 1, 4 (Divisors[n][[-2]]) + Mod[n, 4]], {n, 91}] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import divisors, primefactors
    def a(n): return 1 if n==1 else 4*divisors(n)[-2] + n%4 # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286474 n) (if (= 1 n) n (+ (* 4 (A032742 n)) (modulo n 4))))
    

Formula

a(1) = 1, for n > 1, a(n) = 4*A032742(n) + (n mod 4).