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

A230850 A054541 and A000012 interleaved.

Original entry on oeis.org

2, 1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 6, 1, 2, 1, 6, 1, 4, 1, 2, 1, 4, 1, 6, 1, 6, 1, 2, 1, 6, 1, 4, 1, 2, 1, 6, 1, 4, 1, 6, 1, 8, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 14, 1, 4, 1, 6, 1, 2, 1, 10, 1, 2, 1, 6, 1, 6, 1, 4, 1, 6, 1, 6, 1, 2, 1, 10, 1, 2, 1
Offset: 1

Views

Author

Omar E. Pol, Oct 31 2013

Keywords

Comments

a(n) is also the length of the n-th edge of a staircase which represents the function pi(x) on the first quadrant of the square grid, see A000720.
a(2n-1) is the length of the n-th horizontal edge in the staircase.
a(2n) is the length of the n-th vertical edge in the staircase.
For another version see A230849.

Examples

			Illustration of initial terms, n = 1..22:
.
1                                                              _ _|
1                                                  _ _ _ _ _ _|
1                                          _ _ _ _|
1                                      _ _|
1                              _ _ _ _|
1                          _ _|
1                  _ _ _ _|
1              _ _|
1          _ _|
1        _|
1    _ _|
.
.      2 1   2   2       4   2       4   2       4           6   2
.
Drawing vertical line segments below the staircase (as shown below) we have that the number of cells in the vertical bars gives 0 together A000720.
Drawing horizontal line segments above the staircase we have that the number of cells in the k-th horizontal bar is A000040(k).
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13  |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11  |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7   |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5   |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3   |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2   |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
.    0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
.
		

Crossrefs

Programs

  • Mathematica
    Riffle[Join[{2},Differences[Prime[Range[100]]]],1] (* Paolo Xausa, Oct 31 2023 *)
  • PARI
    A230850(n) = if(1==n,2,if((n%2),prime((n+1)/2)-prime(((n+1)/2)-1),1)); \\ Antti Karttunen, Dec 23 2018

Formula

a(1) = 2; for n > 1, a(n) = A230849(n). - Antti Karttunen, Dec 23 2018

A127439 Triangle read by rows, in which row n consists of first n terms of A054541.

Original entry on oeis.org

2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 4, 2, 1, 2, 2, 4, 2, 2, 1, 2, 2, 4, 2, 4, 2, 1, 2, 2, 4, 2, 4, 2, 2, 1, 2, 2, 4, 2, 4, 2, 4, 2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4
Offset: 1

Views

Author

Gary W. Adamson, Jan 14 2007

Keywords

Comments

Rows tend to A054541: (2, 1, 2, 2, 4, 2, 4, ...)

Examples

			prime(5) = 2 + 1 + 2 + 2 + 4 = 11.
From _Omar E. Pol_, Dec 23 2021: (Start)
Triangle begins:
  2;
  2, 1;
  2, 1, 2;
  2, 1, 2, 2;
  2, 1, 2, 2, 4;
  2, 1, 2, 2, 4, 2;
  2, 1, 2, 2, 4, 2, 4;
  2, 1, 2, 2, 4, 2, 4, 2;
  2, 1, 2, 2, 4, 2, 4, 2, 4;
  2, 1, 2, 2, 4, 2, 4, 2, 4, 6;
  2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2;
  2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6;
  2, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4;
... (End)
		

Crossrefs

Row sums give A000040.

Extensions

Edited by N. J. A. Sloane, Jan 27 2007
More terms from Omar E. Pol, Feb 21 2014

A230847 a(n) = 1 + A054541(n).

Original entry on oeis.org

3, 2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 9, 5, 3, 5, 3, 5, 15, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 15, 5, 3, 5, 15, 7, 11, 3, 5, 7, 9, 7, 7, 5, 7, 9, 5, 9, 11, 3, 11, 3, 7, 5, 7, 9, 5, 3, 5, 13, 9, 5, 9, 5, 7
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2013

Keywords

Comments

Partial sums give A014688.

