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 149 results. Next

A056816 Primes in the tribonacci sequence A000213.

Original entry on oeis.org

3, 5, 17, 31, 193, 653, 1201, 46499, 532159, 3311233, 128199521, 20512526282340991, 6036724301884645488192191, 2170304813579195568101904406358277391153
Offset: 1

Views

Author

Harvey P. Dale, Sep 01 2000

Keywords

Comments

Primes within A000213.

Crossrefs

Cf. A092836.

Formula

a(n) = A000213(A157611(n)). - R. J. Mathar, Dec 14 2011

A274432 Products of distinct tribonacci numbers (A000213).

Original entry on oeis.org

3, 5, 9, 15, 17, 27, 31, 45, 51, 57, 85, 93, 105, 135, 153, 155, 171, 193, 255, 279, 285, 315, 355, 459, 465, 513, 525, 527, 579, 653, 765, 837, 855, 945, 965, 969, 1065, 1201, 1395, 1539, 1575, 1581, 1737, 1767, 1775, 1785, 1959, 2209, 2295, 2565, 2635
Offset: 1

Views

Author

Clark Kimberling, Jun 22 2016

Keywords

Examples

			The tribonacci numbers are 1,1,1,3,5,9,17,31,..., so that the sequence of all products of distinct members, in increasing order, is (3, 5, 9, 15, 17, 27, 31, 45,...).
		

Crossrefs

Cf. A160009, A274280, A274433 (binary products), A274434 (trinary products).

