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

A078498 Let q(n) be the prime defined in A078497; sequence gives (q(n)-prime(n))/6.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 2, 4, 1, 1, 2, 3, 1, 2, 1, 3, 4, 3, 5, 2, 1, 1, 5, 4, 4, 3, 5, 2, 3, 2, 1, 6, 5, 1, 2, 3, 7, 5, 5, 7, 2, 10, 5, 8, 1, 2, 5, 2, 1, 1, 2, 7, 1, 2, 9, 4, 4, 7, 6, 6, 3, 5, 6, 3, 1, 7, 5, 1, 5, 6, 5, 4, 3, 2, 5, 2, 2, 4, 3, 4, 3, 14, 3, 4, 4, 2, 9, 2, 7, 9, 8, 7, 4, 13
Offset: 5

Views

Author

Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), Nov 27 2002

Keywords

Examples

			a(6)=1, a(25)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[i]; j = 0; While[j++; df = 6*j; ! ((PrimeQ[p + df]) && (PrimeQ[p - df]))]; j, {i, 5, 100}]

Formula

For n>4 a(n)=( min{p : p>prime(n), p and 2*prime(n)-p are primes} - prime(n) ) / 6.

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 27 2004

A196934 a(n) is the first occurrence of n in sequence A078498.

Original entry on oeis.org

5, 8, 18, 14, 25, 38, 43, 50, 61, 48, 132, 167, 100, 88, 151, 217, 176, 216, 270, 214, 300, 785, 429, 687, 308, 1083, 374, 644, 713, 320, 840, 608, 654, 577, 1005, 1409, 1631, 1215, 928, 1386, 2304, 1984, 1203, 2336, 853, 1638, 1899, 1806, 1974, 1594, 1228
Offset: 1

Views

Author

Lei Zhou, Oct 07 2011

Keywords

Comments

Conjecture: Any prime number greater than 11 (p) can be the center term of arithmetic progressions prime chain p-6k, p, p+6k, while k>0.
a(n) is also the maximum number k that is needed to find a p(i)-6k, p(i), p(i)+6k kind of arithmetic progressions prime chain for all i <= n, while p(i) is the i-th prime number.
The Mathematica program gives the first 51 items.

Examples

			A078498(5)=1 (take the offset 5),  so a(1)=5;
2 first occurs as A078498(8), so a(2)=8;
		

Crossrefs

Programs

  • Mathematica
    max = 51; Array[fa, max]; Do[fa[i] = 0, {i, 1, max}]; ct = 0; i = 4; While[ct < max, i++; p = Prime[i]; j = 0; While[j++; df = 6*j; ! ((PrimeQ[p + df]) && (PrimeQ[p - df]))]; If[j <= max, If[fa[j] == 0, fa[j] = i; ct++]]]; Table[fa[i], {i, 1, max}]

A129758 Smallest prime p such that there are primes q and r with the property that p, q and r form an arithmetic progression and their sum is the same as three times the (n+2)-nd prime number.

Original entry on oeis.org

3, 3, 5, 7, 11, 7, 17, 17, 19, 31, 29, 19, 41, 47, 47, 43, 61, 59, 67, 61, 59, 71, 67, 89, 97, 101, 79, 89, 103, 113, 107, 127, 131, 139, 151, 127, 137, 167, 167, 163, 149, 163, 167, 157, 199, 163, 197, 181, 227, 227, 211, 239, 251, 257, 257, 229, 271, 269
Offset: 1

Views

Author

Giovanni Teofilatto, May 15 2007

Keywords

Comments

The same selection rule as in A078497 applies: if there is more than one prime triple (p,q=p+d,r=q+d) with p+q+r=A001748(n), take p from the triple with minimum d. - R. J. Mathar, May 19 2007

Examples

			3 + 5 + 7 = 15, which is three times the (1+2)th prime number. Thus a(1) = 3.
		

Crossrefs

Programs

  • Maple
    A129758 := proc(n) local p3, i,d,r,p; p3 := ithprime(n) ; i := n+1 ; while true do r := ithprime(i) ; d := r-p3 ; p := p3-d ; if isprime(p) then RETURN(p) ; fi ; i := i+1 ; od ; RETURN(-1) ; end: for n from 3 to 60 do printf("%d, ",A129758(n)) ; od ; # R. J. Mathar, May 19 2007
  • Mathematica
    a[n_]:=Module[{},k=1; While[Not[PrimeQ[Prime[n+1]-k] && PrimeQ[Prime[n+1]+k]], k++ ]; Prime[n + 1] - k]; Table[a[n], {n, 2, 60}]

Formula

A078497(n)-prime(n)=prime(n)-a(n)=d. - R. J. Mathar, May 19 2007
Conjecture: Limit_{N->oo} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} prime(n+2)) = 1. - Alain Rocchelli, May 01 2024

Extensions

Edited and extended by R. J. Mathar, Giovanni Teofilatto and Stefan Steinerberger, May 19 2007

A196935 a(n) is the number of arithmetic progressions prime chains in the form of p(n)-6k, p(n), p(n)+6k, while k > 0 and p(n) > 6k.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Oct 07 2011

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 5.
The Mathematica program gives term 5 through 80.

Examples

			n = 5, p(5) = 11; {5, 11, 17} forms a difference 6 Arithmetic Progressions Prime chain. And this is the only occurrence for 11.  So a(5) = 1;
n = 6, p(6) = 13; {7, 13, 19} forms a difference 6 Arithmetic Progressions Prime chain. And this is the only occurrence for 11.  So a(6) = 1;
...
n = 10, p(10) = 29; {17, 29, 41}, {11, 29, 47}, {5, 29, 53} form Arithmetic Progressions Prime chains with difference 12, 18, 24 respectively.  So a(10) = 3;
		

Crossrefs

Programs

  • Mathematica
    Table[ct = 0; p = Prime[i]; j = 0; While[j++; df = 6*j; df < p, If[(PrimeQ[p + df]) && (PrimeQ[p - df]), ct++]]; ct, {i, 5, 80}]
Showing 1-4 of 4 results.