A222532
a(1)=2; for n >= 1, a(n+1) is the least prime p_m such that a(n)=p_m-p_{m-1}+...+(-1)^{m-k}p_k for some 0
2, 5, 7, 13, 17, 23, 31, 37, 43, 53, 59, 67, 73, 83, 89, 101, 109, 113, 131, 149, 157, 163, 173, 179, 197, 223, 257, 263, 269, 277, 283, 311, 347, 389, 401, 421, 431, 487, 503, 523, 557, 569, 577, 601, 613, 641, 661, 709, 733, 739, 773, 823, 827, 857, 883, 929, 947, 953, 977, 983, 997, 1009, 1019, 1031, 1039, 1051, 1097, 1117, 1129, 1151, 1181, 1223, 1229, 1237, 1249, 1279, 1327, 1361, 1373, 1423, 1459, 1481, 1499, 1543, 1559, 1571, 1601, 1621, 1627, 1669, 1693, 1699, 1721, 1733, 1759, 1783, 1823, 1873, 1973, 2011
Offset: 1
Keywords
A163846 Starting from a(1)=5, a(n+1) is the smallest prime > a(n) such that 2*a(n)-a(n+1) is also prime.
5, 7, 11, 17, 23, 29, 41, 53, 59, 71, 83, 107, 113, 137, 167, 197, 227, 257, 263, 269, 281, 293, 317, 353, 359, 401, 419, 449, 467, 491, 503, 557, 593, 599, 641, 683, 719, 761, 821, 881, 941, 953, 977, 983, 1013, 1049, 1151, 1193, 1223, 1229, 1277, 1361, 1433
Offset: 1
Keywords
Comments
This is: select the smallest prime a(n+1) = a(n)+d such that at a(n)-d is another prime at the same distance to but at the opposite side of a(n).
From Zhi-Wei Sun, Feb 25 2013: (Start)
By induction, a(n)==2 (mod 3) for all n>2.
For a prime p>3 define g(p) as the least prime q>p such that 2p-q is also prime. Construct a simple (undirected) graph G as follows: The vertex set is the set of all primes greater than 3, and there is an edge connecting the vertices p and q>p if and only if g(p)=q.
Conjecture: The graph G constructed above consists of exactly two trees: one containing 7 and all odd primes congruent to 2 modulo 3, and another one containing all primes congruent to 1 modulo 3 except 7. (End)
Examples
The first candidate for a(2) is the prime 5+2=7, which is selected since 5-2=3 is also prime. The first candidate for a(3) is the prime 7+4=11, which is selected since 7-4=3 is also prime. The first candidate for a(4) is the prime 11+2=13, which is not selected since 11-2=9 is composite. The second candidate for a(4) is the prime 11+4=17, which is selected since 11-4=7 is prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
Programs
-
Mathematica
DeltaPrimePrevNext[n_]:=Module[{d, k1, k2}, k1=n-1; k2=n+1; While[ !PrimeQ[k1] || !PrimeQ[k2], k2++; k1-- ]; d=k2-n]; lst={}; p=5; Do[If[p-DeltaPrimePrevNext[p]>1, AppendTo[lst, p]; p=p+DeltaPrimePrevNext[p]], {n,6!}]; lst k=3 n=1 Do[If[m==3, Print[n, " ", 5]]; If[m==k, n=n+1; Do[If[PrimeQ[2Prime[m]-Prime[j]]==True, k=j; Print[n, " ", Prime[j]]; Goto[aa]], {j, m+1, PrimePi[2Prime[m]]}]]; Label[aa]; Continue, {m, 3, 1000}] (* Zhi-Wei Sun, Feb 25 2013 *) np[n_]:=Module[{nxt=NextPrime[n]},While[!PrimeQ[2n-nxt],nxt=NextPrime[nxt]]; nxt]; NestList[np, 5, 60] (* Harvey P. Dale, Feb 28 2013 *)
Extensions
Edited by R. J. Mathar, Aug 29 2009
A222566 a(1)=2; for n>0, a(n+1) is the least prime p>a(n) such that 2*(a(n)+1)-p is prime.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 43, 47, 53, 61, 71, 73, 89, 97, 107, 109, 113, 127, 149, 151, 167, 173, 181, 191, 193, 197, 199, 227, 229, 233, 239, 241, 251, 263, 271, 281, 283, 311, 313, 317, 353, 359, 367, 383, 389, 397, 443, 449, 457, 467, 479, 499, 509, 521, 523, 557, 569, 571, 587, 599, 601, 617, 619, 641, 643, 647, 653, 661, 677, 683, 691, 701, 727, 773, 787, 857, 859, 863, 907, 929, 941, 947, 967, 983, 991, 1013, 1019, 1021, 1031, 1033, 1049, 1051, 1091, 1093
Offset: 1
Keywords
Comments
For a prime p define g(p) as the least prime q>p such that 2*(p+1)-q is prime. Construct a simple (undirected) graph G as follows: The vertex set of G is the set of all primes, and for the vertices p and q>p there is an edge connecting p and q if and only if g(p)=q. Clearly G contains no cycle.
Conjecture: The graph G constructed above is connected and hence it is a tree!
Examples
a(2)=3 since 2(2+1)=3+3, and a(3)=5 since 2(3+1)=5+3.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.
Programs
-
Mathematica
k=1 n=1 Do[If[m==1,Print[n," ",2]];If[m==k,n=n+1;Do[If[PrimeQ[2(Prime[m]+1)-Prime[j]]==True,k=j;Print[n," ",Prime[j]];Goto[aa]],{j,m+1,PrimePi[2Prime[m]]}]]; Label[aa];Continue,{m,1,1000}]
A222603 a(1)=1; for n>0, a(n+1) is the least practical number q>a(n) such that 2(a(n)+1)-q is practical.
1, 2, 4, 6, 8, 12, 18, 20, 24, 30, 32, 36, 42, 54, 56, 60, 66, 78, 80, 84, 90, 104, 120, 162, 176, 192, 210, 224, 234, 260, 270, 272, 276, 294, 320, 330, 342, 378, 380, 384, 390, 392, 396, 414, 416, 420, 450, 462, 464, 468, 476, 486, 510, 512, 522, 546, 594, 620, 630, 702, 704, 714, 726, 728, 744, 750, 798, 800, 810, 812, 816, 920, 924, 930, 966, 968, 972, 980, 990, 992, 1014, 1040, 1050, 1088, 1122, 1232, 1242, 1254, 1280, 1290, 1302, 1316, 1332, 1350, 1352, 1380, 1386, 1458, 1518, 1520
Offset: 1
Keywords
Comments
By a result of Melfi, each positive even number can be written as the sum of two practical numbers.
For a practical number p, define h(p) as the least practical number q>p such that 2(p+1)-q is practical. Construct a simple (undirected) graph H as follows: The vertex set of H is the set of all practical numbers, and for two vertices p and q>p there is an edge connecting p and q if and only if h(p)=q. Clearly H contains no cycle.
Conjecture: The graph H constructed above is connected and hence it is a tree.
Examples
a(4)=6 since 2(a(3)+1)=10=6+4 with 4 and 6 both practical, and 6>a(3)=4.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- G. Melfi, On two conjectures about practical numbers, J. Number Theory 56 (1996) 205-210 [MR96i:11106].
Programs
-
Mathematica
f[n_]:=f[n]=FactorInteger[n] Pow[n_,i_]:=Pow[n,i]=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2]) Con[n_]:=Con[n]=Sum[If[Part[Part[f[n],s+1],1]<=DivisorSigma[1,Product[Pow[n,i],{i,1,s}]]+1,0,1],{s,1,Length[f[n]]-1}] pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0) k=1 n=1 Do[If[m==1,Print[n," ",1]];If[m==k,n=n+1;Do[If[pr[2j]==True&&pr[2m+2-2j]==True,k=2j;Print[n," ",2j];Goto[aa]],{j,Ceiling[(m+1)/2],m}]]; Label[aa];Continue,{m,1,1000}]
A198472 a(n)=q(n) if 4 | q(n)-2, and a(n)=q(n)/2 if 4 | q(n), where q(n) is the least practical number q>n with 2(n+1)-q practical.
2, 2, 2, 6, 6, 4, 4, 6, 6, 8, 6, 18, 8, 18, 8, 18, 18, 10, 10, 12, 12, 14, 12, 30, 14, 30, 14, 30, 30, 16, 16, 18, 18, 20, 18, 42, 20, 42, 20, 42, 42, 54, 24, 24, 28, 54, 24, 28, 30, 54, 28, 32, 54, 28, 28, 30, 30, 32, 30, 66, 32, 66, 32, 66, 66, 78, 36, 36, 40, 78, 36, 40, 42, 78, 40, 44, 78, 40, 40, 42, 42, 44, 42, 90, 44, 90, 44, 90, 90, 52, 48, 48, 50, 50, 48, 52, 50, 54, 50, 56
Offset: 1
Keywords
Comments
Conjecture: If b(1)>=4 is an integer and b(k+1)=a(b(k)) for k=1,2,3,..., then b(n)=4 for some n>0.
This conjecture has the same flavor as the Collatz conjecture.
Examples
a(20)=12 since 2(20+1)=24+18 with 24 and 18 both practical.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- G. Melfi, On two conjectures about practical numbers, J. Number Theory 56 (1996) 205-210 [MR96i:11106].
Programs
-
Mathematica
f[n_]:=f[n]=FactorInteger[n] Pow[n_,i_]:=Pow[n,i]=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2]) Con[n_]:=Con[n]=Sum[If[Part[Part[f[n],s+1],1]<=DivisorSigma[1,Product[Pow[n,i],{i,1,s}]]+1,0,1],{s,1,Length[f[n]]-1}] pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0) Do[Do[If[pr[2k]==True&&pr[2n+2-2k]==True,Print[n," ",2k/(1+Mod[k-1,2])];Goto[aa]],{k,Ceiling[(n+1)/2],n}]; Label[aa];Continue,{n,1,100}]
-
PARI
A198472(n) = forstep(q=n+++bittest(n,0),9e9,2, is_A005153(q) && is_A005153(2*n-q) && return(if(q%4,q,q\2))) \\ M. F. Hasler, Feb 27 2013
Comments
Examples
Links
Crossrefs
Programs
Mathematica