cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A052404 Numbers without 2 as a digit.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89
Offset: 1

Views

Author

Henry Bottomley, Mar 13 2000

Keywords

References

  • M. J. Halm, Word Weirdness, Mpossibilities 66 (Feb. 1998), p. 5.

Crossrefs

Cf. A004177, A004721, A072809, A082831 (Kempner series).
Cf. A052382 (without 0), A052383 (without 1), A052405 (without 3), A052406 (without 4), A052413 (without 5), A052414 (without 6), A052419 (without 7), A052421 (without 8), A007095 (without 9).
See A038604 for the subset of primes. - M. F. Hasler, Jan 11 2020

Programs

  • Haskell
    a052404 = f . subtract 1 where
       f 0 = 0
       f v = 10 * f w + if r > 1 then r + 1 else r  where (w, r) = divMod v 9
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [ n: n in [0..89] | not 2 in Intseq(n) ];  // Bruno Berselli, May 28 2011
    
  • Maple
    a:= proc(n) local l, m; l, m:= 0, n-1;
          while m>0 do l:= (d->
            `if`(d<2, d, d+1))(irem(m, 9, 'm')), l
          od; parse(cat(l))/10
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 01 2016
  • Mathematica
    ban2Q[n_]:=FreeQ[IntegerDigits[n],2]==True; Select[Range[0,89],ban2Q[#] &] (* Jayanta Basu, May 17 2013 *)
    Select[Range[0,100],DigitCount[#,10,2]==0&] (* Harvey P. Dale, Apr 13 2015 *)
  • PARI
    lista(nn, d=2) = {for (n=0, nn, if (!vecsearch(vecsort(digits(n),,8),d), print1(n, ", ")););} \\ Michel Marcus, Feb 21 2015
    
  • PARI
    apply( {A052404(n)=fromdigits(apply(d->d+(d>1),digits(n-1,9)))}, [1..99])
    next_A052404(n, d=digits(n+=1))={for(i=1, #d, d[i]==2&&return((1+n\d=10^(#d-i))*d)); n} \\ least a(k) > n: if there's a digit 2 in n+1, replace the first occurrence by 3 and all following digits by 0.
    (A052404_vec(N)=vector(N, i, N=if(i>1, next_A052404(N))))(99) \\ first N terms
    select( {is_A052404(n)=!setsearch(Set(digits(n)),2)}, [0..99])
    (A052404_upto(N)=select( is_A052404, [0..N]))(99) \\ M. F. Hasler, Jan 11 2020
    
  • Python
    from gmpy2 import digits
    def A052404(n): return int(''.join(str(int(d)+1) if d>'1' else d for d in digits(n-1,9))) # Chai Wah Wu, Aug 30 2024
  • sh
    seq 0 1000 | grep -v 2; # Joerg Arndt, May 29 2011
    

Formula

If the offset were changed to 0: a(0) = 0, a(n+1) = f(a(n)+1,a(n)+1) where f(x,y) = if x<10 and x<>2 then y else if x mod 10 = 2 then f(y+1,y+1) else f(floor(x/10),y). - Reinhard Zumkeller, Mar 02 2008
a(n) = replace digits d > 1 by d + 1 in base-9 representation of n - 1. - Reinhard Zumkeller, Oct 07 2014
Sum_{k>1} 1/a(k) = A082831 = 19.257356... (Kempner series). - Bernard Schott, Jan 12 2020, edited by M. F. Hasler, Jan 14 2020

Extensions

Offset changed by Reinhard Zumkeller, Oct 07 2014

A057846 Sort the digits of n into alphabetical order (the "Obsessive Filer's Sequence").

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 41, 51, 16, 17, 81, 91, 20, 12, 22, 32, 42, 52, 62, 72, 82, 92, 30, 13, 32, 33, 43, 53, 63, 73, 83, 93, 40, 41, 42, 43, 44, 54, 46, 47, 84, 49, 50, 51, 52, 53, 54, 55, 56, 57, 85, 59, 60, 16, 62, 63, 46, 56, 66, 76, 86, 96, 70, 17, 72, 73, 47, 57, 76, 77, 87
Offset: 0

Views

Author

Rick L. Shepherd, Jul 23 2002

Keywords

Comments

The digits of each number n (written in base 10) are put into alphabetical order by their English name. This means a given term's digits must be in this order: 8, 5, 4, 9, 1, 7, 6, 3, 2, 0. It's easy to see that any n-digit term (with digits in this order) with distinct digits, none zero, occurs exactly n! times in the sequence.
Since 0 = "zero" is sorted last, this works well for the English language. But the same cannot be "coded without loss" on OEIS for languages where the name for 0 is not sorted last: E.g., in German, 0="null" comes before, e.g., 2="zwei", which would yield "02" for 20, but leading zeros are not allowed on the OEIS. - M. F. Hasler, Jul 28 2013
See A225805 for the French version. - M. F. Hasler, Jul 28 2013

Examples

			a(14)=41 because the digits of 14, 1 (one) and 4 (four), are in alphabetical order when arranged as 4, then 1, so 41.
		

References

  • M. J. Halm, Sequences (Re)discovered, Mpossibilities 81 (Aug. 2002), p. 1.

Crossrefs

Cf. A072809, A225805 (in French).

Programs

  • Mathematica
    s = {9, 4, 8, 7, 2, 1, 6, 5, 0, 3}; Table[FromDigits[Sort[IntegerDigits[n], s[[#1 + 1]] < s[[#2 + 1]] &]], {n, 78}] (* Ivan Neretin, Jul 09 2015 *)
  • PARI
    A057846(n,o=[9, 4, 8, 7, 2, 1, 6, 5, 0, 3])= {sum(i=1,#n=vecsort(digits(n),(a,b)->o[b+1]-o[a+1]),n[i]*10^i)/10} \\ - M. F. Hasler, Jul 28 2013
    
  • Python
    def k(c): return "8549176320".index(c)
    def a(n): return int("".join(sorted(str(n), key=k)))
    print([a(n) for n in range(100)]) # Michael S. Branicky, Aug 17 2022

Extensions

Edited by N. J. A. Sloane, Aug 31 2006
Original terms 76, 86, 96 restored by Rick L. Shepherd, Jul 26 2013

A225805 Sort the digits of n into alphabetical order according their French name: The "French Obsessive Filer's Sequence".

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 20, 21, 22, 23, 24, 52, 26, 27, 28, 29, 30, 31, 23, 33, 43, 53, 63, 73, 83, 93, 40, 41, 24, 43, 44, 54, 46, 47, 84, 94, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 26, 63, 46, 56
Offset: 0

Views

Author

M. F. Hasler, Jul 28 2013

Keywords

Comments

French version of A057846, see there for references.
Digits are sorted in the order: 5="cinq", 2="deux", 8="huit", 9="neuf", 4="quatre", 7="sept", 6="six", 3="trois", 1="un", 0="zéro".
Works well for the French language (as for English), because 0="zero" is sorted last. The exact German analog cannot be stored on OEIS, since 0="null" comes before, e.g., 2="zwei": This would yield "02" for 20, but leading zeros are not allowed for terms on OEIS.

Crossrefs

Programs

  • PARI
    (n,o=[9, 8, 1, 7, 4, 0, 6, 5, 2, 3])->{ sum(i=1,#n=vecsort(digits(n),(a,b)->o[b+1]-o[a+1]),n[i]*10^i)/10}
Showing 1-3 of 3 results.