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 41-50 of 901 results. Next

A308344 a(n) = (A001359(n+1)^2 - 1)/24, where A001359 = lesser of twin primes; or: pentagonal numbers (A000326) whose indices are twin ranks (A002822).

Original entry on oeis.org

1, 5, 12, 35, 70, 145, 210, 425, 477, 782, 925, 1335, 1520, 1617, 2147, 2380, 3015, 3290, 4030, 5017, 7315, 7740, 8855, 11310, 13490, 14950, 15862, 17120, 18095, 27270, 28085, 28497, 30602, 32340, 43265, 44290, 45850, 46905, 49595, 55200, 62935, 67947, 69230, 70525
Offset: 1

Views

Author

M. F. Hasler and A. Dinculescu, Jul 04 2019

Keywords

Comments

Subsequence of A024702 which considers all primes rather than only twins.
This sequence seems to play an important role in studying the twin prime conjecture; see also A057767, A273257, and related.
Dinculescu calls the numbers M(j) = (prime(j)^2 - 1)/6 "basic numbers", and [M(j), M(j+1)] a "twin interval" when j is the index of a twin prime. He notes that the length of such an interval equals four times the corresponding twin rank k(j) = (prime(j) + prime(j+1))/6, see near eq.(3.3) in the 2018 paper.

Examples

			Sequence A001359 = {3, 5, 11, 17, 29, ...} lists the lesser members of pairs of twin primes, (3, 5), (5, 7), (11, 13), (17, 19), ...
We ignore the first and start with the second pair, (5, 7). We have (5^2 - 1)/24 = 1 = a(1).
Next comes the pair (11, 13), whence (11^2 - 1)/24 = 120/24 = 5 = a(2), etc.
		

Crossrefs

