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

A131835 Numbers starting with 1.

Original entry on oeis.org

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
Offset: 1

Views

Author

Andrew Good (yipes_stripes(AT)yahoo.com), Jul 20 2007

Keywords

Comments

The lower and upper asymptotic densities of this sequence are 1/9 and 5/9, respectively. - Amiram Eldar, Feb 27 2021

Crossrefs

Subsequence of A011531.
Disjoint union of A045707 and A206286.
Cf. A000030, A000027, A002275, A262390 (permutation).

Programs

  • Haskell
    a131835 n = a131835_list !! (n-1)
    a131835_list = concat $
                   iterate (concatMap (\x -> map (+ 10 * x) [0..9])) [1]
    -- Reinhard Zumkeller, Jul 16 2014
    
  • Maple
    isA131835 := proc(n) if op(-1,convert(n,base,10)) = 1 then true; else false ; fi ; end: for n from 1 to 300 do if isA131835(n) then printf("%d, ",n) ; fi ; od : # R. J. Mathar, Jul 24 2007
  • Mathematica
    Select[Range[150], IntegerDigits[#][[1]] == 1 &] (* Amiram Eldar, Feb 27 2021 *)
  • PARI
    a(n, {base=10}) = my (o=1); while (n>o, n-=o; o*=base); return (o+n-1) \\ Rémy Sigrist, Jun 23 2017
    
  • PARI
    a(n) = n--; s = #digits(9*n+1); n + 8 * (10^(s-1))/9 + 1/9 \\ David A. Corneth, Jun 23 2017
    
  • PARI
    nxt(n) = my(d = digits(n+1)); if(d[1]==1, n+1, 10^#d) \\ David A. Corneth, Jun 23 2017
    
  • Python
    def A131835(n): return n+(10**(len(str(9*n-8))-1)<<3)//9 # Chai Wah Wu, Dec 07 2024

Formula

A000030(a(n)) = 1. - Reinhard Zumkeller, Jul 16 2014
a(A002275(n)+1) = 10^n for any n >= 0. - Rémy Sigrist, Jun 23 2017
a(n) = n + (8*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 16 2023

Extensions

More terms from R. J. Mathar, Jul 24 2007

A206288 Nonprime numbers with all divisors starting with digit 1.

Original entry on oeis.org

1, 121, 143, 169, 187, 1111, 1133, 1177, 1199, 1243, 1313, 1331, 1339, 1391, 1397, 1417, 1441, 1469, 1507, 1529, 1573, 1639, 1651, 1661, 1703, 1717, 1727, 1751, 1781, 1793, 1807, 1819, 1837, 1853, 1859, 1903, 1919, 1921, 1937, 1957, 1963, 1969, 1991
Offset: 1

Views

Author

Jaroslav Krizek, Feb 12 2012

Keywords

Comments

Subsequence of A206286, A131835.
Complement of A045707 (primes with first digit 1) with respect to A202287 (numbers with all divisors starting with digit 1).

Examples

			All divisors of 1859 (1, 11, 13, 169, 1859) start with digit 1.
		

Crossrefs

Cf. A045707 (primes with first digit 1), A202287 (numbers with all divisors starting with digit 1).

Programs

  • Maple
    fd1:= n -> n < 2*10^ilog10(n):
    filter:= proc(n) not isprime(n) and andmap(fd1,numtheory:-divisors(n)) end proc:
    select(filter, [1,seq(seq(i,i=10^d+1..2*10^d-1,2),d=1..3)]); # Robert Israel, Mar 13 2019
  • Mathematica
    fQ[n_] := Module[{d = Divisors[n]}, Union[IntegerDigits[#][[1]] & /@ d] == {1}]; Select[Range[1991], ! PrimeQ[#] && fQ[#] &] (* T. D. Noe, Feb 13 2012 *)
Showing 1-2 of 2 results.