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.

A249032 First differences of A075326.

Original entry on oeis.org

3, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 6, 4, 6, 4, 5, 5, 6, 4, 5, 5, 6, 4, 5, 5, 6
Offset: 0

Views

Author

N. J. A. Sloane, Oct 26 2014

Keywords

Comments

Can be constructed as follows. Apart from the initial "3", one always has either "6-4" (i.e., a 6 followed by a 4), or else "5-5". The 6-4's always come either alone (6-4) or triply (6-4, 6-4, 6-4), while the 5-5's always come alone. So if we let "6-4, 5-5" be represented by the numeral "1", and "6-4, 6-4, 6-4, 5-5" by the numeral "3", then the sequence of first differences, in this compressed code, is A080426, which itself is defined by a simple substitution rule. - D. R. Hofstadter, Oct 23 2014

Crossrefs

Programs

  • Haskell
    a249032 n = a249032_list !! n
    a249032_list = zipWith (-) (tail a075326_list) a075326_list
    -- Reinhard Zumkeller, Oct 26 2014
    
  • Python
    def A249032(n): return 4+int((n+1|(~((m:=n>>1)+1)&m).bit_length())&1^1)+int((n|(~((k:=n-1>>1)+1)&k).bit_length())&1) if n else 3 # Chai Wah Wu, Sep 11 2024