Programs

  • Mathematica
    r[1] := 1; r[2] := 1; r[3] = 1; r[n_] := r[n] = r[n - 1] + r[n - 2] + r[n - 3];
    s = {1}; z = 60; f = Map[r, Range[z]]; Take[f, 20]
    Do[s = Union[s, Select[s*f[[i]], # <= f[[z]] &]], {i, z}];
    Take[s, 2 z]  (*A274432*)
    infQ[n_] := MemberQ[f, n];
    ans = Table[#[[Flatten[Position[Map[Apply[Times, #] &, #], s[[n]]]][[1]]]] &[
    Rest[Subsets[Map[#[[1]] &, Select[Map[{#, infQ[#]} &, Divisors[s[[n]]]], #[[2]] && #[[1]] > 1 &]]]]], {n, 2, 300}];
    Map[Apply[Times, #] &, Select[ans, Length[#] == 2 &]] (* A274433 *)
    Map[Apply[Times, #] &, Select[ans, Length[#] == 3 &]] (* A274434 *)
    (* Peter J. C. Moses, Jun 17 2016 *)

A046735 Nontrivial (i.e., having no nontrivial factors with this property) integers which do not divide any terms of A000213.

Original entry on oeis.org

2, 27, 91, 103, 163, 199, 203, 221, 247, 305, 371, 377, 397, 421, 551, 559, 757, 779, 883, 991, 1021, 1079, 1087, 1123, 1189, 1199, 1237, 1351, 1521, 1543, 1567, 1609, 1651, 1753, 1769, 1799, 1807, 1873, 1883, 1919, 2009, 2071, 2261, 2539
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    nd:= proc(p) local a,b,c,r,R;
       a:= 1; b:= 1; c:= 1; R[1,1,1]:= true;
       do
         r:= a+b+c mod p;
         if r = 0 then return false fi;
         a:= b; b:= c; c:= r;
         if assigned(R[a,b,c]) or nops({a,b,c})=1
             then return true
             else R[a,b,c]:= true
           fi;
       od
    end proc:
    N:= 10^4: # to get all terms <= N
    V:= Vector(N): Res:= NULL:
    for n from 1 to N do
      if V[n] = 0 then
        if nd(n) then Res:= Res,n; V[[seq(k*n,k=2..floor(N/n))]]:= 1; fi
      fi;
    od:
    Res; # Robert Israel, Feb 26 2017
  • Mathematica
    nondivisor[n_] := Module[{a = 1, b = 1, c = 1, t}, For[i = 1, i <= n^2, i++, t = Mod[a+b+c, n]; If[t != 0, a = b; b = c; c = t, Return[False]]; If[c == 1 && b == 1 && a == 1, Return[True]]]];
    okQ[n_] := Do[If[nondivisor[d], Return[n == d]], {d, Divisors[n]}];
    Select[Range[3000], okQ] (* Jean-François Alcover, Mar 05 2019, from PARI *)
  • PARI
    nondivisor(n)=my(a=1,b=1,c=1,t);for(i=1,n^2,t=(a+b+c)%n;if(t,a=b;b=c;c=t,return(0));if(c==1&&b==1&&a==1,return(1)))
    is(n)=fordiv(n,d,if(nondivisor(d),return(n==d)));0 \\ Charles R Greathouse IV, Aug 29 2012

Extensions

Definition corrected by Henry Ayoola (henry.ayoola(AT)googlemail.com), Feb 03 2009
a(1) added by Charles R Greathouse IV, Aug 29 2012

A107240 Sum of squares of first n tribonacci numbers (A000213).

Original entry on oeis.org

1, 2, 3, 12, 37, 118, 407, 1368, 4617, 15642, 52891, 178916, 605325, 2047726, 6927407, 23435376, 79281105, 268206130, 907335091, 3069492092, 10384017717, 35128880742, 118840150983, 402033352264, 1360069089113, 4601080768074
Offset: 1

Views

Author

Jonathan Vos Post, May 14 2005

Keywords

Examples

			a(6) = 1^2 + 1^2 + 1^2 + 3^2 + 5^2 + 9^2 = 118.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[LinearRecurrence[{1,1,1},{1,1,1},30]^2] (* Harvey P. Dale, Nov 11 2011 *)
    LinearRecurrence[{3, 1, 3, -7, 1, -1, 1},{1, 2, 3, 12, 37, 118, 407},26] (* Ray Chandler, Aug 02 2015 *)

Formula

a(n) = Sum_{i=1..n} A000213(i)^2.
a(n)= 3*a(n-1) +a(n-2) +3*a(n-3) -7*a(n-4) +a(n-5) -a(n-6) +a(n-7). G.f.: (x^3-x^2+3*x-1)*(1+x)^2/((x-1)*(x^3+x^2+3*x-1)*(x^3-x^2-x-1)). - R. J. Mathar, Aug 11 2009

A157611 Numbers n such that the n-th tribonacci number as defined by A000213 is prime.

Original entry on oeis.org

3, 4, 6, 7, 10, 12, 13, 19, 23, 26, 32, 63, 95, 150, 324, 449, 1969, 2988, 6199, 8093, 23393, 25427, 34685, 35076, 44171, 45624, 83357, 116404
Offset: 1

Views

Author

Dmitry Kamenetsky, Mar 03 2009

Keywords

Comments

The next term is greater than 10000.
a(29) > 2*10^5. - Robert Price, Nov 15 2013

Crossrefs

Extensions

a(21)-a(28) from Robert Price, Nov 15 2013

A141583 Squares of tribonacci numbers A000213.

Original entry on oeis.org

1, 1, 1, 9, 25, 81, 289, 961, 3249, 11025, 37249, 126025, 426409, 1442401, 4879681, 16507969, 55845729, 188925025, 639128961, 2162157001, 7314525625, 24744863025, 83711270241, 283193201281, 958035736849, 3241011678961
Offset: 0

Views

Author

R. J. Mathar, Aug 19 2008

Keywords

Comments

Partial sums are in A107240.
a(n) is also the number of total dominating sets in the (n-1)-ladder graph. - Eric W. Weisstein, Apr 10 2018

Crossrefs

Programs

  • Magma
    I:=[1,1,1,9,25,81]; [n le 6 select I[n] else 2*Self(n-1) + 3*Self(n-2) + 6*Self(n-3) - Self(n-4) - Self(n-6): n in [1..30]]; // Vincenzo Librandi, Dec 13 2012
    
  • Mathematica
    CoefficientList[Series[(1+x)^2*(1-3*x+x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 13 2012 *)
    Table[RootSum[-1 - # - #^2 + #^3 &, 2 #^n - 4 #^(n + 1) + 3 #^(n + 2) &]^2/121, {n, 0, 20}] (* Eric W. Weisstein, Apr 10 2018 *)
    LinearRecurrence[{2,3,6,-1,0,-1}, {1,1,9,25,81,289}, {0, 20}] (* Eric W. Weisstein, Apr 10 2018 *)
    LinearRecurrence[{1,1,1},{1,1,1},40]^2 (* Harvey P. Dale, Aug 01 2021 *)
  • Sage
    @CachedFunction
    def T(n): # A000213
        if (n<3): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A141583(n): return T(n)^2
    [A141583(n) for n in (0..40)] # G. C. Greubel, Nov 22 2021

Formula

a(n) = (A000213(n))^2.
O.g.f.: (1+x)^2*(1-3*x+x^2-x^3)/((1+x+x^2-x^3)*(1-3*x-x^2-x^3)).
a(n) = 2*a(n-1) + 3*a(n-2) + 6*a(n-3) - a(n-4) - a(n-6).

A186190 First digit of tribonacci sequence A000213.

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 1, 3, 5, 1, 1, 3, 6, 1, 2, 4, 7, 1, 2, 4, 8, 1, 2, 5, 9, 1, 3, 6, 1, 2, 3, 6, 1, 2, 4, 7, 1, 2, 4, 9, 1, 3, 5, 1, 1, 3, 6, 1, 2, 4, 7, 1, 2, 4, 8, 1, 2, 5, 9, 1, 3, 6, 1, 2, 3, 6, 1, 2, 4, 7, 1, 2, 4, 9, 1, 3, 5, 1, 1, 3, 6, 1, 2, 4, 7, 1, 2, 4, 8, 1, 2, 5, 9, 1, 3, 6, 1, 2, 3, 6, 1, 2, 4
Offset: 0

Views

Author

Carmine Suriano, Feb 14 2011

Keywords

Comments

Sequence obeys the Benford law about distribution of first digit d in a sequence: P(d) = log_10(1+1/d).

Examples

			a(10) = 1 since A000213(10) = 193.
		

Crossrefs

Programs

  • Mathematica
    t = {1,1,1}; Do[AppendTo[t, t[[-1]] + t[[-2]] + t[[-3]]], {100}]; Table[IntegerDigits[i][[1]], {i, t}]

Extensions

Offset changed by Georg Fischer, Jun 26 2024

A046734 Period of A000213 mod n.

Original entry on oeis.org

1, 1, 13, 4, 31, 13, 48, 8, 39, 31, 110, 52, 168, 48, 403, 16, 96, 39, 360, 124, 624, 110, 553, 104, 155, 168, 117, 48, 140, 403, 331, 32, 1430, 96, 1488, 156, 469, 360, 2184, 248, 560, 624, 308, 220, 1209, 553, 46, 208, 336, 155, 1248, 168, 52, 117
Offset: 1

Views

Author

Keywords

Programs

  • PARI
    isper(v,startAt=1)=for(k=startAt,#v-3, for(i=1,3,if(v[i]!=v[k+i],next(2)));return(k)); 0
    ap(p)=my(v=vector(99),t); v[1]=v[2]=v[3]=1; for(i=4,#v,v[i]=sum(j=i-3,i-1,v[j])%p); while((t=isper(v,if(#v>99,#v/2-2,1)))==0, v=concat(v, vector(#v)); for(i=#v/2+1,#v, v[i]=sum(j=i-3,i-1,v[j])%p));t
    ape(p,e)=if(p==2, return(if(e>1,p^e,1))); if(e==1, return(ap(p))); my(pe=p^e, P=ap(p)*p^(e-1), v=vector(P+3)); v[1]=v[2]=v[3]=1; for(i=4,#v,v[i]=sum(j=i-3,i-1,v[j])%pe); isper(v)
    a(n)=my(f=factor(n)); lcm(vector(#f~, i, ape(f[i,1],f[i,2]))) \\ Charles R Greathouse IV, Dec 10 2015

A072874 Numbers k such that A000213(k) == 1 (mod k).

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 28, 32, 36, 47, 53, 56, 64, 72, 80, 94, 103, 106, 128, 163, 192, 199, 206, 256, 257, 269, 311, 326, 336, 384, 397, 398, 401, 419, 421, 456, 499, 512, 514, 536, 538, 587, 599, 617, 622, 683, 700, 757, 768, 773, 794, 802, 838, 842, 863, 883, 907
Offset: 1

Views

Author

Benoit Cloitre, Jul 28 2002

Keywords

Comments

Includes A000079. - Robert Israel, Jul 23 2024

Crossrefs

Programs

Extensions

a(1) = 1 inserted by Amiram Eldar, May 05 2022

A354784 First differences of A000213, also twice A000073.

Original entry on oeis.org

0, 0, 2, 2, 4, 8, 14, 26, 48, 88, 162, 298, 548, 1008, 1854, 3410, 6272, 11536, 21218, 39026, 71780, 132024, 242830, 446634, 821488, 1510952, 2779074, 5111514, 9401540, 17292128, 31805182, 58498850, 107596160, 197900192, 363995202, 669491554
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2022

Keywords

Comments

Number of anti-palindromic compositions of n+1 of even length.

Crossrefs

Cf. A000213, A000073, A135491 (essentially the same sequence).

Programs

  • Mathematica
    LinearRecurrence[{1, 1, 1}, {0, 0, 2}, 50] (* Paolo Xausa, May 27 2024 *)

Formula

From Chai Wah Wu, Jul 12 2022: (Start)
a(n) = a(n-1) + a(n-2) + a(n-3) for n > 2.
G.f.: -2*x^2/(x^3 + x^2 + x - 1). (End)
Showing 1-10 of 149 results. Next