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

A347123 Fully multiplicative with a(prime(k)) = prime(1+floor(A001223(k)/2)).

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 5, 8, 9, 6, 3, 12, 5, 10, 9, 16, 3, 18, 5, 12, 15, 6, 7, 24, 9, 10, 27, 20, 3, 18, 7, 32, 9, 6, 15, 36, 5, 10, 15, 24, 3, 30, 5, 12, 27, 14, 7, 48, 25, 18, 9, 20, 7, 54, 9, 40, 15, 6, 3, 36, 7, 14, 45, 64, 15, 18, 5, 12, 21, 30, 3, 72, 7, 10, 27, 20, 15, 30, 5, 48, 81, 6, 7, 60, 9, 10, 9, 24, 11, 54
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Crossrefs

Programs

  • PARI
    A347123(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 1] = prime(1+((nextprime(f[i, 1]+1)-f[i,1])\2))); factorback(f); };

Formula

For all n >= 1, A001222(a(n)) = A001222(n), A007814(a(n)) = A007814(n).
For all n >= 1, a(A003586(n)) = A003586(n).

A376520 Position of first appearance of 2n in the run-compression (A037201) of the first differences (A001223) of the prime numbers (A000040).

Original entry on oeis.org

2, 3, 8, 22, 32, 42, 28, 259, 91, 141, 172, 242, 341, 400, 556, 692, 198, 1119, 3126, 2072, 1779, 1737, 7596, 2913, 3246, 2101, 3598, 7651, 4383, 4294, 3457, 8284, 14220, 11986, 15101, 3204, 32808, 18217, 16273, 42990, 22303, 37037, 13729, 43117, 32820, 70501
Offset: 1

Views

Author

Gus Wiseman, Sep 26 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, we can remove all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The sequence of prime numbers (A000040) is:
  2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, ...
with first differences (A001223):
  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, ...
with run-compression (A037201):
  1, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, ...
with first appearance of 2n at (A376520):
  2, 3, 8, 22, 32, 42, 28, 259, 91, 141, 172, 242, 341, 400, 556, 692, 198, 1119, ...
		

Crossrefs

This is the position of first appearance of 2n in A037201.
For positions of twos instead of first appearances we have A376343.
The sorted version is A376521.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, differences A057820.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259 (ones A375927).
A013929 lists nonsquarefree numbers, differences A078147.
A116861 counts partitions by compressed sum, compositions A373949.
A116608 counts partitions by compressed length, compositions A333755.
A274174 counts contiguous compositions, ranks A374249.
A333254 lists run-lengths of differences between consecutive primes.
A373948 encodes compression using compositions in standard order.

Programs

  • Mathematica
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    q=First/@Split[Differences[Select[Range[10000],PrimeQ]]];
    Table[Position[q,2k][[1,1]],{k,mnrm[Rest[q]/2]}]

A052377 Primes followed by an [8,4,8]=[d,D-d,d] prime difference pattern of A001223.

Original entry on oeis.org

389, 479, 1559, 3209, 8669, 12269, 12401, 13151, 14411, 14759, 21851, 28859, 31469, 33191, 36551, 39659, 40751, 50321, 54311, 64601, 70229, 77339, 79601, 87671, 99551, 102539, 110261, 114749, 114761, 118661, 129449, 132611, 136511
Offset: 1

Views

Author

Labos Elemer, Mar 22 2000

Keywords

Comments

A subsequence of A031926. [Corrected by Sean A. Irvine, Nov 07 2021]
a(n)=p, the initial prime of two consecutive 8-twins of primes as follows: [p,p+8] and [p+12,p+12+8], d=8, while the distance of the two 8-twins is 12 (minimal; see A052380(4/2)=12).
Analogous sequences are A047948 for d=2, A052378 for d=4, A052376 for d=10 and A052188-A052199 for d=6k, so that in the [d,D-d,d] difference patterns which follows a(n) the D-d is minimal(=0,2,4; here it is 4).

Examples

			p=1559 begins the [1559,1567,1571,1579] prime quadruple consisting of two 8-twins [1559,1567] and[1571,1579] which are in minimal distance, min{D}=1571-1559=12=A052380(8/2).
		

Crossrefs

Formula

a(n) is the initial term of a [p, p+8, p+12, p+12+8] quadruple of consecutive primes.

A062357 a(n) = n*p(n+1)-(n+1)*p(n) = n*d(n)-p(n), where p(n) is the n-th prime and d(n) is the n-th prime-difference, A001223(n).

Original entry on oeis.org

-1, 1, 1, 9, -1, 11, -3, 13, 31, -9, 35, 11, -15, 13, 43, 43, -25, 47, 9, -31, 53, 9, 55, 103, 3, -49, 5, -51, 7, 307, -3, 61, -71, 201, -79, 65, 65, -11, 67, 67, -97, 239, -105, -17, -107, 353, 353, -31, -129, -29, 73, -135, 289, 73, 73, 73, -155, 77, -41, -161, 327, 575, -55, -183, -53, 607, 71, 343, -209, -69, 73, 217
Offset: 1

