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-10 of 54 results. Next

A234696 Indices of primes in the tribonacci-like sequence, A214727.

Original entry on oeis.org

1, 2, 3, 8, 16, 20, 64, 208, 364, 2652, 7763, 17280, 24104, 31823, 70864, 74008
Offset: 1

Views

Author

Robert Price, Dec 29 2013

Keywords

Comments

a(17) > 2*10^5.

Crossrefs

Programs

  • Mathematica
    a={1, 2, 2}; Print[2]; Print[2]; For[n=3, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], Print[n]]; a=RotateLeft[a]; a[[3]]=sum]
    Position[LinearRecurrence[{1,1,1},{1,2,2},75000],?PrimeQ]-1//Flatten (* _Harvey P. Dale, Sep 02 2016 *)

A234703 Primes in the tribonacci-like sequence, A214727.

Original entry on oeis.org

2, 2, 5, 101, 13241, 151537, 66848890001808737, 8602289657912317933269334679427588251509673524841616601
Offset: 1

Views

Author

Robert Price, Dec 29 2013

Keywords

Comments

The next term (a(9)) has 97 digits. - Harvey P. Dale, Feb 22 2023

Crossrefs

Programs

  • Mathematica
    a={1,2,2}; Print[2]; Print[2]; 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,2,2},500],PrimeQ] (* Harvey P. Dale, Feb 22 2023 *)

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

Original entry on oeis.org

1, 3, 3, 7, 13, 23, 43, 79, 145, 267, 491, 903, 1661, 3055, 5619, 10335, 19009, 34963, 64307, 118279, 217549, 400135, 735963, 1353647, 2489745, 4579355, 8422747, 15491847, 28493949, 52408543, 96394339, 177296831, 326099713, 599790883, 1103187427
Offset: 0

Views

Author

Abel Amene, Jul 28 2012

Keywords

Comments

Part of a group of sequences defined by a(0), a(1)=a(2), a(n) = a(n-1) + a(n-2) + a(n-3) which is a subgroup of sequences with linear recurrences and constant coefficients listed in the index. See Comments in A214727.

Crossrefs

