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.

A092038 a(n+1) = a(n) + (a(n) mod 2)^(n mod a(n)), a(1) = 1.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, 9, 10, 10, 10, 11, 12, 12, 12, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 18, 18, 19, 20, 20, 20, 21, 22, 22, 22, 23, 24, 24, 24, 25, 26, 26, 26, 27, 28, 28, 28, 29, 30, 30, 30, 31, 32, 32, 32, 33, 34, 34, 34, 35, 36, 36, 36, 37, 38, 38
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 27 2004

Keywords

Comments

a(n) = floor(n/4) + floor((n-1)/4) + 2 for n>1.

Crossrefs

Cf. A004524.

Programs

  • Haskell
    a092038 n = a092038_list !! (n-1)
    a092038_list = 1 : zipWith (\u v -> v + (v `mod` 2) ^ (u `mod` v))
                               [2..] a092038_list
    -- Reinhard Zumkeller, Oct 10 2012
  • Mathematica
    Join[{1},Table[Floor[n/4]+Floor[(n-1)/4]+2,{n,2,80}]] (* Harvey P. Dale, Oct 03 2012 *)