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.

A102111 Iccanobirt numbers (1 of 15): a(n) = a(n-1) + a(n-2) + R(a(n-3)), where R is the digit reversal function A004086.

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 99, 185, 328, 612, 1521, 2956, 4693, 8900, 20185, 33049, 53332, 144483, 291848, 459666, 1135955, 2443813, 4246722, 12285846, 19716010, 34278280, 118852511, 154192582, 281332336, 550783729, 1117407516, 2301424427
Offset: 0

Views

Author

Jonathan Vos Post and Ray Chandler, Dec 30 2004

Keywords

Comments

Digit reversal variation of tribonacci numbers A000073.
Inspired by Iccanobif numbers: A001129, A014258-A014260.

Crossrefs

Programs

  • Magma
    a:=[0,0,1];[n le 3 select a[n] else Self(n-1) + Self(n-2) + Seqint(Reverse(Intseq(Self(n-3)))):n in [1..36]]; // Marius A. Burtea, Oct 23 2019
  • Maple
    read("transforms") ;
    A102111 := proc(n)
        option remember;
        if n <= 2 then
            return op(n+1,[0,0,1]) ;
        else
            return procname(n-1)+procname(n-2)+digrev(procname(n-3)) ;
        end if;
    end proc:
    seq(A102111(n),n=0..20) ; # R. J. Mathar, Nov 17 2012
  • Mathematica
    R[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Clear[a];a[0]=0;a[1]=0;a[2]=1;a [n_]:=a[n]=a[n-1]+a[n-2]+R[a[n-3]];Table[a[n], {n, 0, 40}]
    nxt[{a_,b_,c_}]:={b,c,IntegerReverse[a]+b+c}; NestList[nxt,{0,0,1},40][[;;,1]] (* Harvey P. Dale, Jul 18 2023 *)
  • Python
    def R(n):
      n_str = str(n)
      reversedn_str = n_str[::-1]
      reversedn = int(reversedn_str)
      return reversedn
    def A(n):
      if n == 0:
        return 0
      elif n == 1:
        return 0
      elif n == 2:
        return 1
      elif n >= 3:
        return A(n-1)+A(n-2)+R(A(n-3))
    for i in range(0,20):
      print(A(i)) # Dylan Delgado, Oct 23 2019
    

Formula

A004086(a(n)) = A102119(n).