A064364 Positive integers sorted by A001414(n), the sum of their prime divisors, as the major key and n as the minor key.
1, 2, 3, 4, 5, 6, 8, 9, 7, 10, 12, 15, 16, 18, 14, 20, 24, 27, 21, 25, 30, 32, 36, 11, 28, 40, 45, 48, 54, 35, 42, 50, 60, 64, 72, 81, 13, 22, 56, 63, 75, 80, 90, 96, 108, 33, 49, 70, 84, 100, 120, 128, 135, 144, 162, 26, 44, 105, 112, 125, 126, 150, 160, 180, 192, 216, 243
Offset: 1
Examples
The triangle reads: 1, (0,) (see comment in link to "first 16 rows" by W. Lang) 2, 3, 4, 5, 6, 8, 9, 7, 10, 12, 15, 16, 18, 14, 20, 24, 27, 21, 25, 30, 32, 36, 11, 28, 40, 45, 48, 54, 35, 42, 50, 60, 64, 72, 81, 13, 22, 56, 63, 75, 80, 90, 96, 108, ...
Links
- Alois P. Heinz, Rows n = 1..60, flattened (first 32 rows from Reinhard Zumkeller)
- H. Havermann: The first 100 sums (complete, a 6 MB file)
- H. Havermann: Tables of sum-of-prime-factors sequences (overview with links to the first 50000 sums)
- Wolfdieter Lang, First 16 rows.
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
Haskell
import Data.List (partition, union) a064364 n k = a064364_tabf !! (n-1) !! (k-1) a064364_row n = a064364_tabf !! (n-1) a064364_tabf = [1] : tail (f 1 [] 1 (map a000792 [2..])) where f k pqs v (w:ws) = (map snd pqs') : f (k + 1) (union pqs'' (zip (map a001414 us) us )) w ws where us = [v + 1 .. w] (pqs', pqs'') = partition ((== k) . fst) pqs a064364_list = concat a064364_tabf -- Reinhard Zumkeller, Jun 11 2015
-
Mathematica
terms = 1000; nmax0 = 100000 (* a rough estimate of max sopfr *); sopfr[n_] := sopfr[n] = Total[Times @@@ FactorInteger[n]]; f[n1_, n2_] := Which[t1 = sopfr[n1]; t2 = sopfr[n2]; t1 < t2, True, t1 == t2, n1 <= n2, True, False]; Clear[g]; g[nmax_] := g[nmax] = Sort[Range[nmax], f][[1 ;; terms]]; g[nmax = nmax0]; g[nmax += nmax0]; While[g[nmax] != g[nmax - nmax0], Print[nmax]; nmax += nmax0]; A064364 = g[nmax] (* Jean-François Alcover, Mar 13 2019 *)
-
PARI
lista(nn) = {nmax = A000792(nn); v = vector(nmax, k, A001414(k)); for (n=1, nn, vn = select(x->x==n, v, 1); for (k = 1, #vn, print1(vn[k], ", ")))} \\ Michel Marcus, May 01 2018
-
PARI
A064364_vec(N, k=6, L=9)={vector(N, i, if(i<7, N=i, until(A001414(N+=1)==k, ); N
A056240(k)-1))} \\ To compute terms up to a given value of k=sopfr(n) and/or for large N >> 1000, it is more efficient to use code similar to lista() above, with "for(k...)" replaced by "a=concat(a, vn)". - M. F. Hasler, Jan 19 2019
Formula
If a(n) = A056240(k) for some k then a(n+A000607(k)-1) = A000792(k). - David James Sycamore, May 11 2018
Extensions
More terms from Vladeta Jovovic, Sep 27 2005
Comments