OFFSET
1,2
COMMENTS
The almost-natural numbers, A007376, are formed by writing n in base 10 and juxtaposing digits. It is trivially obvious that n = A007376(n) for 1 to 9 and that A007376(10) = 1 and A007376(11) = 0. When n = 63, A007376(63) = 6 and A007376(64) = 3. 63 is therefore the first nontrivial entry in the list.
a(24) > 10^12. - Giovanni Resta, Jun 10 2015
Had A007376 started with 0 instead of 1, this sequence would have been 702, 612052, 1222222, 20987654322, ... - Giovanni Resta, Jun 10 2015
FORMULA
digits(n,i=1,j) = A007376(n+i-1)
EXAMPLE
PROG
(PARI) { b=10; dmx=9; almost=vector(dmx); for(l=1, dmx, almost[l]=l); nmx=b^dmx-1; dn=dmx+1; dig=digits(dn, b); di=1; n=0; while(n<nmx, n++; d=digits(n, b); same=0; for(i=1, #d, if(d[i]==almost[i], same++, i=#d)); if(same==#d, print1(n, ", ")); for(i=1, dmx-1, almost[i]=almost[i+1]); almost[dmx]=dig[di]; di++; if(di>#dig, dn++; dig=digits(dn, b); di=1; ); ); }
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Anthony Sand, Jun 10 2015
EXTENSIONS
a(22)-a(23) from Giovanni Resta, Jun 10 2015
STATUS
approved