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 31-34 of 34 results.

A378620 Lesser prime index of twin primes with nonsquarefree mean.

Original entry on oeis.org

2, 5, 7, 17, 20, 28, 35, 41, 43, 45, 49, 52, 57, 64, 69, 81, 83, 98, 109, 120, 140, 144, 152, 171, 173, 176, 178, 182, 190, 206, 215, 225, 230, 236, 253, 256, 262, 277, 286, 294, 296, 302, 307, 315, 318, 323, 336, 346, 373, 377, 390, 395, 405, 428, 430, 444
Offset: 1

Views

Author

Gus Wiseman, Dec 10 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
This is a subset of A029707 (twin prime indices). The other twin primes are A068361, so A029707 is the disjoint union of A068361 and A378620.

Crossrefs

The lesser of twin primes is A001359, index A029707 (complement A049579).
The greater of twin primes is A006512, index A107770 (complement appears to be A168543).
A subset of A029707 (twin prime lesser indices).
Prime indices of the primes listed by A061368.
Indices of twin primes with squarefree mean are A068361.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 finds the first position of a prime gap of 2n.
A046933 counts composite numbers between primes.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],Prime[#]+2==Prime[#+1]&&!SquareFreeQ[Prime[#]+1]&]
    PrimePi/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&&!SquareFreeQ[Mean[#]]&][[;;,1]] (* Harvey P. Dale, Jul 13 2025 *)

Formula

prime(a(n)) = A061368(n).

A062303 Number of ways writing the n-th prime as a sum of two nonprimes.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 6, 7, 8, 9, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 26, 27, 27, 33, 34, 36, 37, 40, 41, 42, 44, 45, 47, 49, 50, 53, 54, 54, 55, 59, 64, 65, 66, 66, 68, 69, 72, 74, 76, 78, 79, 80, 81, 82, 85, 91, 92, 93, 93, 99, 101, 105, 106, 106, 108
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			n=10,p(10)=29 has 14 partitions of form a+b=29; 1+28=4+25=8+21=9+20=14+15 are the 5 relevant partitions, so a(10)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[c = 0; Do[If[i + j == Prime[n] && ! PrimeQ[i] && ! PrimeQ[j], c = c + 1], {i, Prime[n] - 1}, {j, i}]; c, {n, 72}] (* Jayanta Basu, Apr 22 2013 *)
    cnpQ[{a_,b_}]:=(!PrimeQ[a]&&CompositeQ[b])||(!PrimeQ[b]&&CompositeQ[a]); Join[{1},Table[Length[Select[IntegerPartitions[Prime[n],{2}],cnpQ]],{n,2,80}]] (* Harvey P. Dale, Sep 30 2018 *)

Formula

A062610(A000040(n)) = number of [nonprime+composite] partitions of p(n).

Extensions

Offset and name corrected by Sean A. Irvine, Mar 25 2023

A083264 Numbers k such that the difference d of the largest and smallest prime factors of k is a composite divisor of k.

Original entry on oeis.org

198, 396, 510, 594, 792, 966, 990, 1020, 1188, 1386, 1530, 1566, 1584, 1782, 1932, 1980, 2040, 2178, 2376, 2550, 2590, 2772, 2898, 2970, 3060, 3132, 3168, 3198, 3564, 3570, 3864, 3960, 4080, 4158, 4230, 4356, 4590, 4698, 4752, 4830, 4950, 5100, 5180
Offset: 1

Views

Author

Labos Elemer, May 12 2003

Keywords

Comments

From David A. Corneth, Jul 14 2018: (Start)
No term k is a perfect power (or 1). If k is a perfect power then it's divisible by 0, a contradiction. Hence a term k has at least two prime factors.
All terms are even. Suppose a term k is odd. Then the smallest prime factor is > 2. Since k has at least two prime factors which are odd, the difference between the largest and smallest prime factor is even hence k is even. A contradiction, hence all terms are even.
All terms are of the form 2 * (p - 2) * p * m where p - 2 is composite, p is prime and m has all, if any, of its prime factors between 2 and p (inclusive). (End)

Examples

			198 = 2*3*3*11 = 2*9*11 is in the sequence where d = 11 - 2 = 9 is composite.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; lf[x_] := Length[FactorInteger[x]]; ma[x_] := Max[ba[x]]; mi[x_] := Min[ba[x]] Do[s=ma[ba[n]]-mi[ba[n]]; If[Mod[n, s]==0&&Greater[s, 2]&&!PrimeQ[s], Print[n]], {n, 1, 20000}]
    dllpfQ[n_]:=Module[{c=Transpose[FactorInteger[n]][[1]],d},d=Last[c]-First[ c];If[d==0,d=1];Divisible[n,d]&&d>2&&CompositeQ[d]]; Select[ Range[ 6000],dllpfQ] (* Harvey P. Dale, Sep 26 2014 *)
  • PARI
    isok(n) = if (n>1, my(f=factor(n)[,1], d = vecmax(f) - vecmin(f)); (d > 1) && !isprime(d) && !(n % d)); \\ Michel Marcus, Jul 09 2018

Formula

Solutions to x mod d = 0 where d = A006530(x) - A020639(x) is composite.

Extensions

Name, Formula, and Example simplified by Jon E. Schoenfield, Jul 14 2018

A201828 The smallest A(m) such that the interval (A(m)*n, A(m+1)*n) contains exactly one element of A, where A is the sequence of primes p for which p-2 is not prime.

Original entry on oeis.org

37, 37, 2, 2, 2, 2, 907, 2, 2833, 907, 2, 8269, 2749, 2953, 5413, 7699, 2137, 27103, 28513, 74377, 45673, 56629, 79147, 33529, 15259, 96847, 101599, 57649, 44983, 300973, 706309, 715357, 351847, 38557, 308809, 720607, 901447, 2229889, 867253, 2370937, 1276867
Offset: 2

Views

Author

Keywords

Comments

This sequence is the "A-analog" of A195871.
This is a possible model sequence to understand the role of twin primes in sequences like A195871. In particular, if after a large number N_tw, there are no twin primes, what primes will take their place in A195871? Our observations and expectations are expressed in the following conjecture.
Conjecture: For n>=13, every a(n) is the lesser of a pair of cousin primes p and p+4, cf. A023200. Note that it is only conjectured that there are infinitely many pairs of cousin primes.
The limit of a(n) as n goes to infinity is infinity.

Examples

			Let n=2. We have the following intervals of the form (2*p,2*q), where p,q are consecutive primes in A025584:(4,6),(6,22),(22,34),(34,46),(46,58),(58,74),(74,82),..., containing 0,2,2,2,2,3,1,... primes from A025584. The interval (74,82) is the first to contain exactly one prime from A025584, so a(2)=74/2=37.
		

Crossrefs

Programs

  • Mathematica
    myPrime=Select[#,!PrimeQ[#-2]&]&[Prime[Range[500000]]];  binarySearch[lst_,find_]:=Module[{lo=1,up=Length[lst],v},(While[lo<=up,v=Floor[(lo+up)/2];If[lst[[v]]-find==0,Return[v]];If[lst[[v]]0&]]]+offset-1]];   z=1;(*example for "contains exactly ONE myPrime in the interval"*)Table[myPrime[[NestWhile[#1+1&,1,!((nextMyPrime[n myPrime[[#1]],z]n myPrime[[#1+1]]))&]]],{n,2,30}]
  • PARI
    npr(n) = {local(p); p=n+1; while(!isprime(p) || isprime(p-2), p=p+1); p}
    cnt(a,b) = {local(r); r=0; for(p=a, b, if(isprime(p) && !isprime(p-2), r=r+1)); r}
    a201828(n) = {local(a,b); a=2; b=3; while(cnt(a*n, b*n) != 1, a=b; b=npr(b)); a} \\ Michael B. Porter, Feb 18 2013
Previous Showing 31-34 of 34 results.