Examples

			On the first quadrant of the square grid consider a diagram in which the n-th horizontal bar contains A000040(n) cells and in which the number of cells in the vertical bars gives 0 together with A000720 as shown below. a(n) is the sum of the length of the n-th horizontal boundary segment and the length of the n-th vertical boundary segment between the structure formed by the horizontal bars and the structure formed by the vertical bars, hence a(n) = A054541(n) + 1. The total length of the boundary segments from [0, 0] after n-th stage is A014688(n).
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13  |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11  |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7   |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5   |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3   |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2   |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
.    0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
.
		

Crossrefs

Formula

a(n) = A230846(n) = A076368(n), n>1. - R. J. Mathar, May 16 2023

A339766 Decimal expansion of Sum_{n>=1} A054541(n)/A076954(n-1).

Original entry on oeis.org

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

Views

Author

Davide Rotondo, Dec 16 2020

Keywords

Comments

With this constant f(1) and using the formula f(n+1) = (floor(f(n))*(f(n))) - ((floor(f(n)))^2 - floor(f(n))) it is possible to obtain the prime numbers repeated exactly a number of times corresponding to the position of the prime number. That is, 2 once, 3 twice, 5 thrice, etc.

Examples

			2.61200074043...
		

Crossrefs

Programs

  • Mathematica
    imax:=87;First[RealDigits[N[2+Sum[(Prime[i]-Prime[i-1])/Product[Prime[j-1]^(j-1),{j,2,i}],{i,2,imax}],imax]]] (* Stefano Spezia, Dec 16 2020 *)

Formula

Equals 2 + (3-2)/(2) + (5-3)/(2*3^2) + (7-5)/(2*3^2*5^3) + (11-7)/(2*3^2*5^3*7^4) + ...

A075526 a(n) = A008578(n+2) - A008578(n+1).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2002

Keywords

Comments

n appears this number of times in A000720. - Lekraj Beedassy, Jun 19 2006
a(0) = 1, for n >= 1: a(n) = differences between consecutive primes (A001223(n)) = A158611(n+2) - A158611(n+1). Partial sums give A006093 (shifted). - Jaroslav Krizek, Aug 04 2009
First differences of noncomposite numbers. - Juri-Stepan Gerasimov, Feb 17 2010
This is 1 together with A001223. A054541 is 2 together with A001223. A125266 is 3 together with A001223. - Omar E. Pol, Nov 01 2013

Crossrefs

Programs

Formula

a(n) = A001223(n) for n>0.

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010

A098974 Primes p such that q-p = 24, where q is the next prime after p.

Original entry on oeis.org

1669, 2179, 4177, 4523, 4759, 5237, 6173, 6397, 6737, 7079, 7369, 7793, 8123, 8329, 9067, 11003, 11633, 11839, 12073, 12119, 13009, 13267, 16033, 16193, 16453, 16763, 16787, 17053, 17683, 17989, 18593, 18637, 19183, 19507, 20483, 22409, 22877, 23227
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Oct 23 2004

Keywords

Comments

Lower prime of a difference of 24 between consecutive primes.
23 successive numbers after prime number p are composite. - Artur Jasinski, Jan 15 2007

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[Prime[x + 1] - Prime[x] == 24, AppendTo[a, Prime[x]]], {x, 1, 10000}]; a (* Artur Jasinski, Jan 15 2007 *)

Extensions

Entry revised by N. J. A. Sloane, Feb 13 2007

A182986 Zero together with the prime numbers (A000040).

Original entry on oeis.org

0, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 1

Views

Author

Keywords

Comments

These numbers are the possible characteristics of a field.
First differences are in A054541. - Omar E. Pol, Oct 31 2013
Also A158611 without its second term. - Omar E. Pol, Nov 01 2013
The ideals generated by a(n) form Spec(Z), the set of prime ideals of the ring of integers. Due to its importance in algebraic geometry, algebraic geometers often consider 0 to be an honorary prime. - Keith J. Bauer, Jan 09 2024

Crossrefs

Cf. A141468.
Complement of A018252. - Arkadiusz Wesolowski, Sep 15 2011

Programs

A125266 Number of repetitions in A007918.

Original entry on oeis.org

3, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8
Offset: 1

Views

Author

