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.

A134440 a(0)=1; for n > 0, a(n) = a(n-1) + prime(n) if a(n-1) is odd, else a(n) = a(n-1)/2.

Original entry on oeis.org

1, 3, 6, 3, 10, 5, 18, 9, 28, 14, 7, 38, 19, 60, 30, 15, 68, 34, 17, 84, 42, 21, 100, 50, 25, 122, 61, 164, 82, 41, 154, 77, 208, 104, 52, 26, 13, 170, 85, 252, 126, 63, 244, 122, 61, 258, 129, 340, 170, 85, 314, 157, 396, 198, 99, 356, 178, 89, 360, 180, 90, 45
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 18 2008

Keywords

Comments

LFSR with primes.
Is it true that Lim a(n)/prime(n) < square root(3)?

References

  • T. Herlestam, On functions of linear shift register sequences. Springer Lecture notes in computer sciences, ISBN 978-3-540-16468-5.

Crossrefs

Programs

  • Maple
    A134440 := proc(n)
        option remember;
        if n =0 then
            1;
        elif type(procname(n-1),'odd') then
            procname(n-1)+ithprime(n) ;
        else
            procname(n-1)/2 ;
        end if;
    end proc: # R. J. Mathar, Jun 20 2021
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[a],a+Prime[n+1],a/2]}; Transpose[ NestList[ nxt,{0,1},70]][[2]] (* Harvey P. Dale, Jan 12 2016 *)

Extensions

Offset corrected by R. J. Mathar, Jun 20 2021