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 11-20 of 900 results. Next

A276826 a(n) is the maximal difference between the corresponding terms of sequences defined in the same way as A159559, but with initial terms A001359(n-1)+2 and A001359(n-1) respectively.

Original entry on oeis.org

4, 14, 6, 6, 6, 12, 6, 8, 14, 14, 18, 36, 24, 65, 18, 6, 10, 6, 84, 14, 162, 10, 54, 84, 179, 10, 23, 12, 18, 18, 24, 128, 18, 24, 28, 10, 10, 72, 34, 23, 12, 18, 6, 6, 12, 34, 8, 644, 12, 12, 6, 29, 24, 12, 18, 28, 28, 24, 22, 22, 10, 14, 12, 12, 16, 6, 58
Offset: 2

Views

Author

Vladimir Shevelev, Sep 19 2016

Keywords

Comments

It seems likely that 6 occurs infinitely often.

Examples

			Since A276703(3)=4 (cf. example there), a(2)=4.
		

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 19 2016

A277118 For a lesser p of twin primes, let B_k be A159559, but with initial term k; then a(n) is the smallest m such that B_(p+2)(m)-B_p(m)>6, where p = A001359(n-1), or a(n) = 0 if there is no such m.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Theorem: a(n) takes only the values 0, 3, 5, 7, 9, 11, 13, 15, and 17.

Crossrefs

Programs

  • PARI
    nextcomposite(n)=if(n<4, return(4)); n=ceil(n); if(isprime(n), n+1, n)
    do(p)=my(a=p,b=p+2,f); for(n=3,17, f=if(isprime(n), nextprime, nextcomposite); a=f(a+1); b=f(b+1); if(b-a > 6, return(n))); 0
    p=2; forprime(q=3,1e3, if(q-p==2, print1(do(p)", ")); p=q) \\ Charles R Greathouse IV, Oct 17 2016

Formula

a(n) = 3 on a subsequence of measure 1. - Charles R Greathouse IV, Oct 17 2016

A356793 Decimal expansion of sum of squares of reciprocals of lesser twin primes, Sum_{j>=1} 1/(A001359(j))^2.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Sep 04 2022

Keywords

Comments

Alternative definition: sum of squares of reciprocals of primes whose distance from the next prime is equal to 2.
Convergence table:
k A001359(k) Sum_{j=1..k} 1/A001359(j)^2
10000000 3285916169 0.165618465394273171950874120818
20000000 7065898967 0.165618465394707600197099741096
30000000 11044807451 0.165618465394836120901019351544
40000000 15151463321 0.165618465394895965582366015390
50000000 19358093939 0.165618465394930089884704869090
60000000 23644223231 0.165618465394951950670948192842
Using the Hardy-Littlewood prediction of the density of twin primes (see A347278), the contribution to the sum after the last entry in the table above can be estimated as 9.056*10^(-14), making the infinite sum ~= 0.16561846539504... . - Hugo Pfoertner, Sep 28 2022

Examples

			0.165618465395...
		

Crossrefs

Extensions

Data extended to ...3, 9, 5 by Hugo Pfoertner, Sep 28 2022

A359637 a(n) is the least odd prime not in A001359 such that all subsequent composites in the gap up to the next prime have at least n prime factors, counted with multiplicity.

Original entry on oeis.org

7, 97, 349, 13309, 33613, 5594749, 84477247, 1524981247, 60924074749
Offset: 2

Views

Author

Hugo Pfoertner, Jan 16 2023

Keywords

Examples

			a(2) = 7: 8 = 2^3, 9 = 3^2, 10 = 2*5 all have at least the minimum number of 2 prime factors;
a(3) = 97: 98 = 2*7^2, 99 = 3^2*11, 100 = 2^2*5^2 have a minimum of 3 prime factors;
a(4) = 349: 350 = 2*5^2*7, 351 = 3^3*13, 352 = 2^5*11 have a minimum of 4 prime factors.
		

Crossrefs

