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.

Showing 1-2 of 2 results.

A141036 Tribonacci-like sequence; a(0)=2, a(1)=1, a(2)=1, a(n) = a(n-1) + a(n-2) + a(n-3).

Original entry on oeis.org

2, 1, 1, 4, 6, 11, 21, 38, 70, 129, 237, 436, 802, 1475, 2713, 4990, 9178, 16881, 31049, 57108, 105038, 193195, 355341, 653574, 1202110, 2211025, 4066709, 7479844, 13757578, 25304131, 46541553, 85603262, 157448946, 289593761
Offset: 0

Views

Author

Matt Wynne (matwyn(AT)verizon.net), Jul 30 2008

Keywords

Comments

I used the short MATLAB program from the zip file link altered to produce a Lucas version of the tribonacci numbers.
No term is divisible by 8 or 9. - Vladimir Joseph Stephan Orlovsky, Mar 24 2011
a(A246517(n)) = A246518(n). - Reinhard Zumkeller, Sep 15 2014

References

  • Martin Gardner, Mathematical Circus, Random House, New York, 1981, p. 165.

Crossrefs

Cf. A000073, A000213, A001644 (Lucas tribonacci sequence), A246517, A246518.

Programs

  • Haskell
    a141036 n = a141036_list !! n
    a141036_list = 2 : 1 : 1 : zipWith3 (((+) .) . (+))
       a141036_list (tail a141036_list) (drop 2 a141036_list)
    -- Reinhard Zumkeller, Sep 15 2014
    
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-2*x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 22 2019
    
  • Mathematica
    a[0]=2; a[1]=1; a[2]=1; a[n_]:= a[n]=a[n-1]+a[n-2]+a[n-3]; Table[a[n], {n, 0, 40}] (* Alonso del Arte, Mar 24 2011 *)
    LinearRecurrence[{1, 1, 1}, {2, 1, 1}, 40] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2011 *)
  • PARI
    a(n)=([0,1,0;0,0,1;1,1,1]^n*[2;1;1])[1,1] \\ Charles R Greathouse IV, Jun 15 2015
    
  • PARI
    my(x='x+O('x^40)); Vec((2-x-2*x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    ((2-x-2*x^2)/(1-x-x^2-x^3)).series(x, 41).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019

Formula

a(0)=2; a(1)=1; a(2)=1; a(n) = a(n-1) + a(n-2) + a(n-3).
From R. J. Mathar, Aug 04 2008: (Start)
a(n) = 2*A000213(n) - A000073(n+1).
O.g.f.: (2-x-2*x^2)/(1-x-x^2-x^3). (End)

Extensions

Corrected offset and indices in formulas, R. J. Mathar, Aug 05 2008
Better name from T. D. Noe, Aug 06 2008

A246517 Indices of primes in A141036.

Original entry on oeis.org

0, 5, 14, 26, 33, 222, 234, 482, 937, 1170, 1290, 1877, 1897, 3413, 6017, 9365, 47470, 48254, 97421, 102057, 119689, 132418, 192517, 194442
Offset: 1

Views

Author

Robert Price, Aug 28 2014

Keywords

Comments

a(25) > 2*10^5.
A141036(a(n)) = A246518(n).

Crossrefs

Programs

  • Haskell
    a246517 n = a246517_list !! (n-1)
    a246517_list = filter ((== 1) . a010051'' . a141036) [0..]
    -- Reinhard Zumkeller, Sep 15 2014
  • Mathematica
    a={2,1,1}; Print[0]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[n]]; a=RotateLeft[a]; a[[3]]=sum]
Showing 1-2 of 2 results.