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-5 of 5 results.

A254338 Initial digits of A254143 in decimal representation.

Original entry on oeis.org

1, 4, 7, 1, 2, 3, 3, 4, 6, 1, 1, 2, 2, 2, 3, 3, 3, 4, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 27 2015

Keywords

Comments

a(n) = A000030(A254143(n));
also initial digits of A254323: a(n) = A000030(A254323(n)).
all terms are of the form u*v mod 10, where u <= v and belonging to {1,3,4,6,7}, the distinct elements of A254397:
length of k-th run of consecutive 1s = A005993(k-2), k > 1;
length of k-th run of consecutive 2s = k*(k+1)/2 = A000217(k), k >= 1;
length of k-th run of consecutive 3s = k+1, k >= 1;
length of k-th run of consecutive 4s = A065033(k-1);
n with a(n) = 4: A237424(n) = (10^a+10^b+1)/3 with b = 0, see also A093137, A133384;
n with a(n) = 6: A237424(n) = (10^a+10^b+1)/3 with a = b; A005994(a(n)) = 6 for n > 1; see also A199682;

Crossrefs

Programs

  • Haskell
    a254338 = a000030 . a254143
    
  • PARI
    listA237424(lim)=my(v=List(),a,t); while(1, for(b=0,a, t=(10^a+10^b+1)/3; if(t>lim, return(Set(v))); listput(v, t)); a++)
    do(lim)=my(v=List(),u=listA237424(lim),t); for(i=1,#u, for(j=1,i, t=u[i]*u[j]; if(t>lim,break); listput(v,t))); apply(n->digits(n)[1], Set(v)) \\ Charles R Greathouse IV, May 13 2015

A254339 Final digits of A254143 in decimal representation.

Original entry on oeis.org

1, 4, 7, 6, 8, 4, 7, 9, 7, 6, 8, 8, 9, 8, 4, 7, 7, 9, 7, 6, 8, 6, 8, 9, 8, 8, 8, 9, 9, 9, 8, 4, 7, 7, 7, 9, 9, 7, 6, 8, 8, 9, 8, 6, 8, 8, 9, 8, 8, 9, 8, 8, 9, 9, 9, 9, 9, 8, 4, 7, 7, 7, 7, 9, 9, 7, 6, 8, 6, 8, 9, 8, 8, 8, 9, 9, 9, 8, 6, 8, 8, 8, 9, 9, 8, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 23 2015

Keywords

Comments

a(n) = A254143(n) mod 10;
also final digits of A254323: a(n) = A254323(n) mod 10.

Crossrefs

Programs

  • Haskell
    a254339 = flip mod 10 . a254143
    
  • PARI
    listA237424(lim)=my(v=List(),a,t); while(1, for(b=0,a, t=(10^a+10^b+1)/3; if(t>lim, return(Set(v))); listput(v, t)); a++)
    do(lim)=my(v=List(),u=listA237424(lim),t); for(i=1,#u, for(j=1,i, t=u[i]*u[j]; if(t>lim,break); listput(v,t))); apply(n->n%10, Set(v)) \\ Charles R Greathouse IV, May 13 2015

A254323 Remove in decimal representation of A254143(n) all repeated digits.

Original entry on oeis.org

1, 4, 7, 16, 28, 34, 37, 49, 67, 136, 148, 238, 259, 268, 34, 37, 367, 469, 67, 156, 1258, 136, 1348, 1369, 1468, 278, 238, 2359, 2479, 2569, 268, 34, 37, 367, 367, 489, 469, 67, 1356, 1458, 12358, 12469, 12478, 136, 1348, 13468, 13579, 1468, 2378, 2579
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 28 2015

Keywords

Comments

a(n) <= 123456789 for all n, and a(n) < 123456789 for n < 396;
a(396) = 123456789 = A050289(1);

Crossrefs

Cf. A254338 (initial digits), A254339 (final digits).

Programs

  • Haskell
    a254323 = a137564 . a254143

A009994 Numbers with digits in nondecreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 33, 34, 35, 36, 37, 38, 39, 44, 45, 46, 47, 48, 49, 55, 56, 57, 58, 59, 66, 67, 68, 69, 77, 78, 79, 88, 89, 99, 111, 112, 113, 114, 115, 116, 117, 118, 119, 122
Offset: 1

Views

Author

Keywords

Comments

Record values and occurrences of A004185. - Reinhard Zumkeller, Dec 05 2009
A193581(a(n)) = 0. - Reinhard Zumkeller, Aug 10 2011
This sequence was used by the U.S. Bureau of the Census in the mid-1950s to numerically code the alphabetical list of counties within a state (with some modifications for Texas). The 3-digit code has a "self-policing element" built into it and "was fairly effective in detecting the transposition of 2 digits." (Hanna 1959). - Randy A. Becker, Dec 11 2017

References

  • Amarnath Murthy and Robert J. Clarke, Some Properties of Staircase sequence, Mathematics & Informatics Quarterly, Volume 11, No. 4, November 2001.
  • Frank A. Hanna, The Compilation of Manufacturing Statistics. U.S. Department of Commerce, Bureau of the Census, 1959.

Crossrefs

Apart from the first term, a subsequence of A052382. A254143 is a subsequence.

Programs

  • Haskell
    import Data.Set (fromList, deleteFindMin, insert)
    a009994 n = a009994_list !! n
    a009994_list = 0 : f (fromList [1..9]) where
       f s = m : f (foldl (flip insert) s' $ map (10*m +) [m `mod` 10 ..9])
             where (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Aug 10 2011
    
  • Magma
    [k:k in [0..122]|Sort(Intseq(k)) eq Reverse(Intseq(k))]; // Marius A. Burtea, Jul 28 2019
    
  • Maple
    A[0]:= [0]: A[1]:= [$1..9]:
    for d from 2 to 4 do
      A[d]:= map(t -> seq(10*t+i,i=(t mod 10) .. 9), A[d-1]):
    od:
    seq(op(A[d]),d=0..4); # Robert Israel, Jul 28 2019
  • Mathematica
    Select[Range[0, 125], LessEqual@@IntegerDigits[#] &] (* Ray Chandler, Oct 25 2011 *)
  • PARI
    is(n)=n=digits(n);n==vecsort(n) \\ Charles R Greathouse IV, Dec 03 2013
    
  • Python
    from itertools import combinations_with_replacement
    def A009994generator():
        yield 0
        l = 1
        while True:
            for i in combinations_with_replacement('123456789',l):
                yield int(''.join(i))
            l += 1 # Chai Wah Wu, Nov 11 2015
    
  • Scala
    def hasDigitsSorted(n: Int): Boolean = {
      val digSort = Integer.parseInt(n.toString.toCharArray.sorted.mkString)
      n == digSort
    }
    (0 to 200).filter(hasDigitsSorted()) // _Alonso del Arte, Apr 20 2020

Formula

a(n) >> exp(n^(1/10)). - Charles R Greathouse IV, Mar 15 2014
a(n) ~ 10^((9! n)^(1/9) - 5), since 10^(d - 1) <= a(n) < 10^d for binomial(d + 8, 9) < n <= binomial(d + 9, 9) = (d + 5 - epsilon)^9 / 9!. Using epsilon = 10/(3n) + o(1/n) gives more precise estimate. [Following Radcliffe and McKay, cf. SeqFan list.] - M. F. Hasler, Jul 30 2019

A237424 Numbers of the form (10^a + 10^b + 1)/3.

Original entry on oeis.org

1, 4, 7, 34, 37, 67, 334, 337, 367, 667, 3334, 3337, 3367, 3667, 6667, 33334, 33337, 33367, 33667, 36667, 66667, 333334, 333337, 333367, 333667, 336667, 366667, 666667, 3333334, 3333337, 3333367, 3333667, 3336667
Offset: 1

Views

Author

Ahmad J. Masad, Feb 07 2014

Keywords

Comments

Has the property that the product of any two (not necessarily distinct) terms has digits in nondecreasing order.
Conjecture: This sequence is in a sense the maximally dense sequence with this nondecreasing products property. That is, it appears that every maximal sequence is either (i) A237424, (ii) a finite set of "extra" terms plus A237424 restricted to b=0 (which is A093137), or (iii) a finite set of "extra" terms plus A237424 restricted to a=b (which is A067275). (There might be one more case, not yet identified.) - David Applegate, Feb 12 2014
See A254143 and link for products a(i)*a(j) in natural order. - Reinhard Zumkeller, Jan 28 2015

Crossrefs

Programs

  • Haskell
    a237424 = flip div 3 . (+ 1) . a052216
    -- Reinhard Zumkeller, Jan 28 2015
    
  • Magma
    A052216:=[10^(n-1) + 10^(k-1): k in [1..n], n in [1..100]];
    A237424:= func< n | (A052216[n]+1)/3 >;
    [A237424(n): n in [1..100]]; // G. C. Greubel, Feb 22 2024
    
  • Mathematica
    Union@ Flatten@ Table[(10^a + 10^b + 1)/3, {a, 0, 8}, {b, a, 8}] (* Robert G. Wilson v, Jan 26 2015 *)
    (10^#[[1]]+10^#[[2]]+1)/3&/@Tuples[Range[0,8],2]//Union (* Harvey P. Dale, May 28 2019 *)
  • PARI
    list(lim)=my(v=List(),a,t); while(1, for(b=0,a, t=(10^a+10^b+1)/3; if(t>lim, return(Set(v))); listput(v, t)); a++) \\ Charles R Greathouse IV, May 13 2015
    
  • Python
    from math import isqrt
    def A237424(n): return (10**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+10**(n-1-(a*(a+1)>>1))+1)//3 # Chai Wah Wu, Apr 08 2025
  • SageMath
    A052216=flatten([[10^(n-1) + 10^(k-1) for k in range(1,n+1)] for n in range(1,101)])
    def A237424(n): return (A052216[n-1]+1)//3
    [A237424(n) for n in range(1,101)] # G. C. Greubel, Feb 22 2024
    

Formula

a(n) = (A052216(n) + 1)/3. - Reinhard Zumkeller, Jan 28 2015

Extensions

Edited by David Applegate, Feb 07 2014
Showing 1-5 of 5 results.