Programs

  • Mathematica
    (#^2-1)/24&/@Rest[Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]] == 2&][[All,1]]] (* Harvey P. Dale, Sep 05 2020 *)
  • PARI
    a(n)=A000326(A002822(n))
    
  • PARI
    a(n)=(A001359(n+1)^2-1)/24 \\ or implemented as follows:
    p=0;forprime(q=5,oo,p+2==q&&print1(p^2\24",");p=q)

Formula

a(n) = (A001359(n+1)^2 - 1)/24 = A000326(A002822(n)).

A339625 a(n) is the number of ways to write 6*n = p + q with p a lesser twin prime (A001359) and q a greater twin prime (A006512).

Original entry on oeis.org

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

Views

Author

J. M. Bergot and Robert Israel, Dec 10 2020

Keywords

Comments

If 6*n = p + q, then also 6*n = (p+2) + (q-2), with p+2 a greater and q-2 a lesser twin prime. Thus a(n) is odd if and only if n/2 is in A002822.

Examples

			a(4)=3 because 6*4 = 24 = 5 + 19 = 11 + 13 = 17 + 7 where (5,7), (11,13) and (17,19) are twin prime pairs.
		

Crossrefs

a(n)=0 for n in A243956.

Programs

  • Maple
    N:= 600: # for a(1)..a(floor(N/6)))
    P:= select(isprime, {seq(i,i=3..N,2)}):
    T1:= sort(convert(P intersect map(`-`,P,2),list)):
    T2:= map(`+`,T1,2):
    V:= Vector(N):
    nT:= nops(T1):
    for i from 1 to nT do
      for j from 1 to nT do
        v:= T1[i]+T2[j];
        if v > N then break fi;
        V[v]:= V[v]+1;
    od od:
    seq(V[6*i],i=1..N/6);

A339630 a(n) is the first number k such that there are exactly n ways to write 6*k = p + q with p a lesser twin prime (A001359) and q a greater twin prime (A006512), or 0 if there is no such k.

Original entry on oeis.org

1, 2, 3, 4, 8, 20, 19, 80, 40, 90, 48, 270, 35, 50, 117, 140, 110, 644, 215, 714, 222, 430, 345, 350, 315, 850, 390, 930, 620, 1110, 602, 1040, 385, 2290, 590, 780, 798, 910, 735, 990, 1020, 1700, 700, 770, 595, 1760, 950, 3380, 875, 5660, 1330, 1120, 975, 5970, 1085, 2990, 1400, 3980, 1815, 4570
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Dec 10 2020

Keywords

Comments

If n is odd, a(n)/2 (if nonzero) is in A002822.

Examples

			a(4) = 8 because 6*8 = 48 can be written as p+q in exactly 4 ways: 48 = 5 + 43 = 17 + 31 = 29 + 19 = 41 + 7, and no smaller number has this property.
		

Crossrefs

Programs

  • Maple
    # given list A339625
    T:= Array(0..max(A339625)):
    for n from 1 to nops(A339625) do
      if T[A339625[n]] = 0 then T[A339625[n]]:= n fi
    od:
    for k from 1 while T[k] <> 0 do od:
    seq(T[i],i=0..k-1);

Formula

A339625(a(n)) = n if a(n) > 0.

A357934 Products of two distinct lesser twin primes A001359.

Original entry on oeis.org

15, 33, 51, 55, 85, 87, 123, 145, 177, 187, 205, 213, 295, 303, 319, 321, 355, 411, 447, 451, 493, 505, 535, 537, 573, 591, 649, 681, 685, 697, 717, 745, 781, 807, 843, 895, 933, 955, 985, 1003, 1041, 1111, 1135, 1177, 1189, 1195, 1207, 1257, 1293, 1345, 1383, 1405, 1507, 1555, 1563
Offset: 1

Views

Author

Artur Jasinski, Oct 21 2022

Keywords

Crossrefs

Cf. A001359. Subsequence of A006881.

Programs

  • Maple
    omega := proc(n)
        nops(numtheory[factorset](n)) ;
    end proc:
    isA357934 := proc(n)
        local pe,p,q;
        if numtheory[bigomega](n)= 2 and omega(n) =2 then
            pe := ifactors(n)[2] ;
            p := op(1,op(1,pe)) ;
            q := op(1,op(2,pe)) ;
            if isprime(p+2) and isprime(q+2) then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for n from 10 to 2000 do
        if isA357934(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 13 2025
  • Mathematica
    d = {};less = Select[Range[1607], PrimeQ[#] && PrimeQ[# + 2] &];Do[Do[AppendTo[d, less[[m]] less[[n]]], {m, n + 1, Length[less]}], {n,
      1, Length[less] - 1}]; Take[Sort[d], 55]
  • PARI
    list(lim)=my(v=List(),p=5); forprime(q=7,lim\3+2, if(q-p==2, my(r=3); forprime(s=5,min(lim\p+2,p), if(s-r==2, listput(v, p*r)); r=s)); p=q); Set(v) \\ Charles R Greathouse IV, Oct 21 2022

A359639 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 odd prime factors, counted with multiplicity.

Original entry on oeis.org

97, 1999, 101527, 6666547, 272572999, 3819770107, 410274361249
Offset: 2

Views

Author

Hugo Pfoertner, Jan 16 2023

Keywords

Examples

			a(2) = 97: 98 = 2*7^2, 99 = 3^2*11, 100 = 2^2*5^2 have 2 or 3 odd prime factors, so the minimum 2 is achieved.
a(3) = 1999: 2000 has the 3 odd prime factors 5^3, 2001 = 3*23*29, 2002 = 2*7*11*13.
		

Crossrefs

Programs

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

A079328 Let f(n)=A001359(n) be the smaller member of the n-th pair of twin primes. Then a(n) is the average of f(n) and f(n+1).

Original entry on oeis.org

4, 8, 14, 23, 35, 50, 65, 86, 104, 122, 143, 164, 185, 194, 212, 233, 254, 275, 296, 329, 383, 425, 446, 491, 545, 584, 608, 629, 650, 734, 815, 824, 842, 869, 950, 1025, 1040, 1055, 1076, 1121, 1190, 1253, 1283, 1295, 1310, 1373, 1439, 1466, 1484, 1547, 1613
Offset: 1

Views

Author

Vincenzo Origlio (vincenzo.origlio(AT)itc.cnr.it), Feb 13 2003

Keywords

Comments

Average of two consecutive lesser of twin primes. - Juri-Stepan Gerasimov, Aug 26 2011.

Crossrefs

Programs

  • Mathematica
    s=Select[Range[2000], PrimeQ[ # ]&&PrimeQ[ #+2]&]; (Drop[s, 1]+Drop[s, -1])/2

Extensions

Edited by Dean Hickerson, Feb 14 2003

A097973 Least m>p such that p|m, p+1|m+1 and p+2|m+2, for twin prime pairs (p, p+2), p in A001359.

Original entry on oeis.org

63, 215, 1727, 5831, 26999, 74087, 215999, 373247, 1061207, 1259711, 2628071, 3374999, 5831999, 7077887, 7762391, 11852351, 13823999, 19682999, 22425767, 30371327, 42144191, 74087999, 80621567, 98611127, 142236647, 185192999
Offset: 1

Views

Author

Lekraj Beedassy, Sep 07 2004

Keywords

Examples

			The triple {a(6), a(6)+1, a(6)+2}, for instance, i.e., (74087=41*1807, 74088=42*1764, 74089=43*1723) is the smallest one whose elements are respectively divisible by those of (41, 42, 43), (41, 43) being the 6th twin prime pair.
		

Programs

  • Maple
    map(t -> (t+1)^3-1, select(t -> isprime(t) and isprime(t+2), [3,seq(i,i=5..10^4,6)])); # Robert Israel, May 16 2018

Formula

a(n) = p*(p+1)*(p+2) + p = (p+1)^3 - 1 (p=A001359, p+1=A014574).

A174046 Places n for which A001359(n) and A023200(n) is a twin prime pair.

Original entry on oeis.org

2, 3, 4, 6, 14, 16, 29, 356, 358, 359, 403, 446, 464, 485, 652, 655, 764, 861, 866, 1123, 1301, 1304, 1324, 1328, 1358, 1486, 1610, 2631, 2632, 3735, 3931, 3953, 3956, 3957, 4679, 4855, 4931, 5222, 5226, 5269, 5283, 5292, 5403, 5427, 5445
Offset: 1

Views

Author

Vladimir Shevelev, Mar 06 2010

Keywords

Examples

			2 is in the sequence because A001359(2)=5 and A023200(2)=7 are twin primes.
		

Crossrefs

Programs

  • PARI
    lista(nn)  = {vp = primes(nn); va = select(x->isprime(x+2), vp); vb = select(x->isprime(x+4), vp); for (n=1, min(#va, #vb), if (vb[n] == va[n]+2, print1(n, ", ")););} \\ Michel Marcus, Jul 22 2017

Extensions

Terms beyond 29 from R. J. Mathar, Nov 03 2011
Edited by Michel Marcus, Jul 22 2017

A229500 Smaller of Fermi-Dirac twin primes (A229064) which are not the smaller of twin primes (A001359).

Original entry on oeis.org

7, 9, 23, 47, 79, 81, 167, 359, 839, 1367, 1847, 2207, 2399, 3719, 5039, 6561, 7919, 10607, 11447, 14639, 16127, 17159, 19319, 28559, 29927, 36479, 44519, 49727, 54287, 57119, 66047, 85847, 97967, 113567, 128879, 177239, 196247, 201599, 218087, 241079, 273527
Offset: 1

Views

Author

Vladimir Shevelev, Sep 25 2013

Keywords

Comments

The sequence conjecturally infinite. All squares of the sequence are 9, 81, 6561,... and have the form 3^(2^k), k>=1. However, we conjecture that there is only a finite number of them, or, the same, there is only a finite number of primes of the form 3^(2^k) + 2.

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 25 2013

A270541 a(n) = A001359(n) - A001359(n+1) - A001359(n+2) + A001359(n+3).

Original entry on oeis.org

4, 6, 6, 6, 0, 12, -6, 0, 6, 0, 0, -24, 18, 6, 0, 0, 0, 24, 42, -24, -42, 48, 18, -30, -30, -6, 0, 126, -6, -144, 18, 18, 108, -12, -120, 0, 12, 48, 48, -12, -66, -36, 6, 96, 6, -78, -18, 90, 6, -72, 18, -24, 36, 60, -60, -30, 12, -6, 12, 6, -24, -30, 12, -12, 78, 18, -54, 0, 0, 138, 0, -102, -12, -42
Offset: 1

Views

Author

Altug Alkan, Mar 18 2016

Keywords

Comments

6*k appears for the form of a(n) for n > 1.
What is the most repeated value of a(n)?
See A270535 for the position of 0's in this sequence.

Examples

			a(1) = 4 because a(1) = A001359(1) - A001359(2) - A001359(3) + A001359(4) = 3 - 5 - 11 + 17 = 4.
		

Crossrefs

Programs

  • Mathematica
    s = Select[Prime@Range[10^6], PrimeQ[# + 2] &]; Table[s[[n]] - s[[n + 1]] - s[[n + 2]] + s[[n + 3]], {n, 74}] (* Michael De Vlieger, Mar 19 2016, after Robert G. Wilson v at A001359 *)
    #[[1]]-#[[2]]-#[[3]]+#[[4]]&/@Partition[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]]==2&][[;;,1]],4,1] (* Harvey P. Dale, Jun 14 2025 *)
  • PARI
    t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
    a(n) = t(n) + t(n+3) - t(n+1) - t(n+2);
    for(n=1, 200, print1(a(n), ", "));

Formula

a(n) = A053319(n+2) - A053319(n).
Previous Showing 41-50 of 901 results. Next