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.

A324161 Number of zerofree nonnegative integers <= n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 81, 82, 83
Offset: 0

Views

Author

Hieronymus Fischer, Feb 15 2019

Keywords

Comments

This sequence represents the counting function of A052382 (for indices > 0). The offset is set to zero for compatibility with A324160.
For indices 1 < n < 10761677 we have a(n) > A324160(n), for all indices n > 20327615 we have a(n) < A324160(n), i.e., the number of zerofree numbers <= N is smaller than the number of zero containing numbers <= N for sufficiently large N.
There are exactly 20 indices for which a(n) = A324160(n).
The greatest number n = n_max such that a(n) >= pi(n) [the number of primes <= n] is in the range 1.0075615552421*10^45 < n_max < 1.0075622026833*10^45 (see A324155). Thus, for all indices n > n_max, we have a(n) < pi(n). For n = n_max the number of primes is pi(n) = 9818959014098676479127822164411318257546629.
The least number n = n_min such that a(n) <= pi(n) [the number of primes <= n] is in the range 1.0953002073198*10^44 < n_min < 1.0953009588121*10^44 (see A324154). Thus, for all indices n < n_min, we have a(n) > pi(n). For n = n_min the number of primes is pi(n) = 1090995446010964053236424684934590917505180.
Differs from A028904 first at a(100)=90 <> A028904(100)=81. - R. J. Mathar, Mar 03 2020
Differs from A081600 first at a(101)=90 <> A081600(101)=91. - R. J. Mathar, Mar 03 2020

Examples

			a(10) = 9, since there are 9 numbers <= 10 which contain no '0'-digit (1, 2, 3, 4, 5, 6, 7, 8 and 9).
a(100) = 90.
a(10^3) = 819.
a(10^4) = 7380.
a(10^5) = 66429.
a(10^6) = 597870.
a(10^7) = 5380839
a(10^8) = 48427560.
a(10^9) = 435848049.
a(10^10) = 3922632450.
a(10^20) = 13677373641439044900.
a(10^50) = 579799710823512747416018770986323931789870962250 = 5.79799...*10^47.
a(10^100) = 2.9881573748536...68682786424500*10^95.
a(10^1000) = 1.96635515818798306...435874245000*10^954.
		

Crossrefs

Programs

  • Maple
    A324161 := proc(n)
        option remember;
        if n = 0 then
            0;
        else
            convert(convert(n,base,10),set) ;
            if 0 in % then
                procname(n-1) ;
            else
                1+procname(n-1) ;
            end if;
        end if;
    end proc: # R. J. Mathar, Mar 03 2020
  • PARI
    a(n) = sum(k=1, n, vecmin(digits(k)) != 0); \\ Michel Marcus, Mar 20 2019

Formula

