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.

A045412 a(1)=3; for n > 1, a(n) = a(n-1) + 1 if n is already in the sequence, a(n) = a(n-1) + 3 otherwise.

Original entry on oeis.org

3, 6, 7, 10, 13, 14, 15, 18, 21, 22, 25, 28, 29, 30, 31, 34, 37, 38, 41, 44, 45, 46, 49, 52, 53, 56, 59, 60, 61, 62, 63, 66, 69, 70, 73, 76, 77, 78, 81, 84, 85, 88, 91, 92, 93, 94, 97, 100, 101, 104, 107, 108, 109, 112, 115, 116, 119, 122, 123, 124, 125, 126
Offset: 1

Views

Author

N. J. A. Sloane and Benoit Cloitre, Apr 01 2003

Keywords

Comments

It appears these are the indices of the terms in A182105 which are greater than 1. - Carl Joshua Quines, Apr 07 2017
In the Fokkink-Joshi paper, this sequence is the Cloitre (0,3,1,3)-hiccup sequence. - Michael De Vlieger, Jul 30 2025

Crossrefs

Cf. A080578.

Programs

  • Mathematica
    l={3}; a=3; For[n=2, n<=100, If[MemberQ[l, n], a=a+1, a=a+3]; AppendTo[l, a]; n++]; l (* Indranil Ghosh, Apr 07 2017 *)
  • Python
    l=[3]
    a=3
    for n in range(2, 101):
        if n not in l: a+=3
        else: a+=1
        l.append(a)
    print(l) # Indranil Ghosh, Apr 07 2017