|
|
A275512
|
|
The consecutive sizes of the blocks of terms containing at least one digit "1" are given by the sequence itself.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 13, 14, 22, 15, 16, 17, 18, 23, 19, 21, 31, 41, 51, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 71, 81, 91, 100, 101, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The sequence starts with a(1) = 1 and is extended with the smallest integer not yet used that does not lead to a contradiction.
|
|
LINKS
|
|
|
EXAMPLE
|
The blocks of terms including at least a digit "1" are indicated here by parentheses; the successive block-sizes are 1, 2, 3, 4, 5,... which reproduces the sequence itself: (1),2,3,4,5,6,7,8,9,(10,11),20,(12,13,14),22,(15,16,17,18),23,(19,21,31,41,51),24...
|
|
MAPLE
|
isA011531 := proc(n)
nops(convert(convert(n, base, 10), set) intersect {1}) > 0 ;
simplify(%) ;
end proc:
local a;
for a from n+1 do
if isA011531(a) then
return a;
end if;
end do:
end proc:
isA052383 := proc(n)
not isA011531(n) ;
end proc:
local a;
for a from n+1 do
if isA052383(a) then
return a;
end if;
end do:
end proc:
A275512grp1 := proc(a)
local idx1, n ;
idx1 := 0 ;
if isA052383(a) then
return 0;
end if;
for n from 1 do
if n =1 then
idx1 := 1;
idx1 := idx1+1 ;
end if;
end if;
return idx1 ;
end if;
end do:
end proc:
option remember;
local a, aprev, prev1, grp1, d, seen, reqlen, npr;
if n =1 then
1;
else
for a from 2 do
seen := false;
for npr from 1 to n-1 do
if procname(npr) = a then
seen := true;
break;
end if;
end do:
if not seen then
aprev := procname(n-1) ;
if isA052383(aprev) then
return a;
else
prev1 := 0 ;
for d from 1 to n-1 do
if isA011531(procname(n-d)) then
prev1 := prev1+1 ;
else
break;
end if;
end do:
grp1 := A275512grp1(aprev) ;
reqlen := procname(grp1) ;
if reqlen > prev1 then
elif n-prev1-1 > 0 then
return A052383_next(procname(n-prev1-1)) ;
else
return 2 ;
end if;
end if;
end if;
end do;
end if;
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,less
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|