Cino Hilliard, Jan 15 2007

Keywords

Comments

Except for the first 2 terms, these numbers are always even. Conjecture: the number 2 occurs infinitely often in this sequence.
Essentially the same as A075526 and A054541. - R. J. Mathar, Jun 15 2008
3 together with A001223. - Omar E. Pol, Nov 01 2013

Examples

			A007918(0) = 2, A007918(1)=2, A007918(2) = 2. So 2 repeats 3 times, giving 3 as the first term in the table.
		

Crossrefs

Programs

  • Mathematica
    Join[{3},Differences[Prime[Range[100]]]] (* Paolo Xausa, Oct 25 2023 *)
  • PARI
    nextprimerep(n) = { local(x,y,y1,c=0); y1=2; for(x=0,n, y=nextprime(x); if(y==y1,c++,y1=y;print1(c",");c=1); ) }

A086718 Convolution of sequence of primes with sequence sigma(n).

Original entry on oeis.org

2, 9, 22, 48, 85, 151, 231, 355, 500, 709, 937, 1267, 1617, 2069, 2575, 3193, 3860, 4686, 5549, 6593, 7725, 8985, 10337, 11961, 13591, 15464, 17498, 19714, 22036, 24690, 27378, 30382, 33603, 37023, 40597, 44733, 48720, 53152, 57950, 62978, 68074, 73898, 79558
Offset: 1

Views

Author

Jon Perry, Jul 29 2003

Keywords

Comments

From Omar E. Pol, Dec 06 2021: (Start)
Antidiagonal sums of A272214.
Convolution of A000040 and A000203.
Convolution of A054541 and A024916.
Convolution of the nonzero terms of A007504 and A340793.
a(n) is also the volume of a tower or polycube in which the successive terraces are the symmetric representation of sigma(k), k = 1..n starting from the top, and the successive heights of the terraces are the prime numbers starting from the base. (End)

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    P:= [seq(ithprime(i),i=1..N+1)]:
    S:= [seq(numtheory:-sigma(i),i=1..N+1)]:
    seq(add(P[i]*S[n-i],i=1..n-1),n=2..N+1); # Robert Israel, Sep 09 2020
  • PARI
    p=primes(30); s=vector(30,i, sigma(i)); conv(u,v)=local(w); w=vector(length(u),i,sum(j=1,i,u[j]*v[i+1-j])); w;
    conv(p,s)

Extensions

More terms from Robert Israel, Sep 09 2020

A230980 Number of primes <= n, starting at n=0.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 0

Views

Author

Omar E. Pol, Nov 02 2013

Keywords

Comments

Essentially identical to A000720, except that sequence, being an arithmetical sequence, starts at n = 1. - N. J. A. Sloane, Jun 21 2017
Also, on the first quadrant of the square grid, consider a diagram in which the number of cells in the horizontal bar of the k-th row is equal to the k-th prime, see example. The total length of the boundary segments between the structure formed by the first k horizontal bars and the structure formed by the vertical bars, from [0, 0], is equal to A014688(k). a(n) is the number of cells in the vertical bar of the n-th column.
Note that in a similar diagram for A000720 the lengths of the horizontal bars give A006093 (primes minus 1) not A000040 (the prime numbers) because A000720 has only one zero, not two.
Also, the number of distinct prime factors of the factorial number n!. - Torlach Rush, Jan 17 2014
The lengths of the boundary horizontal segments between the structure formed by the horizontal bars and the structure formed by the vertical bars of the diagram gives A054541. The zig-zag path formed by the boundary segments is in A230850. - Omar E. Pol, Jun 22 2017

Examples

			Illustration of initial terms:
.     _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
31   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
29   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
23   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | |
19   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | |
17   |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | |
13   |_ _ _ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | |
11   |_ _ _ _ _ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | |
7    |_ _ _ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | |
5    |_ _ _ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | |
3    |_ _ _| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
2    |_ _|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
n:    0 1 2 3 4 5 6 7 8 9...
a(n): 0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10
		

Crossrefs

Programs

Extensions

Offset and definition changed by N. J. A. Sloane, Jun 21 2017
Showing 1-10 of 15 results. Next