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.

Previous Showing 51-60 of 70 results. Next

A021247 Decimal expansion of 1/243.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 11 1996

Keywords

Comments

Period 27 Repeat: [0, 0, 4, 1, 1, 5, 2, 2, 6, 3, 3, 7, 4, 4, 8, 5, 5, 9, 6, 7, 0, 7, 8, 1, 8, 9, 3]. - Wesley Ivan Hurt, May 25 2014

Examples

			0.00411522633744855967078189300411522633744855967078189300411522633744855967078...
		

Crossrefs

Cf. A010701 (1/3), A000012 (1/3^2), A021085 (1/3^4), A021733 (1/3^6).
Cf. A068542 (period of the fraction 1/3^n).

Programs

  • Maple
    Digits:=100; evalf(1/243); # Wesley Ivan Hurt, May 25 2014
  • Mathematica
    RealDigits[1/243, 10, 100, -1][[1]] (* Wesley Ivan Hurt, May 25 2014; corrected by Harvey P. Dale, Jan 23 2019 *)
    PadRight[{},120,{0,0,4,1,1,5,2,2,6,3,3,7,4,4,8,5,5,9,6,7,0,7,8,1,8,9,3}] (* Harvey P. Dale, Jan 23 2019 *)
  • PARI
    A021247_upto(N=100)={localprec(N+3);digits((1/3^5+1)\.1^N)[^1]} \\ M. F. Hasler, Apr 23 2021

Formula

1/243 = 1/3^5. - M. F. Hasler, Apr 23 2021

A193002 Triangle T(n,k)=0 (k odd), T(0,0)=-3, T(n,0)=1 (n > 0) and T(n,k) = T(n-1,k) - T(n-2,k-2).

Original entry on oeis.org

-3, 1, 0, 1, 0, 3, 1, 0, 2, 0, 1, 0, 1, 0, -3, 1, 0, 0, 0, -5, 0, 1, 0, -1, 0, -6, 0, 3, 1, 0, -2, 0, -6, 0, 8, 0, 1, 0, -3, 0, -5, 0, 14, 0, -3, 1, 0, -4, 0, -3, 0, 20, 0, -11, 0, 1, 0, -5, 0, 0, 0, 25, 0, -25, 0, 3, 1, 0, -6
Offset: 0

Views

Author

Paul Curtz, Jul 14 2011

Keywords

Comments

Consider an array with recurrence BB(m,n) = BB(m,n-1) + BB(m-1,n), m >= 0:
3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7,
3, 5, 6, 6, 5, 3, 0, -4, -9, -15, -22,
3, 8, 14, 20, 25, 28, 28, 24, 15, 0, -22,
3, 11, 25, 45, 70, 98, 126, 150, 165, 165, 143,
3, 14, 39, 84, 154, 252, 378, 528, 693, 858, 1001,
with BB(m,n) = (3m-n)*binomial(n+m-1,n)/m if m > 0. So the BB are polynomials of degree m in n:
BB(1,n) = -(n-3)/1,
BB(2,n) = -(n-6)*(n+1)/2, (see A055999)
BB(3,n) = -(n-9)*(n+1)*(n+2)/6,
BB(4,n) = -(n-12)*(n+1)*(n+2)*(n+3)/24,
BB(5,n) = -(n-15)*(n+1)*(n+2)*(n+3)*(n+4)/120.
Columns in the array are A010701, A016789, A095794, A005564, A059302.
T(n,k) is a zero-padded, column-shifted, sign-modified transpose of this array.

Examples

			Triangle begins
  -3;
   1,   0;
   1,   0,   3;
   1,   0,   2,   0;
   1,   0,   1,   0,  -3;
   1,   0,   0,   0,  -5,   0;
   1,   0,  -1,   0,  -6,   0,   3;
   1,   0,  -2,   0,  -6,   0,   8,   0;
   1,   0,  -3,   0,  -5,   0,  14,   0,  -3;
   1,   0,  -4,   0,  -3,   0,  20,   0, -11,   0;
		

Crossrefs

Cf. A174559.

