|
|
A176506
|
|
Difference between the prime indices of the two factors of the n-th semiprime.
|
|
34
|
|
|
0, 1, 0, 2, 3, 1, 2, 4, 0, 5, 3, 6, 1, 7, 4, 8, 0, 5, 2, 6, 9, 10, 3, 7, 11, 1, 12, 4, 13, 8, 2, 9, 14, 5, 15, 10, 6, 16, 3, 0, 17, 11, 12, 4, 18, 13, 19, 1, 7, 20, 8, 21, 14, 5, 22, 0, 15, 23, 16, 9, 2, 24, 17, 25, 6, 10, 26, 3, 18, 27, 11, 7, 28, 19, 1, 29, 12, 20, 2, 21, 4, 30, 8, 31, 13, 22
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Are there no adjacent equal terms? I have verified this up to n = 10^6. - Gus Wiseman, Dec 04 2020
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The sequence of semiprimes together with the corresponding differences begins:
4: 1 - 1 = 0
6: 2 - 1 = 1
9: 2 - 2 = 0
10: 3 - 1 = 2
14: 4 - 1 = 3
15: 3 - 2 = 1
21: 4 - 2 = 2
22: 5 - 1 = 4
25: 3 - 3 = 0
26: 6 - 1 = 5
33: 5 - 2 = 3
(End)
|
|
MAPLE
|
isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:
A001358 := proc(n) option remember ; if n = 1 then return 4 ; else for a from procname(n-1)+1 do if isA001358(a) then return a; end if; end do; end if; end proc:
A084126 := proc(n) min(op(numtheory[factorset](A001358(n)))) ; end proc:
A084127 := proc(n) max(op(numtheory[factorset](A001358(n)))) ; end proc:
# Alternative:
N:= 500: # to use the first N semiprimes
Primes:= select(isprime, [2, seq(i, i=3..N/2, 2)]):
SP:= NULL:
for i from 1 to nops(Primes) do
for j from 1 to i do
sp:= Primes[i]*Primes[j];
if sp > N then break fi;
SP:= SP, [sp, i-j]
od od:
SP:= sort([SP], (s, t) -> s[1]<t[1]):
|
|
MATHEMATICA
|
M = 500; (* to use the first M semiprimes *)
primes = Select[Join[{2}, Range[3, M/2, 2]], PrimeQ];
SP = {};
For[i = 1, i <= Length[primes], i++,
For[j = 1, j <= i, j++,
sp = primes[[i]] primes[[j]];
If[sp > M, Break []];
AppendTo[SP, {sp, i - j}]
]];
Table[If[!SquareFreeQ[n], 0, -Subtract@@PrimePi/@First/@FactorInteger[n]], {n, Select[Range[100], PrimeOmega[#]==2&]}] (* Gus Wiseman, Dec 04 2020 *)
|
|
PROG
|
(PARI) lista(nn) = {my(vsp = select(x->(bigomega(x)==2), [1..nn])); vector(#vsp, k, my(f=factor(vsp[k])[, 1]); primepi(vecmax(f)) - primepi(vecmin(f))); } \\ Michel Marcus, Jul 18 2020
|
|
CROSSREFS
|
A087794 is product of the same indices.
A176504 is the sum of the same indices.
A115392 lists positions of first appearances.
A338898 has this sequence as row differences.
A006881 lists squarefree semiprimes.
A024697 is the sum of semiprimes of weight n.
A056239 gives sum of prime indices (Heinz weight).
A087112 groups semiprimes by greater factor.
A338904 groups semiprimes by weight.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|