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.

A216653 Number A(n,k) of n-digit k-th powers; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

10, 4, 90, 3, 6, 900, 2, 2, 22, 9000, 2, 2, 5, 68, 90000, 2, 1, 2, 12, 217, 900000, 2, 1, 1, 4, 25, 683, 9000000, 2, 0, 1, 3, 8, 53, 2163, 90000000, 2, 0, 1, 1, 3, 14, 116, 6837, 900000000, 2, 0, 1, 1, 2, 6, 25, 249, 21623, 9000000000
Offset: 1

Views

Author

Alois P. Heinz, Sep 12 2012

Keywords

Examples

			A(1,1) = 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
A(1,2) = 4: 0, 1, 4, 9.
A(2,2) = 6: 16, 25, 36, 49, 64, 81.
A(3,3) = 5: 125, 216, 343, 512, 729.
A(4,4) = 4: 1296, 2401, 4096, 6561.
A(5,5) = 3: 16807, 32768, 59049.
A(6,6) = 3: 117649, 262144, 531441.
Square array A(n,k) begins:
:n\k|        1:     2:    3:   4:   5:  6:  7:  8
+---+--------------------------------------------
: 1 |       10,     4,    3,   2,   2,  2,  2,  2
: 2 |       90,     6,    2,   2,   1,  1,  0,  0
: 3 |      900,    22,    5,   2,   1,  1,  1,  1
: 4 |     9000,    68,   12,   4,   3,  1,  1,  1
: 5 |    90000,   217,   25,   8,   3,  2,  2,  1
: 6 |   900000,   683,   53,  14,   6,  3,  2,  1
: 7 |  9000000,  2163,  116,  25,  10,  5,  2,  2
: 8 | 90000000,  6837,  249,  43,  14,  7,  4,  2
		

Crossrefs

Main diagonal gives: A102690.

Programs

  • Maple
    r:= proc(n, k) local b; b:= iroot(n, k); b+`if`(b^k r(10^n, k) -r(10^(n-1), k) +`if`(n=1, 1, 0):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..10);

A178500 a(n) = 10^n * signum(n).

Original entry on oeis.org

0, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000, 10000000000000000000, 100000000000000000000
Offset: 0

Views

Author

Reinhard Zumkeller, May 28 2010

Keywords

Comments

a(n-1) is the minimum difference between an n-digit number (written in base 10, nonzero leading digit) and the product of its digits. For n > 1, it is also a number meeting that bound. See A070565. - Devin Akman, Apr 17 2019

Crossrefs

Programs

Formula

a(n) = A011557(n)*A057427(n).
For n > 0, a(n) = A011557(n).
a(n) = 10*A178501(n).
a(n) = A000533(n) - 1.
A061601(a(n)) = A109002(n+1).
From Elmo R. Oliveira, Jul 21 2025: (Start)
G.f.: 10*x/(1-10*x).
E.g.f.: 2*exp(5*x)*sinh(5*x).
a(n) = 10*a(n-1) for n > 1. (End)

A378564 a(n) is the number of n-digit nonnegative integers with the median of the digits equal to one of the digits.

Original entry on oeis.org

10, 9, 900, 1665, 90000, 232710, 9000000, 29055165, 900000000, 3413319138, 90000000000, 386095933170, 9000000000000, 42568084276236, 900000000000000, 4607838122919165, 90000000000000000, 491998811785538730, 9000000000000000000, 51983526276872387430, 900000000000000000000, 5447302810160797285236
Offset: 1

Views

Author

Stefano Spezia, Dec 01 2024

Keywords

Examples

			From _David A. Corneth_, Dec 03 2024: (Start)