Views

Author

Labos Elemer, Jul 13 2001

Keywords

Comments

A sequence based on the solution of the equation: 1+(1+n)*prime(n)/x-n*prime(n+1)/x=0 for x. This is an irrational rotation-like sequence: the sequence is similar to a Beatty sequence. - Roger L. Bagula, Jun 06 2002

Examples

			n = 10: a(10) = 10*31-11*29 = 310-319 = -9;
n = 54: a(54) = 54*257-55*251 = 13878-13805 = 73;
n = 55: a(55) = 55*263-56*257 = 14465-14392 = 73; consecutive terms are often equal to each other.
		

Crossrefs

Programs

  • Magma
    [n*NthPrime(n + 1) - (n + 1)*NthPrime(n): n in [1..75]]; // Vincenzo Librandi, Jun 29 2018
  • Maple
    seq(n*ithprime(n+1)-(n+1)*ithprime(n),n=1..80); # Muniru A Asiru, Jun 29 2018
  • Mathematica
    Table[(Prime[w+1]-Prime[w])*w-Prime[w], {w, 1, 1024}]
  • PARI
    a(n)={n*prime(n + 1) - (n + 1)*prime(n)} \\ Harry J. Smith, Aug 06 2009
    

Formula

a(n) = n*A000040(n+1) - (n+1)*A000040(n) = n*A001223(n) - A000040(n).

A064026 Numbers k such that d(k) + d(k+1) + d(k+2) = 8, where d(k) = A001223.

Original entry on oeis.org

2, 3, 5, 26, 43, 142, 234, 286, 313, 458, 484, 743, 1167, 1548, 1823, 1833, 1867, 2066, 2151, 2199, 2362, 2493, 2789, 3410, 3718, 4559, 5251, 5618, 6317, 6696, 6899, 7147, 7590, 7807, 7932, 8083, 8602, 9402, 9517, 9682, 10438, 11006, 11239, 11494, 12618
Offset: 1

Views

Author

Jason Earls, Sep 08 2001

Keywords

Comments

Prime(a(n)) = 3, 5, 11, 101, 191, 821, 1481, 1871, 2081, ...; starting with 11 on, all primes == 11 (mod 30). - Zak Seidov, Jan 25 2013

Crossrefs

Cf. A001223.