Programs

  • Maple
    BB := proc(m,n) if m=0 then if n= 0 then 3 ; else -1; end if; else (3*m-n)*binomial(n+m-1,n)/m ; end if; end proc:
    A193002 := proc(n,k) if type(k,'odd') then 0; else (-1)^(1+k/2)*BB(k/2,n-k) ; end if; end proc:
    seq(seq(A193002(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Aug 30 2011

Formula

Sum_{k=0..n} T(n,k) = A130806(n+5). (row sums)
Sum_{k=0..n} (-1)^(k/2)*T(n,k) = -A000032(n-2). (alternating row sums)
T(n,k) = (-1)^(1+k/2)*BB(k/2,n-k). - R. J. Mathar, Aug 30 2011
T(n,2k) = (-1)^(1+k)*(5-n/k)*binomial(n-k-1,k-1), k > 0. - R. J. Mathar, Aug 30 2011

A292130 Triangle read by rows: T(n,k) = (-3) * T(n-k,k-1) + T(n-k,k) with T(0,0) = 1 for 0 <= k <= A003056(n).

Original entry on oeis.org

1, 0, -3, 0, -3, 0, -3, 9, 0, -3, 9, 0, -3, 18, 0, -3, 18, -27, 0, -3, 27, -27, 0, -3, 27, -54, 0, -3, 36, -81, 0, -3, 36, -108, 81, 0, -3, 45, -135, 81, 0, -3, 45, -189, 162, 0, -3, 54, -216, 243, 0, -3, 54, -270, 405, 0, -3, 63, -324, 486, -243, 0, -3, 63, -378
Offset: 0

Views

Author

Seiichi Manyama, Sep 09 2017

Keywords

Examples

			First few rows are:
  1;
  0, -3;
  0, -3;
  0, -3,  9;
  0, -3,  9;
  0, -3, 18;
  0, -3, 18,  -27;
  0, -3, 27,  -27;
  0, -3, 27,  -54;
  0, -3, 36,  -81;
  0, -3, 36, -108, 81.
		

Crossrefs

Row sums give A292128.
Columns 0-1 give A000007, (-1)*A010701.
Cf. A291971.

A321358 a(n) = (2*4^n + 7)/3.

Original entry on oeis.org

3, 5, 13, 45, 173, 685, 2733, 10925, 43693, 174765, 699053, 2796205, 11184813, 44739245, 178956973, 715827885, 2863311533, 11453246125, 45812984493, 183251937965, 733007751853, 2932031007405, 11728124029613, 46912496118445, 187649984473773, 750599937895085, 3002399751580333
Offset: 0

Views

Author

Paul Curtz, Nov 07 2018

Keywords

Comments

Difference table:
3, 5, 13, 45, 173, 685, 2733, ... (this sequence)
2, 8, 32, 128, 512, 2048, 8192, ... A004171
6, 24, 96, 384, 1536, 6144, 24576, ... A002023

Crossrefs

Programs

  • Mathematica
    a[n_]:= (2*4^n + 7)/3; Array[a, 20, 0] (* or *)
    CoefficientList[Series[1/3 (7 E^x + 2 E^(4 x)), {x, 0, 20}], x]*Table[n!, {n, 0, 20}] (* Stefano Spezia, Nov 10 2018 *)
  • PARI
    a(n) = (2*4^n + 7)/3; \\ Michel Marcus, Nov 08 2018
    
  • PARI
    Vec((3 - 10*x) / ((1 - x)*(1 - 4*x)) + O(x^30)) \\ Colin Barker, Nov 10 2018

Formula

O.g.f.: (3 - 10*x) / ((1 - x)*(1 - 4*x)). - Colin Barker, Nov 10 2018
E.g.f.: (1/3)*(7*exp(x) + 2*exp(4*x)). - Stefano Spezia, Nov 10 2018
a(n) = 5*a(n-1) - 4*a(n-2), a(0) = 3, a(1) = 5.
a(n) = 4*a(n-1) - 7, a(0) = 3.
a(n) = (2/3)*(4^n-1)/3 + 3.
a(n) = A171382(2*n) = A155980(2*n+2).
a(n) = A193579(n)/3.
a(n) = A007583(n) + 2 = A001045(2*n+1) + 2.

Extensions

More terms from Michel Marcus, Nov 08 2018

A321643 a(n) = 5*2^n - (-1)^n.

Original entry on oeis.org

4, 11, 19, 41, 79, 161, 319, 641, 1279, 2561, 5119, 10241, 20479, 40961, 81919, 163841, 327679, 655361, 1310719, 2621441, 5242879, 10485761, 20971519, 41943041, 83886079, 167772161, 335544319, 671088641, 1342177279, 2684354561, 5368709119, 10737418241, 21474836479
Offset: 0

Views

Author

Paul Curtz, Dec 03 2018

Keywords

Crossrefs

Programs

  • GAP
    List([0..30],n->5*2^n-(-1)^n); # Muniru A Asiru, Dec 05 2018
    
  • Maple
    [5*2^n-(-1)^n$n=0..30]; # Muniru A Asiru, Dec 05 2018
  • Mathematica
    a[n_] := 5*2^n - (-1)^n; Array[a, 30, 0] (* Amiram Eldar, Dec 03 2018 *)
  • PARI
    Vec((4 + 7*x) / ((1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Dec 04 2018
    
  • Python
    for n in range(0,30): print(5*2**n - (-1)**n) # Stefano Spezia, Dec 05 2018

Formula

a(n+2) - a(n) = a(n+1) + a(n) = 15*2^n, n >= 0.
a(n) - 2*a(n-1) = period 2: repeat [3, -3], n > 0, a(0)=4, a(1)=11.
a(n+1) = 10*A051049(n) + period 2: repeat [1, 9].
a(n) = 12*2^n - A321483(n), n >= 0.
a(n) = 2^(n+2) + 3*A001045(n), n >= 0.
a(n) == A070366(n+4) (mod 9).
From Colin Barker, Dec 04 2018: (Start)
G.f.: (4 + 7*x) / ((1 + x)*(1 - 2*x)).
a(n) = a(n-1) + 2*a(n-2) for n > 1. (End)
E.g.f.: exp(-x)*(5*exp(3*x) - 1). - Elmo R. Oliveira, Aug 17 2024

A363146 Triangle T(n,k) in which the n-th row encodes the inverse of a 3n X 3n Jacobi matrix, with 1's on the lower, main, and upper diagonals in GF(2), where the encoding consists of the decimal representations for the binary rows (n >= 1, 1 <= k <= 3n).

Original entry on oeis.org

3, 7, 6, 27, 59, 48, 3, 55, 54, 219, 475, 384, 27, 443, 432, 3, 439, 438, 1755, 3803, 3072, 219, 3547, 3456, 27, 3515, 3504, 3, 3511, 3510, 14043, 30427, 24576, 1755, 28379, 27648, 219, 28123, 28032, 27, 28091, 28080, 3, 28087, 28086, 112347, 243419, 196608, 14043, 227035, 221184, 1755, 224987, 224256, 219, 224731
Offset: 1

Views

Author

Nei Y. Soma, May 19 2023

Keywords

Comments

Each term of the sequence encodes a line of the inverse of a Jacobi matrix that has 1s on its lower, main, and upper diagonals in GF(2). The associated inverse matrix column values come from the binary representation of that base-10 number, being a bit per column. These matrices have ascending and consecutive multiples of 3 sizes. If the binary number has fewer bits than the number of columns, it must be zero-padded to the left. To obtain the inverse matrices in real numbers instead of GF(2), alternate between + and - between the 1s in a row. If a row is a multiple of 3, alternate between - and +. The determinants of these 3m x 3m Jacobi matrices are 1 in GF(2), as proven by Sutner (1989), and alternate between -1 and 1 in R if m is odd or even, as proven by Melo (1987).
The recurrence, in line 3, uses the Iverson notation as presented in Graham, Knuth, and Patashnik (2002).
The proof of the correctness of that sequence of inverses is done by induction.

Examples

			For n = 1, the Jacobi 3 X 3 matrix has as rows
     1, 1, 0
     1, 1, 1
     0, 1, 1.
Its inverse has the rows
     0, 1, 1
     1, 1, 1
     1, 1, 0.
Representing these rows as decimal numbers the first three terms of the sequence are: 3, 7, and 6.
The next terms in the sequence occur for n = 2, given a sequence of six numbers. The Jacobi 6 X 6 matrix has as its rows:
      1, 1, 0, 0, 0, 0
      1, 1, 1, 0, 0, 0
      0, 1, 1, 1, 0, 0
      0, 0, 1, 1, 1, 0
      0, 0, 0, 1, 1, 1
      0, 0, 0, 0, 1, 1.
Its inverse has as rows:
      0, 1, 1, 0, 1, 1
      1, 1, 1, 0, 1, 1
      1, 1, 0, 0, 0, 0
      0, 0, 0, 0, 1, 1
      1, 1, 0, 1, 1, 1
      1, 1, 0, 1, 1, 0.
These 6 latter rows from binary to decimal give the next 6 terms of the sequence: 27, 49, 48, 3, 55, and 54.
Triangle T(n,k) begins:
     3,    7,    6;
    27,   59,   48,   3,   55,   54;
   219,  475,  384,  27,  443,  432,  3,  439,  438;
  1755, 3803, 3072, 219, 3547, 3456, 27, 3515, 3504, 3, 3511, 3510;
  ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Boston, 2nd Ed., 12th printing, 2002, pp. 24-25.
  • P. Lancaster and M. Tismenetsky, The Theory of Matrices, Academic Press, Boston, 1985, p. 35.
  • J. P. Melo, Reversibility of John von Neumann cellular automata, M.Sc. Thesis, Division of Computer Science, Instituto Tecnológico de Aeronáutica, 1997 (in Portuguese), p. 18.
  • K. Sutner, Linear Cellular Automata and the Garden-of-Eden, The Mathematical Intelligencer, 11(2), 1989, 49-53, p. 52.

Crossrefs

Column k=1 gives A083713.
Column k=3 gives A083233.
T(n,3n) gives A125837(n+1).
T(n,3n-1) gives A083068.
T(n,3n-2) gives A010701.
Cf. A038184 one-dimensional cellular automaton (Rule 150) in a tape with 3n cells has as adjacency matrix the Jacobi matrices, 3n X 3n, with 1s on the lower, main and upper diagonals and the operations on it are in GF(2).

Programs

  • Maple
    T:= n-> (M-> seq(add(abs(M[j, n*3-i])*2^i, i=0..n*3-1), j=1..n*3))
                   (Matrix(n*3, (i, j)-> `if`(abs(i-j)<2, 1, 0))^(-1)):
    seq(T(n), n=1..10);  # Alois P. Heinz, May 20 2023
  • Mathematica
    sequence = {};
    m = 6;
    For[k = 1, k <= m, k++, {
      n = 3*k;
      J = ConstantArray[0, {n, n}];
      For[i = 1, i < n, i++,
       J[[i, i]] = J[[i + 1, i]] = J[[i, i + 1]] = 1];
      J[[1, 1]] = J[[n, n]] = 1;
      InvJ = Mod[Inverse[J], 2];
      For[i = 1, i <= n, i++, AppendTo[sequence, FromDigits[InvJ[[i]], 2]]]
      }
     ]
    sequence
  • PARI
    row(n)=my(m=3*n, A=lift(matrix(m, m, i, j, Mod(abs(i-j)<=1, 2))^(-1))); vector(m, i, fromdigits(A[i,], 2)) \\ Andrew Howroyd, May 20 2023

Formula

The recurrence has as its base: r(1, 1) = 3; r(2, 1) = 7 and r(3, 1) = 6;
For 2 <= k <= m, and i = 1, 2, ..., 3(k-1):
r(i, k) = 8*r(i, k-1) + r(1,1) (i != 0 (mod 3)).
And r(3k-2, k) = r(1, 1);
r(3k-1, k) = 8*r(3(k-1), k-1) + r(2,1);
r(3k, k) = 8*r(3(k-1), (k-1)) + r(3, 1).

A156752 a(n) = floor(Catalan(n+1)/Catalan(n)).

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Philippe Deléham, Feb 14 2009

Keywords

Comments

Decimal expansion of 3667/30000. - Elmo R. Oliveira, May 05 2024

Crossrefs

Formula

a(n) = floor(A000108(n+1)/A000108(n)).
G.f.: (1+x+x^4)/(1-x).
a(0)=1, a(1) = a(2) = a(3) = 2, a(n) = 3 for n>3.
E.g.f.: 3*exp(x) - 2 - x - x^2/2 - x^3/6. - Elmo R. Oliveira, Aug 09 2024
a(n) = floor(4^(n/(n+1))). - Aaron J Grech, Aug 30 2024

A168330 Period 2: repeat [3, -2].

Original entry on oeis.org

3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2
Offset: 1

Views

Author

Klaus Brockhaus, Nov 23 2009

Keywords

Comments

Interleaving of A010701 and -A007395.
Binomial transform of 3 followed by a signed version of A020714.
Inverse binomial transform of 3 followed by A000079.
A084964 without first two terms gives partial sums.

Crossrefs

Cf. A168309 (repeat 4, -3), A010701 (all 3's sequence), A007395 (all 2's sequence), A010716 (all 5's sequence), A020714 (5*2^n), A000079 (powers of 2), A084964 (follow n+2 by n).

Programs

  • Magma
    &cat[[3,-2]: n in [1..42]];
    
  • Magma
    [n eq 1 select 3 else -Self(n-1)+1:n in [1..84]];
    
  • Magma
    [(-5*(-1)^n+1)/2: n in [1..100]]; // Vincenzo Librandi, Jul 19 2016
    
  • Mathematica
    LinearRecurrence[{0, 1}, {3, -2}, 25] (* G. C. Greubel, Jul 18 2016 *)
    PadRight[{},120,{3,-2}] (* Harvey P. Dale, Oct 05 2016 *)
  • PARI
    a(n)=3-n%2*5 \\ Charles R Greathouse IV, Jul 13 2016

Formula

a(n) = (-5*(-1)^n + 1)/2.
a(n+1) - a(n) = 5*(-1)^n.
a(n) = -a(n-1) + 1 for n > 1; a(1) = 3.
a(n) = a(n-2) for n > 2; a(1) = 3, a(2) = -2.
G.f.: x*(3 - 2*x)/((1-x)*(1+x)).
a(n) = A049071(n). - R. J. Mathar, Nov 25 2009
E.g.f.: (1/2)*(1 - exp(-x))*(5 + exp(x)). - G. C. Greubel, Jul 18 2016

A281098 a(n) is the GCD of the sequence d(n) = A261327(k+n) - A261327(k) for all k.

Original entry on oeis.org

0, 1, 1, 3, 4, 1, 3, 1, 8, 3, 5, 1, 12, 1, 7, 3, 16, 1, 9, 1, 20, 3, 11, 1, 24, 1, 13, 3, 28, 1, 15, 1, 32, 3, 17, 1, 36, 1, 19, 3, 40, 1, 21, 1, 44, 3, 23, 1, 48, 1, 25, 3, 52, 1, 27, 1, 56, 3, 29, 1, 60, 1, 31, 3, 64, 1, 33, 1, 68, 3, 35, 1, 72, 1, 37, 3, 76, 1, 39, 1
Offset: 0

Views

Author

Paul Curtz, Jan 14 2017

Keywords

Comments

Successive sequences:
0: 0, 0, 0, 0, ... = 0 * ( )
1: 4, -3, 11, -8, ... = 1 * ( )
2: 1, 8, 3, 16, ... = 1 * ( ) A195161
3: 12, 0, 27, -3, ... = 3 * (4, 0, 9, -1, ...)
4: 4, 24, 8, 40, ... = 4 * (1, 6, 2, 10, ...) A064680
5; 28, 5, 51, 4, ... = 1 * ( )
6: 9, 48, 15, 72, ... = 3 * (3, 16, 5, 24, ...) A195161
7: 52, 12, 83, 13, ... = 1 * ( )
8: 16, 80, 24, 112, ... = 8 * (2, 10, 3, 14, ...) A064080
9: 84 21, 123, 24, ... = 3 * (28, 7, 41, 8, ...)
10: 25, 120, 35, 160, ... = 5 * (5, 24, 7, 32, ...) A195161

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(-x (-1 - x - 4 x^2 - 5 x^3 - 3 x^4 - 6 x^5 + 3 x^6 - 5 x^7 + 4 x^8 - x^9 + x^10))/((x^2 - x + 1) (1 + x + x^2) (x - 1)^2*(1 + x)^2*(1 + x^2)^2), {x, 0, 79}], x] (* Michael De Vlieger, Feb 02 2017 *)
  • PARI
    f(n) = numerator((4 + n^2)/4);
    a(n) = gcd(vector(1000, k, f(k+n) - f(k))); \\ Michel Marcus, Jan 15 2017
    
  • PARI
    A281098(n) = if(n%2, gcd((n\2)-1,3), n>>(bitand(n,2)/2)); \\ Antti Karttunen, Feb 15 2023

Formula

G.f.: -x*( -1 - x - 4*x^2 - 5*x^3 - 3*x^4 - 6*x^5 + 3*x^6 - 5*x^7 + 4*x^8 - x^9 + x^10 )/( (x^2 - x + 1)*(1 + x + x^2)*(x - 1)^2*(1 + x)^2*(1 + x^2)^2 ). - R. J. Mathar, Jan 31 2017
a(2*k) = A022998(k).
a(2*k+1) = A109007(k-1).
a(3*k) = interleave 3*k*(3 +(-1)^k)/2, 3.
a(3*k+1) = interleave 1, A166304(k).
a(3*k+2) = interleave A166138(k), 1.
a(4*k) = 4*k.
a(4*k+1) = period 3: repeat [1, 1, 3].
a(4*k+2) = 1 + 2*k.
a(4*k+3) = period 3: repeat [3, 1, 1].
a(n+12) - a(n) = 6*A131743(n+3).
a(n) = (18*n + 40 - 16*cos(n*Pi/3) + 9*n*cos(n*Pi/2) + 32*cos(2*n*Pi/3) + (18*n - 40)*cos(n*Pi) + 3*n*cos(3*n*Pi/2) - 16*cos(5*n*Pi/3))/48. - Wesley Ivan Hurt, Oct 04 2018

Extensions

Corrected and extended by Michel Marcus, Jan 15 2017

A359632 Sequence of gaps between deletions of multiples of 7 in step 4 of the sieve of Eratosthenes.

Original entry on oeis.org

12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3, 12, 7, 4, 7, 4, 7, 12, 3
Offset: 1

Views

Author

Alexandre Herrera, Jan 08 2023

Keywords

Comments

This sequence is a repeating cycle 12, 7, 4, 7, 4, 7, 12, 3 of length A005867(4) = 8 = (prime(1)-1)*(prime(2)-1)*(prime(3)-1).
The mean of the cycle is prime(4) = 7.
The cycle is constructed from the sieve of Eratosthenes as follows.
In the first 2 steps of the sieve, the gaps between the deleted numbers are constant: gaps of 2 in step 1 when we delete multiples of 2, and gaps of 3 in step 2 when we delete multiples of 3.
In step 3, when we delete all multiples of 5, the gaps are alternately 7 and 3 (i.e., cycle [7,3]).
For this sequence, we look at the interesting cycle from step 4 (multiples of 7).
Excluding the final 3, the cycle has reflective symmetry: 12, 7, 4, 7, 4, 7, 12. This is true for every subsequent step of the sieve too.
The central element is 7 (BUT not all steps have their active prime number as the central element).
a(1) is A054272(4).
a(8) = 3, the first appearance of the last element of the cycle, corresponds to deletion of 217 = A002110(4)+7.

Examples

			After sieve step 3, multiples of 2,3,5 have been eliminated leaving
  7,11,13,17,19,23,29,31,37,41,43,47,49,53, ...
  ^                                   ^
The first two multiples of 7 are 7 itself and 49 and they are distance 12 apart in the list so that a(1) = 12.
For n = 2, a(n) = 7, because the third multiple of 7 that is not a multiple of 2, 3 or 5 is 77 = 7 * 11, which is located 7 numbers after 49 = 7*7 in the list of numbers without the multiples of 2, 3 and 5.
		

Crossrefs

Equivalent sequences for steps 1..3: A007395, A010701, A010705 (without the initial 3).

Programs

  • Mathematica
    PadRight[{}, 100, {12, 7, 4, 7, 4, 7, 12, 3}] (* Paolo Xausa, Jul 01 2024 *)
  • Python
    numbers = []
    for i in range(2,880):
        numbers.append(i)
    gaps = []
    step = 4
    current_step = 1
    while current_step <= step:
        prime = numbers[0]
        new_numbers = []
        gaps = []
        gap = 0
        for i in range(1,len(numbers)):
            gap += 1
            if numbers[i] % prime != 0:
                new_numbers.append(numbers[i])
            else:
                gaps.append(gap)
                gap = 0
        current_step += 1
        numbers = new_numbers
    print(gaps)

Formula

a(n) = A236175(n)+1. - Peter Munn, Jan 21 2023
Previous Showing 51-60 of 70 results. Next