a(3) = 900 as every positive integer between (inclusive) 100 and 999 contains its median. The median is the middle digit after sorting which is in the digits.
a(4) = 1665. For example 2558 has digits sorted and the median, 5 is in the digits of 2558 and any permutation of digits of 2558. There are 12 such permutations so 2558 contributes 12 towards the total of a(4).
0258 has digits sorted (but a leading 0) and has 24 permutations. To account for the leading 0 we remove it and deduce the number of permutations from what is left, namely 258. That has 6 permutations. So in total 0258 adds 24 - 6 = 18 towards the total of a(4). (End)
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[OddQ[n], KroneckerDelta[n,1]+9*10^(n-1), Module[{c=0}, For[k=10^(n-1), k<=10^n-1, k++, If[MemberQ[digits=IntegerDigits[k], Median[digits]], c++]]; c]]; Array[a, 7]
  • PARI
    \\ See Corneth link
    
  • Python
    from math import prod, factorial
    from itertools import combinations_with_replacement
    from collections import Counter
    def A378564(n):
        if n==1: return 10
        if n&1: return 9*10**(n-1)
        c, f = 0, factorial(n-1)
        for p in combinations_with_replacement(range(10),n):
            if max(p):
                a = sorted(p)
                b = a[len(a)-1>>1]+a[len(a)>>1]
                if b&1^1 and b>>1 in p:
                    v = Counter(d for d in p if d).values()
                    s = sum(v)
                    q = prod((factorial(i) for i in v))*factorial(n-s)
                    c += sum(f*i//q for i in v)
        return c # Chai Wah Wu, Dec 14 2024

Formula

a(2*n-1) = 9*10^(n-1) with a(1) = 10.
a(n) = A063945(n) for n odd.

Extensions

More terms from David A. Corneth, Dec 03 2024

A353962 Square array read by descending antidiagonals: The n-th row gives the decimal expansion of the base-n Champernowne constant.

Original entry on oeis.org

8, 6, 5, 2, 9, 4, 2, 8, 2, 3, 4, 9, 6, 1, 2, 0, 5, 1, 0, 3, 1, 1, 8, 1, 7, 9, 9, 1, 2, 1, 1, 3, 8, 4, 6, 1, 5, 6, 1, 6, 6, 4, 3, 4, 1, 8, 7, 1, 1, 2, 3, 2, 0, 2, 1, 6, 5, 1, 1, 6, 5, 6, 6, 3, 0, 0, 8, 3, 1, 1, 8, 5, 4, 2, 4, 9, 9, 0, 0, 8, 1, 1, 5, 3, 8, 4, 5, 9, 9, 9, 0
Offset: 2

Views

Author

Davis Smith, May 12 2022

Keywords

Comments

The base-n Champernowne constant (C_n) is normal in base n. A(n,k) is the (k+1)-th decimal digit of the fractional part of C_n.

Examples

			The square array A(n,k) begins:
  n/k | 0  1  2  3  4  5  6  7  8  9 10 11 ...
  ----+---------------------------------------
   2  | 8  6  2  2  4  0  1  2  5  8  6  8 ...
   3  | 5  9  8  9  5  8  1  6  7  5  3  8 ...
   4  | 4  2  6  1  1  1  1  1  1  1  1  1 ...
   5  | 3  1  0  7  3  6  1  1  1  1  1  1 ...
   6  | 2  3  9  8  6  2  6  8  5  8  1  5 ...
   7  | 1  9  4  4  3  5  5  3  5  0  8  6 ...
   8  | 1  6  3  2  6  4  8  1  2  1  0  5 ...
   9  | 1  4  0  6  2  4  9  7  6  1  1  9 ...
  10  | 1  2  3  4  5  6  7  8  9  1  0  1 ...
  ...
		

Crossrefs

Rows: A066716 (n=2), A077771 (n=3), A033307 (n=10).
Cf. A063945.

Programs

  • Mathematica
    A[n_,k_]:=Mod[Floor[ChampernowneNumber[n]10^(k + 1)] ,10]; Flatten[Table[Reverse[Table[A[n-k,k],{k,0,n-2}]],{n,2,14}]] (* Stefano Spezia, May 13 2022 *)

Formula

A(n,k) = floor(C_n*10^(k+1)) mod 10 where C_n (the base-n Champernowne constant) = Sum_{i>=1} i/(n^(i + Sum_{k=1..i-1} floor(log_n(k+1)))).

A355574 Number of nonnegative integers k with n digits such that x^2 - s*x + p has only integer roots, where s and p denote the sum and product of the digits of k respectively.

Original entry on oeis.org

2, 90, 223, 2686, 31601, 370894, 4220160, 46962379, 512600193
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2022

Keywords

Comments

a(n) is the number of n-digit numbers in A355497.

Crossrefs

Formula

a(n) <= A063945(n).
Limit_{n->oo} a(n)/a(n-1) = 10.

Extensions

a(8)-a(9) from Jean-Marc Rebert, Jul 13 2022
Showing 1-5 of 5 results.