Programs

  • Mathematica
    t={}; Do[If[Prime[n + 3] == Prime[n] + 8, AppendTo[t, n]], {n, 1000}]; t (* Zak Seidov, Jan 25 2013 *)
  • PARI
    d(n) = prime(n+1)-prime(n); e(n) = d(n)+d(n+1)+d(n+2); j=[]; for(n=1,35000, if(e(n)==8,j=concat(j,n))); j
    
  • PARI
    d3(n)= { prime(n + 3) - prime(n) } { n=0; default(primelimit, 12000000); for (m=1, 10^9, if (d3(m)==8, write("b064026.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 06 2009

A084290 Difference between consecutive primes arising before difference (d=2) between twin primes. In A001223, terms before the ones that equal 2.

Original entry on oeis.org

1, 2, 4, 4, 6, 4, 6, 4, 4, 4, 6, 10, 6, 10, 4, 4, 6, 6, 4, 4, 10, 10, 10, 4, 12, 6, 6, 4, 10, 6, 12, 10, 4, 4, 4, 6, 10, 10, 10, 4, 22, 6, 18, 6, 4, 12, 4, 4, 10, 4, 6, 6, 4, 4, 12, 4, 4, 4, 18, 16, 4, 10, 12, 4, 12, 16, 4, 16, 16, 12, 6, 4, 6, 12, 10, 4, 4, 10, 12, 4, 6, 28, 10, 4, 22, 4, 28, 6
Offset: 1

Views

Author

Labos Elemer, May 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; s = 1; Do[s1 = Prime[n] - Prime[n - 1]; If[Equal[s1, 2], AppendTo[t, s]]; s = s1, {n, 2, 1000}]; t
  • PARI
    list(lim) = {my(prv = 3, dprv = 1, d); forprime(p = 5, lim, d = p - prv; if(d == 2, print1(dprv, ", ")); prv = p; dprv = d);} \\ Amiram Eldar, Feb 08 2025

A084291 Difference between consecutive primes arising after difference (d=2) between twin primes. In A001223, terms succeeding those that equal 2.

Original entry on oeis.org

2, 4, 4, 4, 6, 4, 6, 6, 4, 4, 10, 6, 10, 4, 12, 4, 10, 6, 10, 4, 4, 10, 6, 4, 18, 6, 6, 12, 4, 12, 10, 4, 10, 4, 4, 10, 6, 10, 6, 4, 10, 6, 4, 6, 4, 6, 4, 6, 4, 4, 4, 6, 24, 10, 10, 12, 4, 10, 16, 22, 4, 10, 4, 10, 16, 6, 10, 4, 4, 22, 6, 6, 6, 16, 4, 4, 6, 10, 6, 16, 28, 10, 16, 12, 4, 12, 6
Offset: 1

Views

Author

Labos Elemer, May 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Do[s1=Prime[n]-Prime[n-1]; s=Prime[n+1]-Prime[n]; s2=Prime[n+2]-Prime[n+1]; If[Equal[s, 2], Print[s2]], {n, 1, 10000}]
    #[[3]]-#[[2]]&/@Select[Partition[Prime[Range[1000]],3,1],#[[2]]- #[[1]] == 2&] (* Harvey P. Dale, Jul 08 2018 *)
    Join[{2},SequenceCases[Differences[Prime[Range[3,500]]],{2,}][[;;,2]]] (* _Harvey P. Dale, Mar 20 2023 *)
  • PARI
    list(lim) = {my(prv = 3, dprv = 1, d); forprime(p = 5, lim, d = p - prv; if(dprv == 2, print1(d, ", ")); prv = p; dprv = d);} \\ Amiram Eldar, Feb 08 2025

A128039 Numbers n such that 1 - Sum_{k=1..n-1} A001223(k)*(-1)^k = 0.

Original entry on oeis.org

3, 6, 10, 13, 18, 26, 29, 218, 220, 223, 491, 535, 538, 622, 628, 3121, 3126, 3148, 3150, 3155, 3159, 4348, 4436, 4440, 4444, 4458, 4476, 4485, 4506, 4556, 4608, 4611, 4761, 5066, 5783, 5788, 12528, 1061290, 2785126, 2785691, 2867466, 2867469, 2872437
Offset: 1

Views

Author

Manuel Valdivia, May 07 2007

Keywords

Comments

Sequence has 294 terms < 10^7. If n is in this sequence then prime(n) = abs(3 + 2*Sum_{k=1..n-1} prime(k)*(-1)^k).

Examples

			1 - ( -A001223(1) + A001223(2)) = 1-(-1+2) = 0, hence 3 is a term.
1 - ( -A001223(1) + A001223(2) - A001223(3) + A001223(4) - A001223(5)) = 1-(-1+2-2+4-2) = 0, hence 6 is a term.
		

Crossrefs

Cf. A127596, A001223 (differences between consecutive primes), A000101 (increasing gaps between primes, upper end), A002386 (increasing gaps between primes, lower end), A066033.

Programs

  • Mathematica
    S=0; a=0; Do[S=S+((Prime[k+1]-Prime[k])*(-1)^k); If[1-S==0, a++; Print[a," ",k+1]], {k, 1, 10^7, 1}]

A147965 a(n) = n + 1 - A001223(n) = n - A046933(n). In words, a(n) is the difference between n+1 and the n-th gap between primes.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 6, 5, 4, 9, 6, 9, 12, 11, 10, 11, 16, 13, 16, 19, 16, 19, 18, 17, 22, 25, 24, 27, 26, 17, 28, 27, 32, 25, 34, 31, 32, 35, 34, 35, 40, 33, 42, 41, 44, 35, 36, 45, 48, 47, 46, 51, 44, 49, 50, 51, 56, 53, 56, 59
Offset: 1

Views

Author

Omar E. Pol, Nov 17 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{nn=70,prg},prg=Differences[Prime[Range[nn]]];#[[2]]-#[[1]]&/@ Thread[{prg,Range[nn-1]}]+1] (* Harvey P. Dale, Nov 21 2021 *)

Extensions

Definition corrected by N. J. A. Sloane, Nov 21 2021, at the suggestion of Harvey P. Dale.

A174433 Triangle read by rows: T(n,k) = prime(n) mod A001223(k), where A001223 are differences between consecutive primes.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 1, 3, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 3, 1, 3, 1, 3, 0, 1, 1, 3, 1, 3, 1, 3, 5, 0, 1, 1, 1, 1, 1, 1, 1, 5, 1, 0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 5, 1, 5, 1, 1, 0, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 28 2010

Keywords

Comments

The first prime gap is 3-2=1, so the first column is T(n,1)=0. The second and third prime gaps are 5-3=2 and 7-5=2, and since all primes > 2 are odd, T(n,2) = T(n,3) = 1.

Examples

			Triangle begins:
  0;
  0,1;
  0,1,1;
  0,1,1,3;
  0,1,1,3,1;
		

Crossrefs

Cf. A000040.

Programs

  • Maple
    A001223 := proc(n) ithprime(n+1)-ithprime(n) ; end proc:
    A174433 := proc(n,k) ithprime(n) mod A001223(k) ; end proc:
    seq(seq(A174433(n,k),k=1..n),n=1..14) ;
Previous Showing 51-60 of 981 results. Next