With m := floor(log_10(n)); k := Max_{j | j=1..m and (floor(n/10^j) mod 10)*j = 0} = digit position of the leftmost '0' in n counted from the right (starting with 0), k = 0 if there is no '0' digit; b(n,k) := floor(n/10^k)*10^k:
a(n) = n - 1 - Sum_{j=1..m} floor((b(n,k+1)-1)/10^j)*9^(j-1), if k = 0 (valid for n > 9),
a(n) = b(n,k) - 1 - Sum_{j=1..m} floor((b(n,k)-1)/10^j)*9^(j-1), if k > 0 (valid for n > 0),
a(n) = b(n,k) - 1 + ceiling(fract(n/10))*(1-ceiling(k/(m+1))) - Sum_{j=1..m} floor((b(n,k)-1)/10^j)*9^(j-1) (all k, valid for n > 0).
a(n) + A324160(n) = n + 1.
a(A052382(n)) = n.
A052382(a(n)) <= n, for n > 0.
A052382(a(n)) = n, iff n is a zerofree number.
a(10*n + k) >= 9*a(n) + k, k=0..9, equality holds, if n is a zerofree number (i.e., contains no '0'-digit).
a(10*A052382(n) + k) = 9*n + k, k=0..9, n > 0.
Values for special indices:
a(k*(10^n - 1)/9 - j) = k*(9^n - 1)/8 - j, n > 0, k = 1, 2, ... 9, j = 0, 1, 2, ... k.
a(k*10^n - j) = k*9^n + (9^n - 1)/8 - j, n >= 0, k = 1, 2, ... 10, j = 1, 2, ... 10.
a(k*10^n + j) = k*9^n + (9^n - 1)/8 - 1, n > 0, k = 1, 2, ... 10, j = 0, 1, 2, ... (10^(n+1)-1)/9 - 10^n - 1.
With: d := log_10(9) = 0.95424250943932...
Upper bound:
a(n) <= (9*(n+1)^d - 1)/8 - 1,
equality holds for n = 10^k - 1, k >= 0.
Lower bound:
a(n) >= ((9*n + 10)^d - 1)/8 - 1,
equality holds for n = (10^k - 1)/9 - 1, k > 0.
Asymptotic behavior:
a(n) <= (9/8)*n^d*(1 + O(1/n)) - 9/8.
a(n) >= (9^d/8)*n^d*(1 + O(1/n)) - 9/8.
a(n) = O(n^d) = O(n^0.954242509...).
Lower and upper limits:
lim inf a(n)/n^d = 9^d/8 = 1.0173931195971..., for n -> infinity.
lim sup a(n)/n^d = 9/8, for n -> infinity.
From Hieronymus Fischer, Apr 04 2019: (Start)
Formulas for general bases b > 2:
With m := floor(log_b(n)); k := Max_{j | j=1..m and (floor(n/b^j) mod b)*j = 0} = digit position of the leftmost '0' in n counted from the right (starting with 0), k = 0 if there is no '0' digit; b(n,k):= floor(n/b^k)*b^k:
a(n) = n - 1 - Sum_{j=1..m} floor((b(n,k+1)-1)/b^j)*(b-1)^(j-1), if k = 0, valid for n > b-1;
a(n) = b(n,k) - 1 - Sum_{j=1..m} floor((b(n,k)-1)/b^j)*(b-1)^(j-1), if k > 0, valid for n > 0;
a(n) = b(n,k) - 1 + ceiling(fract(n/b))*(1-ceiling(k/(m+1))) - Sum_{j=1..m} floor((b(n,k)-1)/b^j)*(b-1)^(j-1), (all k, valid for n > 0).
Formula for base b = 2: a(n) = floor(log_2(n + 1)).
With d := d(b) := log(b - 1)/log(b).
Upper bound (b = 10 for this sequence):
a(n) <= ((b - 1)*(n + 1)^d - 1)/(b - 2) - 1,
equality holds for n = b^k - 1, k >= 0.
Lower bound (b = 10 for this sequence):
a(n) >= (((b - 1)*n + b)^d - 1)/(b - 2) - 1,
equality holds for n = (b^k - 1)/(b - 1) - 1, k > 0.
Asymptotic behavior (b = 10 for this sequence):
a(n) = O(n^d(b)), for b > 2,
a(n) = O(log(n)), for b = 2.
Lower and upper limits:
lim inf a(n)/n^d = (b - 1)^d/(b - 2), for n -> infinity, for b > 2.
lim sup a(n)/n^d = (b - 1)/(b - 2), for n -> infinity, for b > 2.
In case of b = 2:
lim a(n)/log(n) = 1/log(2), for n -> infinity.
(End)

A081600 Let n = 10x + y where 0 <= y <= 9, x >= 0. Then a(n) = 9x+y.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 108, 109, 110
Offset: 0

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

Comments

More than the usual number of terms are displayed in order to distinguish this from some closely related sequences. - N. J. A. Sloane, Mar 22 2014

Crossrefs

Cf. A081502. Different from A028904.

Programs

  • Magma
    k:=9; [n-(10-k)*Floor(n/10): n in [0..150]]; // Bruno Berselli, Jun 24 2014
  • Maple
    f1:=proc(n) local x,y;
    y:= (n mod 10);
    x:=(n-y)/10;
    9*x+y;
    end;
    [seq(f1(n),n=0..200)];
  • PARI
    my(n, x, y); vector(500, n, y=(n-1)%10; x=(n-1-y)\10; 9*x+y) \\ Colin Barker, Jun 23 2014
    
  • PARI
    a(n)=n - n\10 \\ Charles R Greathouse IV, Sep 01 2015
    

