login
A321787
Irregular triangle read by rows: row n gives the prime factorization of n-th average of twin prime pairs (A014574).
0
2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 3, 2, 1, 1, 0, 0, 0, 0, 1, 2, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 1, 6, 1, 1, 2, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 4, 1, 1, 1, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 1, 2, 1
OFFSET
1,1
EXAMPLE
Consider the first pair of twin primes, 3 and 5. Their average is 4, which is the first term in A014574. When 4 is factored into primes it is 2^2, so the first row in this triangle is 2.
For the next pair of twin primes, 5 and 7, the average is 6, and its prime factorization is 2*3, so the second row is 1,1.
Since all the averages are even, each row begins with a term > 0.
The initial rows are:
2; as (3+5)/2 = 4 = 2^2
1, 1; as (5+7)/2 = 6 = 2^1 * 3^1
2, 1; as (11+13)/2 = 12 = 2^2 * 3^1
1, 2; as (17+19)/2 = 18 = 2^1 * 3^2
1, 1, 1; as (29+31)/2 = 30 = 2^1 * 3^1 * 5^1
1, 1, 0, 1; as (41+43)/2 = 42 = 2^1 * 3^1 * 5^0 * 7^1
...
MATHEMATICA
expo[n_] := Module[{f = FactorInteger[n]}, ps = f[[;; , 1]]; es = f[[;; , 2]]; pm = ps[[-1]]; np = PrimePi[pm]; v = Table[0, {np}]; Do[v[[PrimePi[ps[[k]]]]] = es[[k]], {k, 1, Length[ps]}]; v]; mids = Select[Range[500], PrimeQ[# - 1] && PrimeQ[# + 1] &]; Map[expo, mids] // Flatten (* Amiram Eldar, Dec 22 2018 *)
PROG
(PARI) tabf(nn) = {my(p=2, mp); forprime(q=3, nn, if (q-p==2, mp = vecmax(factor(p+1)[, 1]); forprime(pr=1, mp, print1(valuation(p+1, pr), ", ")); print); p=q; ); } \\ Michel Marcus, Dec 23 2018
CROSSREFS
Cf. A014574.
Sequence in context: A360171 A348528 A307223 * A331596 A023586 A023584
KEYWORD
nonn,tabf
AUTHOR
Nika Sigua, Nov 18 2018
EXTENSIONS
Edited by N. J. A. Sloane, Dec 22 2018
STATUS
approved