%I #13 Jul 13 2020 21:31:52
%S 1,2,3,4,5,9,8,6,11,27,16,7,13,33,81,32,10,15,37,99,243,64,12,18,39,
%T 107,297,729,128,14,19,43,109,321,891,2187,256,17,21,45,111,327,963,
%U 2673,6561,512,20,22,53,117,333,981,2889,8019,19683,1024,24,23,54,121,351,999,2943,8667,24057,59049,2048,28,25,55,129,363,1053,2997,8829,26001,72171,177147
%N Square array where row n lists all numbers k for which A335885(k) = n, read by falling antidiagonals.
%C Array is read by descending antidiagonals with (n,k) = (0,0), (0,1), (1,0), (0,2), (1,1), (2,0), ... where A(n,k) is the (k+1)-th solution x to A335885(x) = n. The row indexing (n) starts from 0, and column indexing (k) also from 0.
%C For any odd prime p that appears on row n, either p-1 or p+1 appears on row n-1.
%C The e-th powers of the terms on row n form a subset of terms on row (e*n). More generally, a product of terms that occur on rows i_1, i_2, ..., i_k can be found at row (i_1 + i_2 + ... + i_k), because A335885 is completely additive.
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e The top left corner of the array:
%e n\k | 0 1 2 3 4 5 6 7 8 9
%e ----+--------------------------------------------------------------------------
%e 0 | 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ...
%e 1 | 3, 5, 6, 7, 10, 12, 14, 17, 20, 24, ...
%e 2 | 9, 11, 13, 15, 18, 19, 21, 22, 23, 25, ...
%e 3 | 27, 33, 37, 39, 43, 45, 53, 54, 55, 57, ...
%e 4 | 81, 99, 107, 109, 111, 117, 121, 129, 131, 135, ...
%e 5 | 243, 297, 321, 327, 333, 351, 363, 387, 393, 405, ...
%e 6 | 729, 891, 963, 981, 999, 1053, 1089, 1161, 1177, 1179, ...
%e 7 | 2187, 2673, 2889, 2943, 2997, 3159, 3267, 3483, 3531, 3537, ...
%e 8 | 6561, 8019, 8667, 8829, 8991, 9477, 9801, 10449, 10593, 10611, ...
%e 9 | 19683, 24057, 26001, 26487, 26973, 28431, 29403, 31347, 31779, 31833, ...
%o (PARI)
%o up_to = 78-1; \\ = binomial(12+1,2)-1.
%o memoA335885 = Map();
%o A335885(n) = if(1==n,0,my(v=0); if(mapisdefined(memoA335885,n,&v), v, my(f=factor(n)); v = sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+min(A335885(f[k,1]-1),A335885(f[k,1]+1))))); mapput(memoA335885,n,v); (v)));
%o memoA335910sq = Map();
%o A335910sq(n, k) = { my(v=0); if((0==k), v = -1, if(!mapisdefined(memoA335910sq,[n,k-1],&v), v = A335910sq(n, k-1))); for(i=1+v,oo,if(A335885(1+i)==n,mapput(memoA335910sq,[n,k],i); return(1+i))); };
%o A335910list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0,oo, for(col=0,a, i++; if(i > #v, return(v)); v[i] = A335910sq(col,(a-(col))))); (v); };
%o v335910 = A335910list(up_to);
%o A335910(n) = v335910[1+n];
%o for(n=0,up_to,print1(A335910(n),", "));
%Y Cf. A335885.
%Y Cf. A000079, A335911, A335912 (rows 0-2), A000244 (is very like the leftmost column).
%Y Cf. also arrays A334100, A335430.
%K nonn,tabl
%O 0,2
%A _Antti Karttunen_, Jul 01 2020