Formula

G.f.: x*(x^2 +x +1)*(x^6 +x^3 +1) / ((x -1)^2*(x +1)*(x^4 -x^3 +x^2 -x +1)*(x^4 +x^3 +x^2 +x +1)). - Colin Barker, Jun 24 2014
a(n) = n - floor(n/10). - Bruno Berselli, Jun 24 2014

A083291 Triangular array read by rows: T(n,k) = k*floor(n/10) + n mod 10, 0<=k<=n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3, 4, 5, 6, 7, 8, 9, 10, 11
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 23 2003

Keywords

Comments

A010879(n)=T(n,0);
A076314(0)=T(0,0), A076314(n)=T(n,1) for n>0;
A028897(n)=T(n,n) for n<=1, A028897(n)=T(n,2) for n>1;
A028898(n)=T(n,n) for n<=2, A028898(n)=T(n,3) for n>2;
A028899(n)=T(n,n) for n<=3, A028899(n)=T(n,4) for n>3;
A028900(n)=T(n,n) for n<=4, A028900(n)=T(n,5) for n>4;
A028901(n)=T(n,n) for n<=5, A028901(n)=T(n,6) for n>5;
A028902(n)=T(n,n) for n<=6, A028902(n)=T(n,7) for n>6;
A028903(n)=T(n,n) for n<=7, A028903(n)=T(n,8) for n>7;
A028904(n)=T(n,n) for n<=8, A028904(n)=T(n,9) for n>8;
T(n,n) = n for n<=9, T(n,10) = n for n>9;
A083292(n) = T(n,n).

Examples

			From _Paolo Xausa_, May 22 2024: (Start)
Triangle begins:
   [0] 0;
   [1] 1, 1;
   [2] 2, 2, 2;
   [3] 3, 3, 3, 3;
   [4] 4, 4, 4, 4, 4;
   [5] 5, 5, 5, 5, 5, 5;
   [6] 6, 6, 6, 6, 6, 6, 6;
   [7] 7, 7, 7, 7, 7, 7, 7, 7;
   [8] 8, 8, 8, 8, 8, 8, 8, 8, 8;
   [9] 9, 9, 9, 9, 9, 9, 9, 9, 9, 9;
  [10] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
  ... (End)
		

Programs

  • Mathematica
    Table[k*Floor[n/10] + Mod[n, 10], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, May 22 2024 *)

Extensions

Offset changed to 0 by Paolo Xausa, May 22 2024

A239092 Prefix overlap of dictionary consisting of decimal expansions of 0 through n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 110
Offset: 1

Views

Author

N. J. A. Sloane, Mar 22 2014

Keywords

Comments

The prefix overlap between two words is the length of their longest common prefix.
The prefix overlap of a dictionary is the sum of the prefix overlaps between successive words.
Partial sums of A076489.
More than the usual number of terms are displayed in order to distinguish this from some closely related sequences.

Crossrefs

Different from A081600 and A028904.

A332690 Sum of all numbers in bijective base-9 numeration with digit sum n.

Original entry on oeis.org

0, 1, 12, 124, 1248, 12496, 124992, 1249984, 12499968, 124999936, 1249999862, 12499999623, 124999998144, 1249999984364, 12499999840480, 124999998308464, 1249999981991936, 12499999808733888, 124999997974967808, 1249999978624935680, 12499999774999871588
Offset: 0

Views

Author

Alois P. Heinz, Feb 19 2020

Keywords

Comments

Different from A016134.

Examples

			a(2) = 12 = 2 + 10 = 2_bij9 + 11_bij9.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0], add((p->
          [p[1], p[2]*9+p[1]*d])(b(n-d)), d=1..min(n, 9)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=0..23);

Formula

G.f.: (Sum_{j=1..9} j*x^j) / ((B(x) - 1) * (9*B(x) - 1)) with B(x) = Sum_{j=1..9} x^j.
a(n) = A028904(A332691(n)).
a(n) = A016134(n-1) for n = 1..9.
Showing 1-5 of 5 results.