Programs

  • GAP
    a:=[1,3,3];; 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
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+2*x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 23 2019
    
  • Mathematica
    LinearRecurrence[{1,1,1},{1,3,3},40] (* Harvey P. Dale, Oct 05 2013 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 1,1,1]^n*[1;3;3])[1,1] \\ Charles R Greathouse IV, Mar 22 2016
    
  • PARI
    my(x='x+O('x^40)); Vec((1+2*x-x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 23 2019
    
  • SageMath
    ((1+2*x-x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 23 2019
    

Formula

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

A235862 Indices of primes in A141523.

Original entry on oeis.org

0, 3, 4, 5, 8, 10, 14, 16, 24, 30, 40, 54, 63, 66, 67, 109, 188, 203, 421, 463, 704, 730, 798, 1155, 1259, 1376, 1789, 2095, 2650, 3833, 4538, 4794, 4840, 5386, 8348, 15176, 17282, 21250, 21386, 21825, 31242, 32843, 33706, 37026, 47546, 66848
Offset: 1

Views

Author

Robert Price, Jan 16 2014

Keywords

Comments

a(47) > 2*10^5.

Crossrefs

Programs

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

Extensions

Name clarified by Arthur O'Dwyer, Jul 25 2024

A136175 Tribonacci array, T(n,k).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 11, 9, 8, 13, 20, 17, 15, 10, 24, 37, 31, 28, 19, 12, 44, 68, 57, 51, 35, 22, 14, 81, 125, 105, 94, 64, 41, 26, 16, 149, 230, 193, 173, 118, 75, 48, 30, 18, 274, 423, 355, 318, 217, 138, 88, 55, 33, 21, 504, 778, 653, 585, 399, 254, 162, 101, 61, 39, 23
Offset: 1

Views

Author

Clark Kimberling, Dec 18 2007

Keywords

Comments

As an interspersion (and dispersion), the array is, as a sequence, a permutation of the positive integers. Column k consists of the numbers m such that the least summand in the tribonacci representation of m is T(1,k). For example, column 1 consists of numbers with least summand 1. This array arises from tribonacci representations in much the same way that the Wythoff array, A035513, arises from Fibonacci (or Zeckendorf) representations.
From Abel Amene, Jul 29 2012: (Start)
(Row 1) = A000073 (offset=4) a(0)=0, a(1)=0, a(2)=1
(Row 2) = A001590 (offset=5) a(0)=0, a(1)=1, a(2)=0
(Row 3) = A000213 (offset=4) a(0)=1, a(1)=1, a(2)=1
(Row 4) = A214899 (offset=5) a(0)=2, a(1)=1, a(2)=2
(Row 5) = A020992 (offset=6) a(0)=0, a(1)=2, a(2)=1
(Row 6) = A100683 (offset=6) a(0)=-1,a(1)=2, a(2)=2
(Row 7) = A135491 (offset=4) a(0)=2, a(1)=4, a(2)=8
(Row 8) = A214727 (offset=6) a(0)=1, a(1)=1, a(2)=2
(Row 9) = A081172 (offset=8) a(0)=1, a(1)=1, a(2)=0
(column 1) = A003265
(column 2) = A353083
(End) [Corrected and extended by John Keith, May 09 2022]

Examples

			Northwest corner:
1  2   4   7   13  24   44   81  149 274 504
3  6   11  20  37  68   125  230 423 778
5  9   17  31  57  105  193  355 653
8  15  28  51  94  173  318  585
10 19  35  64  118 217  399
12 22  41  75  138 254
14 26  48  88  162
16 30  55 101
18 33  61
21 39
23
		

Crossrefs

Programs

  • Maple
    # maximum index in A73 such that A73 <= n.
    A73floorIdx := proc(n)
        local k ;
        for k from 3 do
            if A000073(k) = n then
                return k ;
            elif A000073(k) > n then
                return k -1 ;
            end if ;
        end do:
    end proc:
    # tribonacci expansion coeffs of n
    A278038 := proc(n)
        local k,L,nres ;
        k := A73floorIdx(n) ;
        L := [1] ;
        nres := n-A000073(k) ;
        while k >= 4 do
            k := k-1 ;
            if nres >= A000073(k) then
                L := [1,op(L)] ;
                nres := nres-A000073(k) ;
            else
                L := [0,op(L)] ;
            end if ;
        end do:
        return L ;
    end proc:
    A278038inv := proc(L)
        add( A000073(i+2)*op(i,L),i=1..nops(L)) ;
    end proc:
    A135175 := proc(n,k)
        option remember ;
        local a,known,prev,nprev,kprev,freb ;
        if n =1 then
            A000073(k+2) ;
        elif k>3 then
            procname(n,k-1)+procname(n,k-2)+procname(n,k-3) ;
        else
            if k = 1 then
                for a from 1 do
                    known := false ;
                    for nprev from 1 to n-1 do
                        for kprev from 1 do
                            if procname(nprev,kprev) > a then
                                break ;
                            elif procname(nprev,kprev) = a then
                                known := true ;
                            end if;
                        end do:
                    end do:
                    if not known then
                        return a ;
                    end if;
                end do:
            else
                prev := procname(n,k-1) ;
                freb := A278038(prev) ;
                return A278038inv([0,op(freb)]) ;
            end if;
        end if;
    end proc:
    seq(seq(A135175(n,d-n),n=1..d-1),d=2..12) ; # R. J. Mathar, Jun 07 2022

Formula

T(1,1)=1, T(1,2)=2, T(1,3)=4, T(1,k)=T(1,k-1)+T(1,k-2)+T(1,k-3) for k>3. Row 1 is the tribonacci basis; write B(k)=T(1,k). Each row satisfies the recurrence T(n,k)=T(n,k-1)+T(n,k-2)+T(n,k-3). T(n,1) is least number not in an earlier row. If T(n,1) has tribonacci representation B(k(1))+B(k(2))+...+B(k(m)), then T(n,2) = B(k(2))+B(k(3))+...+B(k(m+1)) and T(n,3) = B(k(3))+B(k(4))+...+B(k(m+2)). (Continued shifting of indices gives the other terms in row n, also.)

Extensions

T(3, 4) corrected and more terms by John Keith, May 09 2022

A235873 Primes in the tribonacci-like sequence, A141523.

Original entry on oeis.org

3, 5, 7, 13, 83, 281, 3217, 10883, 1425427, 55187617, 24453221203, 124001884480009, 29872617402415741, 185875267730565697, 341877918058715653, 44580781450601596678810171573, 36012536557658790037420884825332617431175065740791
Offset: 1

Views

Author

Robert Price, Jan 16 2014

Keywords

Crossrefs

Programs

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

A214827 a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = 1, a(1) = a(2) = 5.

Original entry on oeis.org

1, 5, 5, 11, 21, 37, 69, 127, 233, 429, 789, 1451, 2669, 4909, 9029, 16607, 30545, 56181, 103333, 190059, 349573, 642965, 1182597, 2175135, 4000697, 7358429, 13534261, 24893387, 45786077, 84213725, 154893189, 284892991, 523999905
Offset: 0

Views

Author

Abel Amene, Jul 29 2012

Keywords

Comments

See comments in A214727.

Crossrefs

Programs

  • GAP
    a:=[1,5,5];; 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+4*x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 24 2019
    
  • Mathematica
    LinearRecurrence[{1,1,1},{1,5,5},40] (* Ray Chandler, Dec 08 2013 *)
  • PARI
    my(x='x+O('x^40)); Vec((1+4*x-x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 24 2019
    
  • Sage
    ((1+4*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.: (x^2-4*x-1)/(x^3+x^2+x-1).
a(n) = -A000073(n) + 4*A000073(n+1) + A000073(n+2). - R. J. Mathar, Jul 29 2012

A214831 a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = 1, a(1) = a(2) = 9.

Original entry on oeis.org

1, 9, 9, 19, 37, 65, 121, 223, 409, 753, 1385, 2547, 4685, 8617, 15849, 29151, 53617, 98617, 181385, 333619, 613621, 1128625, 2075865, 3818111, 7022601, 12916577, 23757289, 43696467, 80370333, 147824089, 271890889, 500085311, 919800289, 1691776489
Offset: 0

Views

Author

Abel Amene, Aug 07 2012

Keywords

Comments

Part of a group of sequences defined by a(0), a(1)=a(2), a(n)=a(n-1)+a(n-2)+a(n-3) which is a subgroup of sequences with linear recurrences and constant coefficients listed in the index. See comments in A214727.

Crossrefs

Programs

  • GAP
    a:=[1,9,9];; 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+8*x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 24 2019
    
  • Mathematica
    LinearRecurrence[{1,1,1},{1,9,9},40] (* Harvey P. Dale, Oct 11 2017 *)
  • PARI
    Vec((x^2-8*x-1)/(x^3+x^2+x-1) + O(x^40)) \\ Michel Marcus, Jul 08 2014
    
  • SageMath
    ((1+8*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+8*x-x^2)/(1-x-x^2-x^3).
a(n) = -A000073(n) + 8*A000073(n+1) + A000073(n+2). - G. C. Greubel, Apr 24 2019

A249413 Primes in the hexanacci numbers sequence A000383.

Original entry on oeis.org

11, 41, 72426721, 143664401, 565262081, 4160105226881, 253399862985121, 997027328131841, 212479323351825962211841, 188939838859312612896128881921, 22828424707602602744356458636161, 661045104283639247572028952777478721
Offset: 1

Views

Author

Robert Price, Dec 03 2014

Keywords

Comments

a(13) is too large to display here. It has 62 digits and is the 210th term in A000383.

Crossrefs

Programs

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

A214828 a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = 1, a(1) = a(2) = 6.

Original entry on oeis.org

1, 6, 6, 13, 25, 44, 82, 151, 277, 510, 938, 1725, 3173, 5836, 10734, 19743, 36313, 66790, 122846, 225949, 415585, 764380, 1405914, 2585879, 4756173, 8747966, 16090018, 29594157, 54432141, 100116316, 184142614, 338691071, 622950001
Offset: 0

Views

Author

Abel Amene, Jul 30 2012

Keywords

Comments

See comments in A214727.

Crossrefs

Programs

  • GAP
    a:=[1,6,6];; 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+5*x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 24 2019
    
  • Mathematica
    LinearRecurrence[{1,1,1},{1,6,6},33] (* Ray Chandler, Dec 08 2013 *)
  • PARI
    my(x='x+O('x^40)); Vec((1+5*x-x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 24 2019
    
  • Sage
    ((1+5*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+5*x-x^2)/(1-x-x^2-x^3).
a(n) = -A000073(n) + 5*A000073(n+1) + A000073(n+2). - G. C. Greubel, Apr 24 2019
Showing 1-10 of 54 results. Next