A263329 Fixed points of permutations A263327 and A263328.
0, 1, 2, 17, 18, 84, 939, 1005, 1006, 1021, 1022, 1023
Offset: 1
Programs
-
Haskell
a263329 n = a263329_list !! (n-1) a263329_list = [x | x <- [0..1023], a263327 x == x]
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a263329 n = a263329_list !! (n-1) a263329_list = [x | x <- [0..1023], a263327 x == x]
import Data.Set (fromList, minView, insert) a009995 n = a009995_list !! n a009995_list = 0 : f (fromList [1..9]) where f s = case minView s of Nothing -> [] Just (m,s') -> m : f (foldl (flip insert) s' $ map (10*m +) [0..m `mod` 10 - 1]) -- Reinhard Zumkeller, Aug 10 2011
Sort@ Flatten@ Table[FromDigits /@ Subsets[ Range[9, 0, -1], {n}], {n, 10}] (* Zak Seidov, May 10 2006 *)
is(n)=fromdigits(vecsort(digits(n),,12))==n \\ Charles R Greathouse IV, Apr 16 2015
a263327 0 = 0 a263327 n = head [x | x <- [1..1023], a262557 x == a009995' n]
SortBy[Range[0, 1023], DigitCount[#, 2, 1] &] (* Paolo Xausa, Mar 31 2025 *)
A263327=vecsort(A262557,,1) \\ Does not include a(0)=0. - M. F. Hasler, Dec 11 2019
a262557 n = a262557_list !! (n-1) a262557_list = 0 : f [[0]] where f xss = if x < 9 then (map (read . concatMap show) zss) ++ f zss else [] where zss = (map (z :) $ map tail xss) ++ (map (z :) xss) z = x + 1; x = head $ head xss -- Reinhard Zumkeller, Oct 14 2015
A262557[n_] := FromDigits[BitLength[n] - Flatten[Position[IntegerDigits[n, 2], 1]]]; Array[A262557, 100] (* or *) A262557full = Rest[Map[FromDigits, LexicographicSort[Subsets[Range[9, 0, -1]]]]] (* Paolo Xausa, Feb 13 2024 *)
is_A262557 = is_A009995 apply( A262557(n)=fromdigits(Vecrev(vecextract([0..exponent(n+!n)],n))), [1..99]) # A262557=concat(apply(x(i)=concat(vector(i%10+1,j,if(j>1,x(i*10+j-2),i))),[0..9])) \\ M. F. Hasler, Dec 11 2019
from itertools import combinations afull = list(map(int, sorted("".join(c) for i in range(1, 11) for c in combinations("9876543210", i)))) # Michael S. Branicky, Feb 13 2024
n | Cycles: A263355(n, k=1..A263383(n)) | A263383(n) ---+--------------------------------------------------------+----------- 1 | (0) | 1 2 | (1) | 1 3 | (2) | 1 4 | (16, 12, 5) | 3 5 | (17) | 1 6 | (18) | 1 7 | (84) | 1 8 | (192, 75, 68, 65, 64, 56, 38, 28, 26, 7) | 10 9 | (939) | 1 10 | (978, 908, 881, 853, 852, 840, ..., 142, 115, 45) | 74 11 | (1005) | 1 12 | (1006) | 1 13 | (1016, 997, 995, 985, 967, 959, 958, 955, 948, 831) | 10 14 | (1018, 1011, 1007) | 3 15 | (1020, 1019, 1017, 1015, 1014, ..., 10, 9, 8, 6, 4, 3) | 912 16 | (1021) | 1 17 | (1022) | 1 18 | (1023) | 1 A263327(5) = 16, A263327(16) = 12, A263327(12) = 5, so (5 16 12) = (16 12 5) is a 3-cycle. For all other cycles of length > 1, the order in which the terms occur under the map (e.g. 1018 -> 1007 -> 1011 -> 1018 for row 14) is different from the decreasing order given above. - _M. F. Hasler_, Dec 11 2019
import Data.List ((\\), sort) a263355 n k = a263355_tabf !! (n-1) !! (k-1) a263355_row n = a263355_tabf !! (n-1) a263355_tabf = sort $ cc a263327_list where cc [] = [] cc (x:xs) = (reverse $ sort ys) : cc (xs \\ ys) where ys = x : c x c z = if y /= x then y : c y else [] where y = a263327 z
{M=0; (C(x,L=[x])=until(x==L[1], M+=1<A263327[x]));L); vecsort(vector(18,i,vecsort(C(valuation(M+1,2)),,12)))} \\ append [^15] to remove the long row 15. - M. F. Hasler, Dec 11 2019
Comments