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.

A171865 Positions of 0's in A181391.

Original entry on oeis.org

1, 2, 4, 6, 11, 13, 18, 21, 25, 31, 36, 42, 45, 48, 53, 57, 60, 64, 67, 73, 82, 85, 90, 93, 99, 102, 106, 111, 117, 122, 126, 130, 135, 139, 143, 149, 153, 157, 163, 169, 174, 180, 184, 188, 197, 200, 203, 209, 213, 216, 226, 229, 233, 237, 243, 247, 252, 255, 258, 264, 270
Offset: 1

Views

Author

N. J. A. Sloane, Oct 17 2010

Keywords

Comments

A181391(a(n)) = 0; the sequence is infinite, proof by Jan Ritsema van Eck in comments in A181391.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a171865 n = a171865_list !! (n-1)
    a171865_list = map (+ 1) $ elemIndices 0 a181391_list
    -- Reinhard Zumkeller, Oct 31 2011
    
  • Python
    A181391_list, A171865_list = [0, 0], [1,2]
    for n in range(1, 10**4):
        for m in range(n-1, -1, -1):
            if A181391_list[m] == A181391_list[n]:
                A181391_list.append(n-m)
                break
        else:
            A181391_list.append(0)
            A171865_list.append(n+2) # Chai Wah Wu, Jan 02 2015