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

A173769 Primes in A154117.

Original entry on oeis.org

2, 7, 17, 37, 157, 317, 1277, 2557, 20477, 655357, 5242877, 671088637, 2684354557, 5368709117, 343597383677, 23058430092136939517, 23611832414348226068477, 48357032784585166988247037, 830767497365572420564879412675215357
Offset: 1

Views

Author

Vincenzo Librandi, Mar 05 2010

Keywords

Comments

Apart from the first term, the same as A172156. - R. J. Mathar, Mar 17 2010
Primes of the form 5*2^n-3.

Programs

  • Magma
    [ a: n in [0..150] | IsPrime(a) where a is 5*2^n-3 ];
  • Mathematica
     Select[Table[5*2^n-3,{n,0,300}],PrimeQ] (* Vincenzo Librandi, Jul 26 2012 *)

Extensions

Edited by N. J. A. Sloane, Mar 17 2010

A154251 Expansion of (1-x+7x^2)/((1-x)(1-2x)).

Original entry on oeis.org

1, 2, 11, 29, 65, 137, 281, 569, 1145, 2297, 4601, 9209, 18425, 36857, 73721, 147449, 294905, 589817, 1179641, 2359289, 4718585, 9437177, 18874361, 37748729, 75497465, 150994937, 301989881, 603979769, 1207959545, 2415919097
Offset: 0

Views

Author

Philippe Deléham, Jan 05 2009

Keywords

Comments

Binomial transform of 1,1,8,1,8,1,8,1,8,1,8,1,8,1,8,...

