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-4 of 4 results.

A242315 Indices of primes in the tribonacci-like sequence A214826.

Original entry on oeis.org

4, 7, 23, 71, 379, 467, 596, 6372, 10100, 11660, 23099, 25419, 26011, 36588, 76895, 112867
Offset: 1

Views

Author

Robert Price, May 10 2014

Keywords

Comments

a(17) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={1,4,4}; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[n]]; a=RotateLeft[a]; a[[3]]=sum]

A242316 Prime terms in the tribonacci-like sequence A214826.

Original entry on oeis.org

17, 103, 1764391, 8907752079422393063, 28959877095025359725108610631647478770525190687597954707985655095645523042346644747326776183477265033
Offset: 1

Views

Author

Robert Price, May 10 2014

Keywords

Comments

a(6) is too large to appear here, having 124 digits. It corresponds to A214826(467).

Crossrefs

Programs

  • Mathematica
    a={1,4,4}; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[sum]]; a=RotateLeft[a]; a[[3]]=sum]
    Select[LinearRecurrence[{1,1,1},{1,4,4},400],PrimeQ] (* Harvey P. Dale, Mar 17 2016 *)

A214829 a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = 1, a(1) = a(2) = 7.

Original entry on oeis.org

1, 7, 7, 15, 29, 51, 95, 175, 321, 591, 1087, 1999, 3677, 6763, 12439, 22879, 42081, 77399, 142359, 261839, 481597, 885795, 1629231, 2996623, 5511649, 10137503, 18645775, 34294927, 63078205, 116018907, 213392039, 392489151, 721900097, 1327781287, 2442170535
Offset: 0

Views

Author

Abel Amene, Aug 07 2012

Keywords

Comments

See comments in A214727.

Crossrefs

Programs

  • GAP
    a:=[1,7,7];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Apr 24 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+6*x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 24 2019
    
  • Mathematica
    LinearRecurrence[{1,1,1}, {1,7,7}, 40] (* G. C. Greubel, Apr 24 2019 *)
  • PARI
    Vec((x^2-6*x-1)/(x^3+x^2+x-1) + O(x^40)) \\ Michel Marcus, Jun 04 2017
    
  • Sage
    ((1+6*x-x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 24 2019
    

Formula

G.f.: (1+6*x-x^2)/(1-x-x^2-x^3).
a(n) = -A000073(n) + 6*A000073(n+1) + A000073(n+2). - G. C. Greubel, Apr 24 2019

A268410 a(n) = a(n - 1) + a(n - 2) + a(n - 3) for n>2, a(0)=5, a(1)=7, a(2)=9.

Original entry on oeis.org

5, 7, 9, 21, 37, 67, 125, 229, 421, 775, 1425, 2621, 4821, 8867, 16309, 29997, 55173, 101479, 186649, 343301, 631429, 1161379, 2136109, 3928917, 7226405, 13291431, 24446753, 44964589, 82702773, 152114115, 279781477, 514598365, 946493957
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2016

Keywords

Comments

Tribonacci sequence beginning 5, 7, 9.
In general, the ordinary generating function for the recurrence relation b(n) = b(n-1) + b(n-2) + b(n-3), with n>2 and b(0)=k, b(1)=m, b(2)=q, is (k + (m-k)*x + (q-m-k)*x^2)/(1 - x - x^2 - x^3).

Crossrefs

Cf. similar sequences with initial values (p,q,r): A000073 (0,0,1), A081172 (1,1,0), A001590 (0,1,0; also 1,2,3), A214899 (2,1,2), A001644 (3,1,3), A145027 (2,3,4), A000213 (1,1,1), A141036 (2,1,1), A141523 (3,1,1), A214727 (1,2,2), A214825 (1,3,3), A214826 (1,4,4), A214827 (1,5,5), A214828 (1,6,6), A214829 (1,7,7), A214830 (1,8,8), A214831 (1,9,9).

Programs

  • GAP
    a:=[5,7,9];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Apr 23 2019
  • Magma
    I:=[5,7,9]; [n le 3 select I[n] else Self(n-1)+Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 04 2016
    
  • Mathematica
    LinearRecurrence[{1, 1, 1}, {5, 7, 9}, 40]
    RecurrenceTable[{a[0]==5, a[1]==7, a[2]==9, a[n]==a[n-1]+a[n-2]+a[n-3]}, a, {n, 40}]
  • PARI
    my(x='x+O('x^40)); Vec((5+2*x-3*x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 23 2019
    
  • Sage
    ((5+2*x-3*x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 23 2019
    

Formula

G.f.: (5 + 2*x - 3*x^2)/(1 - x - x^2 - x^3).
a(n) = 3*K(n) - 4*T(n+1) + 8*T(n), where K(n) = A001644(n) and T(n) =A000073(n+1). - G. C. Greubel, Apr 23 2019
Showing 1-4 of 4 results.