Programs

  • PARI
    a359637(maxp) = {my (k=2, pp=3); forprime (p=5, maxp, my(mi=oo); if (p-pp>2, for (j=pp+1, p-1, my(mo=bigomega(j)); if (mo=k, print1(pp,", "); k++)); pp=p)};
    a359637(10^8)

A073831 Maximum of A073830(k) for k between A001359(n) and A001359(n+1).

Original entry on oeis.org

8, 56, 182, 552, 1406, 2862, 4556, 9506, 10712, 17292, 19460, 30102, 32942, 37442, 49952, 54522, 69432, 77006, 94556, 113906, 167690, 177662, 209306, 259590, 317532, 352242, 376382, 398792, 427062, 636006, 658532, 678152
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2002

Keywords

Comments

a(n) = A073830(A073832(n)); a(n) < A037074(n+2).

Programs

  • Maple
    A073831 := proc(n)
        A073830(A073832(n)) ;
    end proc:
    seq(A073831(n),n=1..50) ; # R. J. Mathar, Feb 21 2017
  • Mathematica
    f[n_] := Mod[4*((n - 1)! + 1) + n, n*(n + 2)];
    pp = Select[Prime[Range[200]], PrimeQ[# + 2] & ];
    a[n_] := Max[f /@ Range[pp[[n]], pp[[n + 1]]]];
    Array[a, Length[pp] - 1] (* Jean-François Alcover, Feb 22 2018 *)

A073832 k between A001359(n) and A001359(n+1) such that A073830(k) is maximal.

Original entry on oeis.org

4, 7, 13, 23, 37, 53, 67, 97, 103, 131, 139, 173, 181, 193, 223, 233, 263, 277, 307, 337, 409, 421, 457, 509, 563, 593, 613, 631, 653, 797, 811, 823, 853, 877, 1013, 1021, 1039, 1051, 1087, 1129, 1223, 1259, 1283, 1297, 1307, 1423, 1447, 1471, 1483, 1601
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2002

Keywords

Comments

A073830(a(n)) = A073831(n).

Programs

  • Maple
    A073832 := proc(n)
        local k,kmx,a ;
        kmx := 0 ;
        a := A001359(n)+1 ;
        for k from A001359(n)+1 to A001359(n+1)-1 do
            if A073830(k) > kmx then
                a := k ;
                kmx := A073830(k) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A073832(n),n=1..50) ; # R. J. Mathar, Feb 21 2017
  • Mathematica
    f[n_] := Mod[4*((n - 1)! + 1) + n, n*(n + 2)];
    pp = Select[Prime[Range[300]], PrimeQ[# + 2] & ];
    a[n_] := MaximalBy[Range[pp[[n]], pp[[n + 1]]], f];
    Array[a, Length[pp] - 1] // Flatten (* Jean-François Alcover, Feb 22 2018 *)
  • Python
    from math import factorial
    from itertools import islice, pairwise
    from sympy import isprime, nextprime, primerange
    def f(n): return (4*(factorial(n-1) + 1) + n)%(n*(n + 2))
    def bgen(): # generator of A001359
        p, q = 2, 3
        while True:
            if q - p == 2: yield p
            p, q = q, nextprime(q)
    def agen(): # generator of terms
        for p, q in pairwise(bgen()):
            yield max((f(k), k) for k in range(p+1, q))[1]
    print(list(islice(agen(), 80))) # Michael S. Branicky, Aug 13 2024

A078864 Smallest primes from A001359, each belonging to those different residue class of mod 210 which are listed in A078859. Arranged according to possible least positive residues mod 210.

Original entry on oeis.org

3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 419, 1427
Offset: 1

Views

Author

Labos Elemer, Dec 13 2002

Keywords

Examples

			Several terms are equal to corresponding ones in A078859, while others are larger like: 1427=210.6+167 where r=167 is in A078859.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := Mod[Prime[x], 210] d[x_] := Prime[x+1]-Prime[x] t=Table[0, {210}]; Do[s=f[n]; If[Equal[d[n], 2]&&s<211&&t[[s]]==0, t[[s]]=Prime[n]], {n, 1, 10000}]; t

A095017 Number of lesser twin primes (A001359) in range ]2^n, 2^(n+1)].

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 7, 7, 12, 26, 45, 70, 113, 215, 355, 666, 1153, 2071, 3785, 6965, 12495, 22643, 41608, 76371, 140944, 261752, 484968, 904799, 1689477, 3160113, 5928904, 11139071, 20970782, 39535081, 74697745, 141342490, 267812262, 508194094, 965623233, 1837147717
Offset: 1

Views

Author

Antti Karttunen and Labos Elemer, Jun 01 2004

Keywords

Comments

Conjecture: a(n) > 0 for all n. This holds for all n <= 100. - Charles R Greathouse IV, May 14 2012
It appears that a(n+1) is approximately 2 * a(n) * (n/(n+1))^2. The 2 accounts for each segment of numbers being twice as large as the previous segment. The first n/(n+1) accounts for primes being less common as numbers increase in size. The second n/(n+1) accounts for twin primes being a less common gap size as numbers increase in size. This formula has increasing accuracy as the numbers increase and is better than 0.1% by the end of the known sequence. - Jerry M Lagrou, Jan 05 2025

Crossrefs

Programs

  • Mathematica
    Table[ps = Prime[Range[PrimePi[2^n] + 1, PrimePi[2^(n+1) + 1]]]; Count[Differences[ps], 2], {n, 25}] (* T. D. Noe, May 08 2012 *)
  • PARI
    a095017(maxex2)={my (L=List([1]), p2=8, n2=0, pp=5); forprime (p=7, 2^maxex2, if (p>p2, p2*=2; listput(L,n2); n2=0); if (p-pp==2, n2++); pp=p); Vec(L)};
    a095017(30) \\ Hugo Pfoertner, Feb 05 2024

Extensions

a(34) and beyond from Jerry M Lagrou, Dec 02 2023

A096474 Difference prime(q+2) - prime(q) as q runs through the lesser members of twin primes (A001359).

Original entry on oeis.org

6, 6, 10, 8, 18, 12, 6, 14, 16, 12, 24, 18, 24, 18, 16, 14, 24, 18, 24, 18, 10, 12, 18, 40, 28, 20, 24, 18, 28, 10, 12, 12, 8, 8, 22, 16, 12, 12, 14, 14, 26, 36, 24, 30, 24, 8, 18, 30, 12, 22, 22, 16, 18, 24, 10, 14, 18, 14, 10, 20, 10, 32, 32, 12, 10, 44, 30, 18, 16, 36, 14, 12
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Examples

			{q, q+2} = {17, 19} is the 4th twin-pair and prime(19) - prime(17) = 67 - 59 = 8, so a(4) = 8.
		

Crossrefs

Programs

  • Mathematica
    {ta=Table[0, {1300}], tb=Table[0, {1300}], tc=Table[0, {1300}], u=1}; Do[s=Prime[n+1]-Prime[n];If[Equal[s, 2], ta[[u]]=Prime[Prime[n+1]]-Prime[Prime[n]];tb[[u]]=n; tc[[u]]=Prime[n];u=u+1], {n, 1, 10000}];ta
    Prime[#[[2]]]-Prime[#[[1]]]&/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&] (* Harvey P. Dale, Dec 26 2023 *)
  • PARI
    lista(nn) = {forprime(q=2, nn, if (isprime(q+2), print1(prime(q+2)-prime(q), ", ")););} \\ Michel Marcus, Jul 27 2017

Formula

a(n) = prime(A006512(n)) - prime(A001359(n)).
a(n) = A057473(n) - A057470(n). - Michel Marcus, Jul 27 2017

A143738 Number of twin primes between n and n^2. Only smaller of twins (terms of A001359) are counted.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 5, 6, 6, 8, 8, 9, 11, 12, 14, 16, 16, 17, 17, 19, 20, 21, 22, 24, 26, 26, 26, 29, 30, 30, 31, 34, 36, 36, 39, 41, 42, 45, 45, 48, 49, 50, 53, 55, 59, 61, 63, 66, 66, 68, 70, 74, 74, 76, 77, 78, 83, 87, 90, 91, 93, 96, 100
Offset: 1

Views

Author

Alen Skugor (askugor(AT)gmail.com), Aug 30 2008

Keywords

Examples

			For n = 6, between 6 and 36 the smaller of twin pairs are {11, 17, 29}, so a(6) = 3.
		

Crossrefs

Programs

  • Magma
    [#[p:p in PrimesInInterval(n,n^2)|IsPrime(p+2)]:n in [1..80]]; // Marius A. Burtea, Dec 20 2019
  • Mathematica
    Table[Count[Table[PrimeQ[j] && PrimeQ[j + 2], {j, n, n*n}], True], {n, 1, 100}]
Previous Showing 11-20 of 900 results. Next