Crossrefs

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{3,-2},{2,11}, 25]] (* or *) Join[{1},Table[9*2^(n-1) - 7, {n,1,25}]] (* G. C. Greubel, Sep 08 2016 *)
  • PARI
    Vec((1-x+7*x^2)/((1-x)*(1-2*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

a(n) = 3*a(n-1) - 2*a(n-2), n>2, with a(0)=1, a(1)=2, a(2)=11.
a(n) = 9*2^(n-1) - 7, n>0, with a(0)=1.
a(n) = 2*a(n-1) + 7, n>1, with a(0)=1, a(1)=2.
From G. C. Greubel, Sep 08 2016: (Start)
a(n) = 9*2^(n-1) - 7 for n >= 1.
E.g.f.: (1/2)*(9*exp(2*x) - 14*exp(x) + 7). (End)

A172156 Primes in the chain of repeated application of x->2*x+3, starting at x=2.

Original entry on oeis.org

7, 17, 37, 157, 317, 1277, 2557, 20477, 655357, 5242877, 671088637, 2684354557, 5368709117, 343597383677, 23058430092136939517, 23611832414348226068477, 48357032784585166988247037, 830767497365572420564879412675215357
Offset: 1

Views

Author

Vincenzo Librandi, Jan 27 2010

Keywords

Crossrefs

Cf. A154117. [Klaus Brockhaus, Feb 28 2010]

Programs

  • Magma
    x:=2; a:=[n eq 1 select 2*x+3 else 2*Self(n-1)+3: n in [1..120]]; [a[i]: i in [1..#a] | IsPrime(a[i])]; // Bruno Berselli, May 14 2013
  • Mathematica
    Rest[Select[NestList[2#+3&,2,500],PrimeQ]] (* Harvey P. Dale, Nov 17 2012 *)

A154252 Expansion of (1-x+8x^2)/((1-x)(1-2x)) .

Original entry on oeis.org

1, 2, 12, 32, 72, 152, 312, 632, 1272, 2552, 5112, 10232, 20472, 40952, 81912, 163832, 327672, 655352, 1310712, 2621432, 5242872, 10485752, 20971512, 41943032, 83886072, 167772152, 335544312, 671088632, 1342177272, 2684354552, 5368709112, 10737418232
Offset: 0

Views

Author

Philippe Deléham, Jan 05 2009

Keywords

Comments

Binomial transform of 1,1,9,1,9,1,9,1,9,1,9,1,9,1,9,...

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) - 2*a(n-2), n>2, with a(0)=1, a(1)=2, a(2)=12.
a(n) = 2*a(n-1) + 8, n>1, with a(0)=1, a(1)=2.
a(n) = 10*2^(n-1) - 8, n>=1, with a(0)=1.
E.g.f.: 5*exp(2*x) - 8*exp(x) + 4. - G. C. Greubel, Sep 08 2016

Extensions

Two terms corrected by Johannes W. Meijer, May 26 2011

A321237 Start with a square of dimension 1 X 1, and repeatedly append along the squares of the previous step squares with half their side length that do not overlap with any prior square; a(n) gives the number of squares appended at n-th step.

Original entry on oeis.org

1, 8, 28, 68, 148, 308, 628, 1268, 2548, 5108, 10228, 20468, 40948, 81908, 163828, 327668, 655348, 1310708, 2621428, 5242868, 10485748, 20971508, 41943028, 83886068, 167772148, 335544308, 671088628, 1342177268, 2684354548, 5368709108, 10737418228, 21474836468
Offset: 1

Views

Author

Rémy Sigrist, Nov 01 2018

Keywords

Comments

The following diagram depicts the first three steps of the construction:
+----+----+----+----+
| 3 | 3 | 3 | 3 |
+----+----+----+----+----+----+
| 3 | | | 3 |
+----+----+ 2 | 2 +----+----+
| 3 | 3 | | | 3 | 3 |
+----+----+----+---------+---------+----+----+----+
| 3 | | | | 3 |
+----+ 2 | | 2 +----+
| 3 | | | | 3 |
+----+---------+ 1 +---------+----+
| 3 | | | | 3 |
+----+ 2 | | 2 +----+
| 3 | | | | 3 |
+----+----+----+---------+---------+----+----+----+
| 3 | 3 | | | 3 | 3 |
+----+----+ 2 | 2 +----+----+
| 3 | | | 3 |
+----+----+----+----+----+----+
| 3 | 3 | 3 | 3 |
+----+----+----+----+
A square of step n+1 touches one or two squares of step n.
The limiting construction is an octagon (truncated square); its area is 7 times the area of the initial square.
See A321257 for a similar sequence.

Crossrefs

Programs

  • PARI
    a(n) = if (n==1, return (1), return (4*( 2^(n-1) + 3 * floor( (2^(n-2)-1) ) )))
    
  • PARI
    Vec(x*(1 + 2*x)*(1 + 3*x) / ((1 - x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Nov 02 2018

Formula

a(n) = 4 * (2^(n-1) + 3 * (2^(n-2)-1)) for any n > 1.
a(n) = 4 * A154117(n-1) for any n > 1.
Sum_{n > 0} a(n) / 4^(n-1) = 7.
From Colin Barker, Nov 02 2018: (Start)
G.f.: x*(1 + 2*x)*(1 + 3*x) / ((1 - x)*(1 - 2*x)).
a(n) = 5*2^n - 12 for n>1.
a(n) = 3*a(n-1) - 2*a(n-2) for n>3.
(End)

A078113 Let u(1)=u(2)=1, u(3)=n, u(k) = (1/2)*abs(2*u(k-1) -u(k-2)-u(k-3)); sequence gives values of n such that Sum_{k>=1} u(k) is an integer.

Original entry on oeis.org

2, 6, 7, 15, 17, 33, 37, 69, 77, 141, 157, 285, 317, 573, 637, 1149, 1277, 2301, 2557, 4605, 5117, 9213, 10237, 18429, 20477, 36861, 40957, 73725, 81917, 147453, 163837, 294909, 327677, 589821, 655357, 1179645, 1310717, 2359293, 2621437, 4718589, 5242877
Offset: 1

Views

Author

Benoit Cloitre, Dec 04 2002

Keywords

Comments

u(3)=7, Sum_{k>=1} u(k) = 28 is an integer, hence 7 is in the sequence.

Crossrefs

Programs

  • PARI
    A078113(maxn, maxk) = {
      u=vector(maxk);
      u[1]=1; u[2]=1;
      for(n=1, maxn,
        u[3]=n;
        for(k=4, maxk, u[k]=abs(2*u[k-1]-u[k-2]-u[k-3])/2);
        s=sum(i=1, maxk, u[i]);
        if(ceil(s)-s < 1E-11, print1(n, ", ")) \\ Arbitrary 1E-11
      )
    }
    A078113(1000000, 200) \\ Colin Barker, Aug 14 2013

Formula

Conjecture: a(n) = -3+2^(1/2*(-5+n))*(10-10*(-1)^n+9*sqrt(2)+9*(-1)^n*sqrt(2)). a(n) = a(n-1)+2*a(n-2)-2*a(n-3). G.f.: x*(3*x^2-4*x-2) / ((x-1)*(2*x^2-1)). - Colin Barker, Aug 14 2013
Conjecture: a(n) = 2*a(n-2) + 3, n odd>2 = A154117((n+1)/2). - Bill McEachen, Jun 21 2025

Extensions

a(11)-a(33) from Colin Barker, Aug 14 2013
a(34)-a(41) from Bill McEachen, Jun 21 2025

A377613 a(n) is the number of iterations of x -> 2*x + 3 until (# composites reached) = (# primes reached), starting with prime(n).

Original entry on oeis.org

19, 1, 15, 15, 1, 13, 13, 15, 1, 3, 1, 1, 1, 7, 27, 3, 1, 1, 25, 1, 3, 1, 1, 5, 23, 1, 1, 1, 1, 7, 3, 1, 23, 3, 1, 1, 9, 1, 17, 5, 1, 1, 1, 3, 19, 7, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 1, 21, 1, 3, 1, 19, 1, 1, 1, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 17, 1, 3, 1
Offset: 1

Views

Author

Clark Kimberling, Nov 13 2024

Keywords

Comments

For a guide to related sequences, see A377609.

Examples

			Starting with prime(1) = 2, we have 2*2+3 = 7, then 2*7+3 = 17, etc., resulting in a chain 2, 7, 17, 37, 77, 157, 317, 637, 1277, 2557, 5117, 10237, 20477, 40957, 81917, 163837, 327677, 655357, 1310717, 2621437 having 10 primes and 10 composites. Since every initial subchain has fewer composites than primes, a(1) = 20-1 = 19. (For more terms from the mapping x -> 2*x+3, see A154117.)
		

Crossrefs

Programs

  • Mathematica
    chain[{start_, u_, v_}] := NestWhile[Append[#, u*Last[#] + v] &, {start}, !
         Count[#, ?PrimeQ] == Count[#, ?(! PrimeQ[#] &)] &];
    chain[{Prime[1], 2, 3}]
    Map[Length[chain[{Prime[#], 2, 3}]] &, Range[100]] - 1
    (* Peter J. C. Moses Oct 31 2024 *)

A154312 Triangle T(n,k), 0<=k<=n, read by rows, given by [0,1/2,-1/2,0,0,0,0,0,0,0,...] DELTA [2,-1/2,-1/2,2,0,0,0,0,0,0,0 ...] where DELTA is the operator defined in A084938 .

Original entry on oeis.org

1, 0, 2, 0, 1, 3, 0, 0, 3, 5, 0, 0, 0, 7, 9, 0, 0, 0, 0, 15, 17, 0, 0, 0, 0, 0, 31, 33, 0, 0, 0, 0, 0, 0, 63, 65, 0, 0, 0, 0, 0, 0, 0, 127, 129, 0, 0, 0, 0, 0, 0, 0, 0, 255, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 511, 513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1023, 1025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2047
Offset: 0

Views

Author

Philippe Deléham, Jan 07 2009

Keywords

Comments

Column sums give A003945.

Examples

			Triangle begins:
1;
0, 2;
0, 1, 3;
0, 0, 3, 5;
0, 0, 0, 7, 9;
0, 0, 0, 0, 15, 17; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n}T(n,k)*x^(n-k)= A040000(n), A094373(n), A000079(n), A083329(n), A095121(n), A154117(n), A131128(n), A154118(n), A131130(n), A154251(n), A154252(n) for x = -1,0,1,2,3,4,5,6,7,8,9 respectively.
G.f.: (1-x*y+x^2*y-x^2*y^2)/(1-3*x*y+2*x^2*y^2). - Philippe Deléham, Nov 02 2013
T(n,k) = 3*T(n-1,k-1) - 2*T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 2, T(2,0) = 0, T(2,1) = 1, T(2,2) = 3, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Nov 02 2013
Showing 1-8 of 8 results.